Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4HistogramEntry.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 TGO4HISTOGRAMENTRY_H
00017 #define TGO4HISTOGRAMENTRY_H
00018 
00019 #include "TGo4DynamicEntry.h"
00020 #include "TString.h"
00021 
00022 /* maximum dimension  of histogram processable in dynamic list */
00023 #define __MAXHISDIM__ 3
00024 #define __MAXCONDIM__ 2
00025 
00026 class TH1;
00027 class TGo4Condition;
00028 class TDataMember;
00029 
00035 class TGo4HistogramEntry : public TGo4DynamicEntry {
00036 
00037      friend class TGo4DynamicList;
00038 
00039    public:
00040 
00041       TGo4HistogramEntry();
00042 
00043       TGo4HistogramEntry(const char* name);
00044 
00045       virtual ~TGo4HistogramEntry();
00046 
00048       void SetHistogramName(const char* name) { fxHistogramName = name; }
00050       const char* GetHistogramName() const { return fxHistogramName.Data(); }
00051 
00055       void SetHisVarName(Int_t ix, const char* name);
00056       const char* GetHistVarName(Int_t ix) const;
00057 
00061       void SetHisEventName(Int_t ix, const char* name);
00062       const char* GetHistEventName(Int_t ix) const;
00063 
00065       void SetConditionName(const char* name) { fxConditionName = name; }
00066       const char* GetConditionName() const { return fxConditionName.Data(); }
00067 
00071       void SetConVarName(Int_t ix, const char* name);
00072       const char* GetConVarName(Int_t ix) const;
00073 
00077       void SetConEventName(Int_t ix, const char* name);
00078       const char* GetConEventName(Int_t ix) const;
00079 
00080       Bool_t NeedInitialisation() const { return fbNeedInitialisation; }
00081       void SetNeedInitialisation(Bool_t on = kTRUE) { fbNeedInitialisation = on; }
00082 
00084       virtual void Reset();
00085 
00086       virtual void Print(Option_t* dummy = "") const;
00087 
00088       virtual void RecursiveRemove(TObject* obj);
00089 
00090       static const char* Get_fgcNOCONDITION();
00091 
00092       static const char* Get_fgcNODATA();
00093 
00094       static const char* Get_fgcNOEVENT();
00095 
00096    protected:
00097 
00098       void InitHistPointer(Int_t ix, TObject* event, TDataMember* member, Long_t offset);
00099 
00100       void InitCondPointer(Int_t ix, TObject* event, TDataMember* member, Long_t offset);
00101 
00102       Double_t GetPtrValue(Int_t type, void* ptr);
00103 
00104       Bool_t TestConditionNew();
00105 
00106       void ProcessNew(Bool_t* evvalid);
00107 
00108    private:
00109 
00111     TString fxHistogramName;
00112 
00114     TString fxHisVarName[__MAXHISDIM__];
00115 
00118     TString fxHisEventName[__MAXHISDIM__];
00119 
00121     TString fxConditionName;
00122 
00125     TString fxConVarName[__MAXCONDIM__];
00126 
00130     TString fxConEventName[__MAXCONDIM__];
00131 
00132 
00134     TH1* fxHistogram; 
00135 
00137     TGo4Condition* fxCondition;                  
00138 
00139     Bool_t fbNeedInitialisation;  
00140 
00142     TObject* fxHisEvents[__MAXHISDIM__]; 
00143 
00146     TObject* fxConEvents[__MAXCONDIM__]; 
00147 
00149     Int_t fxHistType[__MAXHISDIM__]; 
00150     void* fxHistPtr[__MAXHISDIM__]; 
00151 
00153     Int_t fxCondType[__MAXCONDIM__]; 
00154     void* fxCondPtr[__MAXCONDIM__]; 
00155 
00157     static const char* fgcNOCONDITION;
00159     static const char* fgcNODATA;
00161     static const char* fgcNOEVENT;
00162 
00163   ClassDef(TGo4HistogramEntry,3)
00164 };
00165 
00166 #endif //TGO4HISTOGRAMENTRY_H
00167 
00168 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:07 2008 for Go4-v3.04-1 by  doxygen 1.4.2