GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4CompositeProcessor.h
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 #ifndef TGO4COMPOSITEPROCESSOR_H
15 #define TGO4COMPOSITEPROCESSOR_H
16 
17 #include "TGo4EventProcessor.h"
18 
19 #include "TObjArray.h"
20 
21 class TGo4MbsEvent;
22 class TGo4MbsSubEvent;
23 class TGo4CompositeEvent;
24 
26  public:
27 
29 
30  TGo4CompositeProcessor(const char *name);
31 
32  virtual ~TGo4CompositeProcessor();
33 
34  /* Can be overwritten by subclass, but is not recommended! use ProcessEvent or ProcessSubevent instead*/
35  Bool_t BuildEvent(TGo4EventElement *) override;
36 
37  /* implemented by subclass to assign correct event structures*/
38  void InitEvent(TGo4EventElement *) override {}
39 
40  /* implemented by subclass to do actual processing. For second step processors!*/
41  void FinalizeEvent() override {}
42 
43  /* implemented by subclass to process incoming subevent. For first step processors only! */
44  virtual void ProcessSubevent(TGo4MbsSubEvent *subevt);
45 
47  Short_t GetTriggerNumber() const { return fMbsTriggerNumber; }
48 
50  Int_t GetEventNumber() const { return fMbsEventNumber; }
51 
52  protected:
53 
55 
56  TGo4MbsEvent *fMbsInput{nullptr};
57  Short_t fMbsTriggerNumber{0};
58  Int_t fMbsEventNumber{0};
59 
60  private:
61  TObjArray fSubProcessors;
62 
63  ClassDefOverride(TGo4CompositeProcessor,1)
64 };
65 
66 #endif
67 
void InitEvent(TGo4EventElement *) override
virtual void ProcessSubevent(TGo4MbsSubEvent *subevt)
void AddSubProcessor(TGo4EventProcessor *)
Bool_t BuildEvent(TGo4EventElement *) override