Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4Event/TGo4CompositeEvent.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE 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 #ifndef TGO4COMPOSITEEVENT_H
00017 #define TGO4COMPOSITEEVENT_H
00018 
00019 #include "TGo4EventElement.h"
00020 #include "TClonesArray.h"
00021 #include "TObjArray.h"
00022 
00024 class TGo4CompositeEvent : public TGo4EventElement {
00025   protected:
00027     Short_t fNElements; 
00028     
00030     TObjArray *fEventElements; 
00031 
00032   public:
00033      TGo4CompositeEvent();
00034      TGo4CompositeEvent(const char* aName, const char* aTitle, Short_t aBaseCat=0);
00035      ~TGo4CompositeEvent();
00036 
00037      void makeBranch(TBranch *parent);
00038      void synchronizeWithTree(TTree *tree, Int_t splitLevel=0);
00039      Int_t activateBranch(TBranch *branch, Int_t splitLevel=0,Int_t init=0);
00040 
00041      virtual void deactivate();
00042      virtual void activate();
00043 
00044      void addEventElement(TGo4EventElement* aElement, Int_t reading =0);
00045      TGo4EventElement *getEventElement(Int_t idx);
00046      TGo4EventElement *getEventElement(const char* name,Int_t final=0);
00047      void Clear(Option_t *opt="");
00048      void clearAll(Int_t level);
00049      Short_t getNElements() const { return fNElements; }
00050 
00051      TObjArray* getElements(){ return fEventElements;}
00052      TObjArray* getListOfComposites(Bool_t toplevel=kTRUE);
00053      TGo4EventElement& operator[]( Int_t i ) {
00054         return *dynamic_cast<TGo4EventElement*> ((*fEventElements)[i]);
00055      }
00056 
00057   ClassDef(TGo4CompositeEvent,1)
00058 };
00059 
00060 #endif 
00061 
00062 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:53 2005 for Go4-v2.10-5 by doxygen1.2.15