00001 // $Id: TMeshB12OutputEvent.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 "TMeshB12OutputEvent.h" 00015 00016 #include "TGo4Log.h" 00017 00018 #include "TMeshB12AnlProc.h" 00019 #include "TGo4FileSource.h" 00020 00021 //*********************************************************** 00022 TMeshB12OutputEvent::TMeshB12OutputEvent() 00023 :TGo4EventElement("OutputEvent12"),fxProcessor(0),fxFile(0) 00024 { 00025 } 00026 //*********************************************************** 00027 TMeshB12OutputEvent::TMeshB12OutputEvent(const char* name) 00028 :TGo4EventElement(name),fxProcessor(0),fxFile(0) 00029 { 00030 } 00031 //*********************************************************** 00032 TMeshB12OutputEvent::~TMeshB12OutputEvent() 00033 { 00034 } 00035 //*********************************************************** 00036 00037 00038 //----------------------------------------------------------- 00039 Int_t TMeshB12OutputEvent::Init() 00040 { 00041 // check for different source types 00042 Int_t rev = 0; 00043 if(CheckEventSource("TMeshB12AnlProc")) 00044 { 00045 fxProcessor = dynamic_cast<TMeshB12AnlProc*>(GetEventSource()); 00046 TGo4Log::Info("TMeshB12OutputEvent Init for analysis step"); 00047 } 00048 else if(CheckEventSource("TGo4FileSource")) 00049 { 00050 fxFile = dynamic_cast<TGo4FileSource*>(GetEventSource()); 00051 TGo4Log::Info("TMeshB12OutputEvent Init for file input"); 00052 } 00053 else 00054 rev=1; 00055 return rev; 00056 00057 } 00058 //----------------------------------------------------------- 00059 Int_t TMeshB12OutputEvent::Fill() 00060 { 00061 // check for different source types 00062 Int_t rev = 0; 00063 Clear(); 00064 if(fxProcessor) 00065 fxProcessor->Analysis(this); 00066 else if(fxFile) 00067 fxFile->BuildEvent(this); 00068 else 00069 rev = 1; 00070 return rev; 00071 00072 } 00073 //----------------------------------------------------------- 00074 void TMeshB12OutputEvent::Clear(Option_t *t) 00075 { 00076 //----------------------------------------------------------- 00077 void* destfield = (void*) &frData[0]; 00078 memset(destfield,0, sizeof(frData)); 00079 }