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