00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 #include "TMeshFinalEvent.h" 00017 00018 #include "Riostream.h" 00019 00020 #include "TGo4FileSource.h" 00021 #include "TMeshFinalProc.h" 00022 00023 //*********************************************************** 00024 TMeshFinalEvent::TMeshFinalEvent() 00025 :TGo4EventElement("FinalEvent"),fxFinalProc(0),fxFile(0) 00026 { 00027 00028 } 00029 //*********************************************************** 00030 TMeshFinalEvent::TMeshFinalEvent(const char* name) 00031 :TGo4EventElement(name),fxFinalProc(0),fxFile(0) 00032 { 00033 } 00034 //*********************************************************** 00035 TMeshFinalEvent::~TMeshFinalEvent() 00036 { 00037 } 00038 //*********************************************************** 00039 00040 00041 //----------------------------------------------------------- 00042 Int_t TMeshFinalEvent::Init() 00043 { 00044 // check for different source types 00045 Int_t rev = 0; 00046 Clear(); 00047 if(CheckEventSource("TMeshFinalProc")) 00048 { 00049 fxFinalProc = dynamic_cast<TMeshFinalProc*>(GetEventSource()); 00050 cout << "**** TMeshFinalEvent init for Final step"<< endl; 00051 } 00052 else if(CheckEventSource("TGo4FileSource")) 00053 { 00054 fxFile = dynamic_cast<TGo4FileSource*> (GetEventSource()); 00055 cout << "**** TMeshFinalEvent init for file input"<< endl; 00056 } 00057 else 00058 rev=1; 00059 return rev; 00060 00061 } 00062 //----------------------------------------------------------- 00063 Int_t TMeshFinalEvent::Fill() 00064 { 00065 // check for different source types 00066 Int_t rev = 0; 00067 Clear(); 00068 if(fxFinalProc) 00069 fxFinalProc->Analysis(this); 00070 else if(fxFile) 00071 fxFile->BuildEvent(this); 00072 else 00073 rev=1; 00074 return rev; 00075 00076 } 00077 //----------------------------------------------------------- 00078 void TMeshFinalEvent::Clear(Option_t *t) 00079 { 00080 //----------------------------------------------------------- 00081 fxB1.Clear(t); 00082 fxB1.SetValid(kFALSE); 00083 fxB2.Clear(t); 00084 fxB1.SetValid(kFALSE); 00085 fxB3.Clear(t); 00086 fxB1.SetValid(kFALSE); 00087 fxB12.Clear(t); 00088 fxB1.SetValid(kFALSE); 00089 } 00090 00091 //----------------------------END OF GO4 SOURCE FILE ---------------------