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