00001 //--------------------------------------------------------------- 00002 // Go4 Release Package v2.10-5 (build 21005) 00003 // 03-Nov-2005 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at DVEE 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 "TMeshB1OutputEvent.h" 00017 00018 #include <iostream.h> 00019 00020 00021 //*********************************************************** 00022 TMeshB1OutputEvent::TMeshB1OutputEvent() 00023 :TGo4EventElement("OutputEvent1"),fxProcessor(0),fxFile(0) 00024 { 00025 } 00026 //*********************************************************** 00027 TMeshB1OutputEvent::TMeshB1OutputEvent(Text_t * name) 00028 :TGo4EventElement(name),fxProcessor(0),fxFile(0) 00029 { 00030 } 00031 //*********************************************************** 00032 TMeshB1OutputEvent::~TMeshB1OutputEvent() 00033 { 00034 } 00035 //*********************************************************** 00036 00037 00038 //----------------------------------------------------------- 00039 Int_t TMeshB1OutputEvent::Init() 00040 { 00041 // check for different source types 00042 Int_t rev = 0; 00043 if(CheckEventSource("TMeshB1AnlProc")) 00044 { 00045 fxProcessor = dynamic_cast<TMeshB1AnlProc*>(GetEventSource()); 00046 cout << "**** TMeshB1OutputEvent Init for analysis step"<< endl; 00047 } 00048 else if(CheckEventSource("TGo4FileSource")) 00049 { 00050 fxFile = dynamic_cast<TGo4FileSource*>(GetEventSource()); 00051 cout << "**** TMeshB1OutputEvent Init for file input"<< endl; 00052 } 00053 else 00054 rev=1; 00055 return rev; 00056 00057 } 00058 //----------------------------------------------------------- 00059 Int_t TMeshB1OutputEvent::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 TMeshB1OutputEvent::Clear(Option_t *t) 00075 { 00076 //----------------------------------------------------------- 00077 void* destfield; 00078 destfield = (void*) &frData[0]; 00079 memset(destfield,0, sizeof(frData)); 00080 } 00081 00082 //----------------------------------------------------------- 00083 ClassImp(TMeshB1OutputEvent) 00084 00085 00086 00087 00088 //----------------------------END OF GO4 SOURCE FILE ---------------------