GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4CompositeEvent.h
Go to the documentation of this file.
1 // $Id: TGo4CompositeEvent.h 1488 2015-06-08 11:32:46Z linev $
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 für 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 TGO4COMPOSITEEVENT_H
15 #define TGO4COMPOSITEEVENT_H
16 
17 #include "TGo4EventElement.h"
18 
19 class TObjArray;
20 class TTree;
21 
24  protected:
25 
27  Short_t fNElements;
28 
30  TObjArray *fEventElements;
31 
33  Short_t fMaxIndex;
34 
35  public:
37  TGo4CompositeEvent(const char* aName, const char* aTitle, Short_t aBaseCat=0);
38  virtual ~TGo4CompositeEvent();
39 
40  virtual TGo4EventElement* GetChild(const char* name);
41 
42  virtual void makeBranch(TBranch *parent);
43 
44  virtual Int_t activateBranch(TBranch *branch, Int_t init = 0, TGo4EventElement** var_ptr = 0);
45 
46  virtual void deactivate();
47  virtual void activate();
48 
49  Bool_t addEventElement(TGo4EventElement* aElement, Bool_t reading = kFALSE);
50 
51  virtual TTree* CreateSampleTree(TGo4EventElement** sample = 0);
52 
54  TGo4EventElement *getEventElement(const char* name,Int_t final=0);
55  void Clear(Option_t *opt="");
56  Short_t getNElements() const { return fNElements; }
57  Short_t getMaxIndex() const { return fMaxIndex; }
58  virtual Bool_t isComposed() { return kTRUE; }
59  TObjArray* getElements() { return fEventElements;}
60  TObjArray* getListOfComposites(Bool_t toplevel=kTRUE);
61  TGo4EventElement& operator[]( Int_t i );
62 
63  protected:
64 
65  void ProvideArray();
66 
67 
68  ClassDef(TGo4CompositeEvent,2)
69 };
70 
71 #endif
void Clear(Option_t *opt="")
virtual void makeBranch(TBranch *parent)
virtual TGo4EventElement * GetChild(const char *name)
Short_t getNElements() const
Bool_t addEventElement(TGo4EventElement *aElement, Bool_t reading=kFALSE)
TObjArray * getListOfComposites(Bool_t toplevel=kTRUE)
TObjArray * fEventElements
TGo4EventElement & operator[](Int_t i)
TGo4EventElement * getEventElement(Int_t idx)
virtual Bool_t isComposed()
virtual Int_t activateBranch(TBranch *branch, Int_t init=0, TGo4EventElement **var_ptr=0)
Short_t getMaxIndex() const
virtual TTree * CreateSampleTree(TGo4EventElement **sample=0)
TObjArray * getElements()