Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TMeshProviderProc.cxx

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

Generated on Fri Nov 28 12:59:11 2008 for Go4-v3.04-1 by  doxygen 1.4.2