GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TMeshProviderProc.cxx
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#include "TMeshProviderProc.h"
15
16#include "TGo4Log.h"
17#include "TGo4Analysis.h"
18#include "TGo4EventElement.h"
19#include "TGo4UserException.h"
20
21//***********************************************************
22// this one is used in TXXXAnlFact
25{
26 TGo4Log::Info("TMeshProviderProc: Create %s", name);
27}
28
30 : TGo4EventProcessor("ProviderProcessor")
31{
32}
33
37
38//-----------------------------------------------------------
40{
42 if (!myinput || myinput->CheckEventSource("TGo4EventProcessor")) {
43 // source of our input event is processor and not file:
44 // we have to reset the pointer from framework!
45 // the trick is: name of this processor (up to the "_") is name of required event
46 // note that TGo4StepFactory forbids to use same name for different objects,
47 // since object name is used as pointer name in the processline call
48 TString eventname = GetName();
49 eventname.Resize(eventname.Index("_", 1)); //
50 myinput = TGo4Analysis::Instance()->GetEventStructure(eventname.Data());
51 if (!myinput)
52 throw TGo4UserException(3, "Error setting real input event %s", GetName());
53 else
54 SetInputEvent(myinput);
55 }
56 // else if(myinput && myinput->CheckEventSource("TGo4FileSource"))
57 // {
58 // // this provider reads from file. ok
59 //
60 // }
61 // else
62 // {
63 // // neither processor or file input: something is very wrong
64 // throw TGo4UserException(3,"No source found for provider %s", GetName());
65 // }
66 // we skip the last checks for performance reasons...
67}
static TGo4Analysis * Instance()
return analysis instance
TGo4EventElement * GetEventStructure(const char *name) const
Search reference to event structure in folder.
Bool_t CheckEventSource(const char *classname)
Check if event source is valid.
void SetInputEvent(TGo4EventElement *raw)
Sets reference to external raw event which is used by the concrete processor to unpack the interestin...
TGo4EventProcessor(const char *name)
TGo4EventElement * GetInputEvent()
Access to external raw event which is set as association member.
friend class TGo4EventElement
static void Info(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 1.
Definition TGo4Log.cxx:294
Exception to be thrown by analysis user.
void SetRealInput()
This method will check if input event is correct and might reset the input event pointer for the subs...