GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TMeshFinalEvent.cxx
Go to the documentation of this file.
1 // $Id: TMeshFinalEvent.cxx 933 2013-01-29 15:27:58Z linev $
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 für 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"),fxFinalProc(0),fxFile(0)
23 {
24 
25 }
26 //***********************************************************
28  :TGo4EventElement(name),fxFinalProc(0),fxFile(0)
29 {
30 }
31 //***********************************************************
33 {
34 }
35 //***********************************************************
36 
37 
38 //-----------------------------------------------------------
40 {
41  // check for different source types
42  Int_t rev = 0;
43  Clear();
44  if(CheckEventSource("TMeshFinalProc"))
45  {
46  fxFinalProc = dynamic_cast<TMeshFinalProc*>(GetEventSource());
47  TGo4Log::Info("TMeshFinalEvent init for Final step");
48  }
49  else if(CheckEventSource("TGo4FileSource"))
50  {
51  fxFile = dynamic_cast<TGo4FileSource*> (GetEventSource());
52  TGo4Log::Info("TMeshFinalEvent init for file input");
53  }
54  else
55  rev=1;
56  return rev;
57 }
58 
59 //-----------------------------------------------------------
61 {
62  // check for different source types
63  Int_t rev = 0;
64  Clear();
65  if(fxFinalProc)
66  fxFinalProc->Analysis(this);
67  else if(fxFile)
68  fxFile->BuildEvent(this);
69  else
70  rev=1;
71  return rev;
72 
73 }
74 //-----------------------------------------------------------
75 void TMeshFinalEvent::Clear(Option_t *t)
76 {
77  //-----------------------------------------------------------
78  fxB1.Clear(t);
79  fxB1.SetValid(kFALSE);
80  fxB2.Clear(t);
81  fxB1.SetValid(kFALSE);
82  fxB3.Clear(t);
83  fxB1.SetValid(kFALSE);
84  fxB12.Clear(t);
85  fxB1.SetValid(kFALSE);
86 }
TMeshB1OutputEvent fxB1
void SetValid(Bool_t on)
TMeshB3OutputEvent fxB3
TGo4EventSource * GetEventSource() const
virtual void Clear(Option_t *t="")
TMeshB2OutputEvent fxB2
virtual Int_t Fill()
Bool_t CheckEventSource(const char *classname)
void Analysis(TMeshFinalEvent *target)
virtual Bool_t BuildEvent(TGo4EventElement *dest)
virtual void Clear(Option_t *t="")
TGo4FileSource * fxFile
Don't put this to file.
TMeshFinalProc * fxFinalProc
virtual void Clear(Option_t *t="")
virtual void Clear(Option_t *t="")
virtual Int_t Init()
TMeshB12OutputEvent fxB12
virtual void Clear(Option_t *t="")
static void Info(const char *text,...)
Definition: TGo4Log.cxx:283