GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TMeshFinalEvent.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 "TMeshFinalEvent.h"
15 
16 #include "TGo4Log.h"
17 #include "TGo4FileSource.h"
18 #include "TMeshFinalProc.h"
19 
20 //***********************************************************
22  :TGo4EventElement("FinalEvent")
23 {
24 }
25 
26 //***********************************************************
28  :TGo4EventElement(name)
29 {
30 }
31 
32 //***********************************************************
34 {
35 }
36 
37 //-----------------------------------------------------------
39  // check for different source types
40  Int_t rev = 0;
41  Clear();
42  if (CheckEventSource("TMeshFinalProc")) {
43  fxFinalProc = dynamic_cast<TMeshFinalProc*>(GetEventSource());
44  TGo4Log::Info("TMeshFinalEvent init for Final step");
45  } else if (CheckEventSource("TGo4FileSource")) {
46  fxFile = dynamic_cast<TGo4FileSource*>(GetEventSource());
47  TGo4Log::Info("TMeshFinalEvent init for file input");
48  } else
49  rev = 1;
50  return rev;
51 }
52 
53 //-----------------------------------------------------------
55 {
56  // check for different source types
57  Int_t rev = 0;
58  Clear();
59  if(fxFinalProc)
60  fxFinalProc->Analysis(this);
61  else if(fxFile)
62  fxFile->BuildEvent(this);
63  else
64  rev=1;
65  return rev;
66 }
67 
68 //-----------------------------------------------------------
69 void TMeshFinalEvent::Clear(Option_t *opt)
70 {
71  fxB1.Clear(opt);
72  fxB1.SetValid(kFALSE);
73  fxB2.Clear(opt);
74  fxB1.SetValid(kFALSE);
75  fxB3.Clear(opt);
76  fxB1.SetValid(kFALSE);
77  fxB12.Clear(opt);
78  fxB1.SetValid(kFALSE);
79 }
TMeshB1OutputEvent fxB1
TGo4EventSource * GetEventSource() const
void Clear(Option_t *opt="") override
void Clear(Option_t *opt="") override
void Clear(Option_t *opt="") override
Bool_t BuildEvent(TGo4EventElement *dest) override
void SetValid(Bool_t on)
TMeshB3OutputEvent fxB3
static void Info(const char *text,...) GO4_PRINTF_ARGS
Definition: TGo4Log.cxx:294
void Clear(Option_t *opt="") override
TMeshB2OutputEvent fxB2
Bool_t CheckEventSource(const char *classname)
void Analysis(TMeshFinalEvent *target)
void Clear(Option_t *opt="") override
Int_t Init() override
Int_t Fill() override
TGo4FileSource * fxFile
Don&#39;t put this to file.
TMeshFinalProc * fxFinalProc
TMeshB12OutputEvent fxB12