00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE 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 "TMeshB3AnlProc.h" 00017 00018 #include "Riostream.h" 00019 00020 #include "TGo4UserException.h" 00021 00022 #include "TMeshRawEvent.h" 00023 #include "TMeshB3OutputEvent.h" 00024 #include "TMeshB3InputEvent.h" 00025 00026 //*********************************************************** 00027 // this one is used in TXXXAnlFact 00028 TMeshB3AnlProc::TMeshB3AnlProc(const char* name) 00029 :TGo4EventProcessor(name),fxInput(0) 00030 { 00031 cout << "**** TMeshB3AnlProc: Create" << endl; 00032 } 00033 //*********************************************************** 00034 TMeshB3AnlProc::TMeshB3AnlProc() 00035 : TGo4EventProcessor("Processor3"),fxInput(0) 00036 { 00037 } 00038 //*********************************************************** 00039 TMeshB3AnlProc::~TMeshB3AnlProc() 00040 { 00041 } 00042 //*********************************************************** 00043 00044 //----------------------------------------------------------- 00045 void TMeshB3AnlProc::Analysis(TMeshB3OutputEvent* poutevt) 00046 { 00047 if(fxInput==0) 00048 { 00049 // lazy init for input event from framework 00050 TGo4EventElement* providerinput=GetInputEvent("Input3Provider"); 00051 TMeshRawEvent* raw=dynamic_cast<TMeshRawEvent*>(providerinput); 00052 if(raw) 00053 fxInput=&(raw->fxSub3); 00054 // provider delivers full raw event, we use only our component 00055 else 00056 fxInput=dynamic_cast<TMeshB3InputEvent*>(providerinput); 00057 // provider with partial io delivers just our component 00058 } 00059 if(fxInput) 00060 { 00061 // do the processing here: 00062 for(Int_t i=0;i<4;i++) 00063 { 00064 poutevt->frData[i]=(Float_t)fxInput->fiCrate3[i]; 00065 } 00066 00067 00068 } 00069 else 00070 { 00071 throw TGo4UserException(3,"Error: no input event for processor %s",GetName()); 00072 } 00073 00074 } // BuildCalEvent 00075 00076 //----------------------------END OF GO4 SOURCE FILE ---------------------