GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4CompositeEvent.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 TGO4COMPOSITEEVENT_H
15#define TGO4COMPOSITEEVENT_H
16
17#include "TGo4EventElement.h"
18
19class TObjArray;
20class TTree;
21
26 protected:
27
29 Short_t fNElements{0};
30
32 TObjArray *fEventElements{nullptr};
33
35 Short_t fMaxIndex{0};
36
37 public:
39 TGo4CompositeEvent(const char *aName, const char *aTitle, Short_t aBaseCat = 0);
40 virtual ~TGo4CompositeEvent();
41
42 TGo4EventElement *GetChild(const char *name) override;
43
44 void makeBranch(TBranch *parent) override;
45
46 Int_t activateBranch(TBranch *branch, Int_t init = 0, TGo4EventElement **var_ptr = nullptr) override;
47
48 void deactivate() override;
49 void activate() override;
50
51 Bool_t addEventElement(TGo4EventElement *aElement, Bool_t reading = kFALSE);
52
53 TTree *CreateSampleTree(TGo4EventElement **sample = nullptr) override;
54
56 TGo4EventElement *getEventElement(const char *name, Int_t final_element = 0);
57 void Clear(Option_t *opt = "") override;
58 Short_t getNElements() const { return fNElements; }
59 Short_t getMaxIndex() const { return fMaxIndex; }
60 Bool_t isComposed() override { return kTRUE; }
61 TObjArray *getElements() const { return fEventElements;}
62 TObjArray *getListOfComposites(Bool_t toplevel=kTRUE);
63 TGo4EventElement& operator[](Int_t i) override;
64
65 protected:
66
67 void ProvideArray();
68
69 ClassDefOverride(TGo4CompositeEvent,2)
70};
71
72#endif
Base type for object composition.
void Clear(Option_t *opt="") override
Bool_t isComposed() override
TGo4EventElement * GetChild(const char *name) override
TTree * CreateSampleTree(TGo4EventElement **sample=nullptr) override
TGo4EventElement & operator[](Int_t i) override
Bool_t addEventElement(TGo4EventElement *aElement, Bool_t reading=kFALSE)
TObjArray * fEventElements
Sub-Events list for this event.
TObjArray * getListOfComposites(Bool_t toplevel=kTRUE)
TGo4EventElement * getEventElement(Int_t idx)
Short_t getNElements() const
Short_t fNElements
Number of Elements in composite.
TObjArray * getElements() const
void makeBranch(TBranch *parent) override
Short_t fMaxIndex
Maximum index (i.e.
Short_t getMaxIndex() const
Int_t activateBranch(TBranch *branch, Int_t init=0, TGo4EventElement **var_ptr=nullptr) override
The abstract base class for the data elements of which the unpacked events (or detector structure dat...