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

/Go4Event/TGo4EventElement.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 TGO4EVENTELEMENT_H
00017 #define TGO4EVENTELEMENT_H
00018 
00019 #include <iostream.h>
00020 
00021 #include "TNamed.h"
00022 #include "TBranch.h"
00023 
00024 #include "Go4Log/TGo4Log.h"
00025 #include "Go4Exceptions/Go4Exceptions.h"
00026 
00027 R__EXTERN TTree *gTree;
00028 
00029 class TGo4EventSource;
00030 class TGo4EventDataIndex;
00031 class TGo4CompositeEvent;
00032 
00045 class TGo4EventElement : public TNamed {
00046 public:
00047 
00048    TGo4EventElement(void);
00049 
00050    TGo4EventElement(const char* name);
00051    TGo4EventElement(const char* aName, const char* aTitle, Short_t aBaseCat=0);
00052 
00053    virtual ~TGo4EventElement(void);
00054 
00056    void SetValid(Bool_t on) { fbIsValid=on; }
00057 
00059    Bool_t IsValid() const { return fbIsValid; }
00060 
00062    void SetEventSource(TGo4EventSource * src) { fxEventSource=src; }
00063 
00065    void SetParent(TGo4EventElement * par) { fxParent=par; }
00066 
00067    TGo4EventElement* GetParent() const { return fxParent; }
00068 
00069    TGo4EventSource * GetEventSource() const { return fxEventSource; }
00070 
00075    Bool_t CheckEventSource(const char* classname);
00076 
00079    virtual Char_t GetDataChar(TGo4EventDataIndex * index);
00080 
00083    virtual Short_t GetDataShort(TGo4EventDataIndex * index);
00084 
00087    virtual Int_t GetDataInt(TGo4EventDataIndex* index);
00088 
00091    virtual Long_t GetDataLong(TGo4EventDataIndex * index);
00092 
00095    virtual Float_t GetDataFloat(TGo4EventDataIndex * index);
00096 
00099    virtual Double_t GetDataDouble(TGo4EventDataIndex * index);
00100 
00108    virtual Int_t Fill() { return 0; }
00109 
00113    virtual Int_t Init() { SetValid(kTRUE); return 0; }
00114 
00117    virtual void PrintEvent();
00118 
00119    virtual TGo4CompositeEvent* getSubEventElement() { return 0; }
00120    virtual void makeBranch(TBranch *parent);
00121    virtual Int_t activateBranch(TBranch *branch,Int_t splitLevel, Int_t init=0);
00122    virtual void deactivate();
00123    virtual void activate();
00124 
00125    virtual void Clear(Option_t *t="");
00126    virtual void clearAll(Int_t ){;}
00127    virtual Bool_t isComposed() { return isComposite;}
00128    virtual Short_t getId() { return fIdentifier;}
00129    virtual void setDebug (Bool_t debug) { fDebug=debug;}
00130    virtual TGo4EventElement& operator[](Int_t){ return *this; }
00131 
00132   private:
00133 
00136    Bool_t fbIsValid;
00137    
00140    TGo4EventElement * fxParent; 
00141 
00148    TGo4EventSource * fxEventSource; 
00149 
00150   protected:
00151     Short_t fIdentifier; // Identifier
00152     Bool_t isComposite; // Compositeness
00153     Bool_t isActivated; 
00154     Bool_t fDebug; 
00155 
00156   ClassDef(TGo4EventElement,1)
00157 };
00158 
00159 #endif //TGO4EVENTELEMENT_H
00160 
00161 //----------------------------END OF GO4 SOURCE FILE ---------------------

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