GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TMeshFinalProc.cxx
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "TMeshFinalProc.h"
15 
16 #include "TGo4Log.h"
17 #include "TMeshFinalEvent.h"
18 
19 //***********************************************************
20 // this one is used in TXXXAnlFact
22  :TGo4EventProcessor(name)
23 {
24  TGo4Log::Info("TMeshFinalProc: Create %s", name);
25 }
26 
27 //***********************************************************
29  : TGo4EventProcessor("FinalProcessor")
30 {
31 }
32 
33 //***********************************************************
35 {
36 }
37 
38 //-----------------------------------------------------------
40 {
41  if (!poutevt)
42  return;
44  if (!fxInput1)
45  fxInput1 = dynamic_cast<TMeshB1OutputEvent *>(GetInputEvent("Output1Provider"));
46  if (!fxInput2)
47  fxInput2 = dynamic_cast<TMeshB2OutputEvent *>(GetInputEvent("Output2Provider"));
48  if (!fxInput3)
49  fxInput3 = dynamic_cast<TMeshB3OutputEvent *>(GetInputEvent("Output3Provider"));
50  if (!fxInput12)
51  fxInput12 = dynamic_cast<TMeshB12OutputEvent *>(GetInputEvent("Output12Provider"));
52 
54  // if(fxInput12 && fxInput3)
55  // {
56  // // normal case, combine all final results
57  //
58  // }
59  // else if (fxInput1 && fxInput2 && fxInput3 )
60  // {
61  // // work on these. any combination of inputs may be processed
62  // // depending on the previous setup
63  // // we might steer the final processing via parameter
64  // }
65  // else
66  // {
67  // throw TGo4UserException(3,"Error: not all input events available for processor %s",GetName(););
68  // }
69 
70  // for the moment, we just copy the component results into final event;
71  if (fxInput1)
72  poutevt->fxB1 = *fxInput1; // be sure assignment operator is correct!
73  if (fxInput2)
74  poutevt->fxB2 = *fxInput2; // be sure assignment operator is correct!
75  if (fxInput3)
76  poutevt->fxB3 = *fxInput3; // be sure assignment operator is correct!
77  if (fxInput12)
78  poutevt->fxB12 = *fxInput12; // be sure assignment operator is correct!
79 }
TMeshB1OutputEvent fxB1
TMeshB1OutputEvent * fxInput1
virtual ~TMeshFinalProc()
TMeshB3OutputEvent fxB3
static void Info(const char *text,...) GO4_PRINTF_ARGS
Definition: TGo4Log.cxx:294
TMeshB2OutputEvent fxB2
TMeshB12OutputEvent * fxInput12
void Analysis(TMeshFinalEvent *target)
TMeshB2OutputEvent * fxInput2
TGo4EventElement * GetInputEvent()
TMeshB12OutputEvent fxB12
TMeshB3OutputEvent * fxInput3