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 "TMeshProviderProc.h" 00017 00018 #include <iostream.h> 00019 00020 #include "Go4Analysis/TGo4Analysis.h" 00021 00022 //*********************************************************** 00023 // this one is used in TXXXAnlFact 00024 TMeshProviderProc::TMeshProviderProc(Text_t * name) 00025 :TGo4EventProcessor(name) 00026 { 00027 cout << "**** TMeshProviderProc: Create" << endl; 00028 } 00029 //*********************************************************** 00030 TMeshProviderProc::TMeshProviderProc() 00031 : TGo4EventProcessor("ProviderProcessor") 00032 { 00033 } 00034 //*********************************************************** 00035 TMeshProviderProc::~TMeshProviderProc() 00036 { 00037 } 00038 //*********************************************************** 00039 00040 //----------------------------------------------------------- 00041 void TMeshProviderProc::SetRealInput() 00042 { 00043 TGo4EventElement* myinput=GetInputEvent(); 00044 if(myinput==0 || 00045 (myinput!=0 && myinput->CheckEventSource("TGo4EventProcessor"))) 00046 { 00047 // source of our input event is processor and not file: 00048 // we have to reset the pointer from framework! 00049 // the trick is: name of this processor (up to the "_") is name of required event 00050 // note that TGo4StepFactory forbids to use same name for different objects, 00051 // since object name is used as pointer name in the processline call 00052 TString eventname=GetName(); 00053 eventname.Resize(eventname.Index("_",1)); // 00054 //cout <<"SetRealInput of"<<GetName()<<" sees eventname "<<eventname.Data() << endl; 00055 myinput=TGo4Analysis::Instance()->GetEventStructure(eventname.Data()); 00056 if(myinput==0) 00057 throw TGo4UserException(3,"Error setting real input event %s", GetName()); 00058 else 00059 SetInputEvent(myinput); 00060 } 00061 //else if(myinput!=0 && myinput->CheckEventSource("TGo4FileSource")) 00062 // { 00063 // // this provider reads from file. ok 00064 // 00065 // } 00066 //else 00067 // { 00068 // // neither processor or file input: something is very wrong 00069 // throw TGo4UserException(3,"No source found for provider %s", GetName()); 00070 // } 00071 // we skip the last checks for performance reasons... 00072 00073 } 00074 00075 //----------------------------------------------------------- 00076 ClassImp(TMeshProviderProc) 00077 00078 00079 00080 00081 //----------------------------END OF GO4 SOURCE FILE ---------------------