Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TGO4HISTOGRAMENTRY_H
00015 #define TGO4HISTOGRAMENTRY_H
00016
00017 #include "TGo4DynamicEntry.h"
00018 #include "TString.h"
00019
00020
00021 #define __MAXHISDIM__ 3
00022 #define __MAXCONDIM__ 2
00023
00024 class TH1;
00025 class TGo4Condition;
00026 class TDataMember;
00027
00033 class TGo4HistogramEntry : public TGo4DynamicEntry {
00034
00035 friend class TGo4DynamicList;
00036
00037 public:
00038
00039 TGo4HistogramEntry();
00040
00041 TGo4HistogramEntry(const char* name);
00042
00043 virtual ~TGo4HistogramEntry();
00044
00046 void SetHistogramName(const char* name) { fxHistogramName = name; }
00048 const char* GetHistogramName() const { return fxHistogramName.Data(); }
00049
00053 void SetHisVarName(Int_t ix, const char* name);
00054 const char* GetHistVarName(Int_t ix) const;
00055
00059 void SetHisEventName(Int_t ix, const char* name);
00060 const char* GetHistEventName(Int_t ix) const;
00061
00063 void SetConditionName(const char* name) { fxConditionName = name; }
00064 const char* GetConditionName() const { return fxConditionName.Data(); }
00065
00069 void SetConVarName(Int_t ix, const char* name);
00070 const char* GetConVarName(Int_t ix) const;
00071
00075 void SetConEventName(Int_t ix, const char* name);
00076 const char* GetConEventName(Int_t ix) const;
00077
00078 Bool_t NeedInitialisation() const { return fbNeedInitialisation; }
00079 void SetNeedInitialisation(Bool_t on = kTRUE) { fbNeedInitialisation = on; }
00080
00082 virtual void Reset();
00083
00084 virtual void Print(Option_t* dummy = "") const;
00085
00086 virtual void RecursiveRemove(TObject* obj);
00087
00088 static const char* Get_fgcNOCONDITION();
00089
00090 static const char* Get_fgcNODATA();
00091
00092 static const char* Get_fgcNOEVENT();
00093
00094 protected:
00095
00096 void InitHistPointer(Int_t ix, TObject* event, TDataMember* member, Long_t offset);
00097
00098 void InitCondPointer(Int_t ix, TObject* event, TDataMember* member, Long_t offset);
00099
00100 Double_t GetPtrValue(Int_t type, void* ptr);
00101
00102 Bool_t TestConditionNew();
00103
00104 void ProcessNew(Bool_t* evvalid);
00105
00106 private:
00107
00109 TString fxHistogramName;
00110
00112 TString fxHisVarName[__MAXHISDIM__];
00113
00116 TString fxHisEventName[__MAXHISDIM__];
00117
00119 TString fxConditionName;
00120
00123 TString fxConVarName[__MAXCONDIM__];
00124
00128 TString fxConEventName[__MAXCONDIM__];
00129
00130
00132 TH1* fxHistogram;
00133
00135 TGo4Condition* fxCondition;
00136
00137 Bool_t fbNeedInitialisation;
00138
00140 TObject* fxHisEvents[__MAXHISDIM__];
00141
00144 TObject* fxConEvents[__MAXCONDIM__];
00145
00147 Int_t fxHistType[__MAXHISDIM__];
00148 void* fxHistPtr[__MAXHISDIM__];
00149
00151 Int_t fxCondType[__MAXCONDIM__];
00152 void* fxCondPtr[__MAXCONDIM__];
00153
00155 static const char* fgcNOCONDITION;
00157 static const char* fgcNODATA;
00159 static const char* fgcNOEVENT;
00160
00161 ClassDef(TGo4HistogramEntry,3)
00162 };
00163
00164 #endif //TGO4HISTOGRAMENTRY_H