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