GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4HistogramEntry.h
Go to the documentation of this file.
1 // $Id: TGo4HistogramEntry.h 1494 2015-06-08 15:33:53Z linev $
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 für 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 TGO4HISTOGRAMENTRY_H
15 #define TGO4HISTOGRAMENTRY_H
16 
17 #include "TGo4DynamicEntry.h"
18 #include "TString.h"
19 
20 /* maximum dimension of histogram processable in dynamic list */
21 #define __MAXHISDIM__ 3
22 #define __MAXCONDIM__ 2
23 
24 class TH1;
25 class TGo4Condition;
26 class TDataMember;
27 
34 
35  friend class TGo4DynamicList;
36 
37  public:
38 
40 
41  TGo4HistogramEntry(const char* name);
42 
43  virtual ~TGo4HistogramEntry();
44 
46  void SetHistogramName(const char* name) { fxHistogramName = name; }
48  const char* GetHistogramName() const { return fxHistogramName.Data(); }
49 
53  void SetHisVarName(Int_t ix, const char* name);
54  const char* GetHistVarName(Int_t ix) const;
55 
59  void SetHisEventName(Int_t ix, const char* name);
60  const char* GetHistEventName(Int_t ix) const;
61 
63  void SetConditionName(const char* name) { fxConditionName = name; }
64  const char* GetConditionName() const { return fxConditionName.Data(); }
65 
69  void SetConVarName(Int_t ix, const char* name);
70  const char* GetConVarName(Int_t ix) const;
71 
75  void SetConEventName(Int_t ix, const char* name);
76  const char* GetConEventName(Int_t ix) const;
77 
78  Bool_t NeedInitialisation() const { return fbNeedInitialisation; }
79  void SetNeedInitialisation(Bool_t on = kTRUE) { fbNeedInitialisation = on; }
80 
82  virtual void Reset();
83 
84  virtual void Print(Option_t* = "") const;
85 
86  virtual void RecursiveRemove(TObject* obj);
87 
88  static const char* Get_fgcNOCONDITION();
89 
90  static const char* Get_fgcNODATA();
91 
92  static const char* Get_fgcNOEVENT();
93 
94  protected:
95 
96  void InitHistPointer(Int_t ix, TObject* event, TDataMember* member, Long_t offset);
97 
98  void InitCondPointer(Int_t ix, TObject* event, TDataMember* member, Long_t offset);
99 
100  Double_t GetPtrValue(Int_t type, void* ptr);
101 
102  Bool_t TestConditionNew();
103 
104  void ProcessNew(Bool_t* evvalid);
105 
106  private:
107 
110 
113 
117 
120 
124 
129 
130 
132  TH1* fxHistogram;
133 
136 
138 
141 
145 
149 
153 
155  static const char* fgcNOCONDITION;
157  static const char* fgcNODATA;
159  static const char* fgcNOEVENT;
160 
161  ClassDef(TGo4HistogramEntry,3)
162 };
163 
164 #endif //TGO4HISTOGRAMENTRY_H
Double_t GetPtrValue(Int_t type, void *ptr)
static const char * Get_fgcNOCONDITION()
void SetNeedInitialisation(Bool_t on=kTRUE)
static const char * fgcNOEVENT
void * fxCondPtr[__MAXCONDIM__]
void SetConditionName(const char *name)
virtual void Print(Option_t *="") const
static const char * fgcNODATA
Int_t fxCondType[__MAXCONDIM__]
#define __MAXHISDIM__
TString fxConVarName[__MAXCONDIM__]
void SetConEventName(Int_t ix, const char *name)
const char * GetConVarName(Int_t ix) const
void SetHistogramName(const char *name)
static const char * fgcNOCONDITION
void InitCondPointer(Int_t ix, TObject *event, TDataMember *member, Long_t offset)
virtual void RecursiveRemove(TObject *obj)
TObject * fxConEvents[__MAXCONDIM__]
const char * GetHistVarName(Int_t ix) const
void SetHisEventName(Int_t ix, const char *name)
Bool_t NeedInitialisation() const
void * fxHistPtr[__MAXHISDIM__]
const char * GetHistogramName() const
Int_t fxHistType[__MAXHISDIM__]
TString fxHisVarName[__MAXHISDIM__]
#define __MAXCONDIM__
static const char * Get_fgcNODATA()
TString fxConEventName[__MAXCONDIM__]
const char * GetConditionName() const
TObject * fxHisEvents[__MAXHISDIM__]
void SetConVarName(Int_t ix, const char *name)
void InitHistPointer(Int_t ix, TObject *event, TDataMember *member, Long_t offset)
const char * GetConEventName(Int_t ix) const
const char * GetHistEventName(Int_t ix) const
void ProcessNew(Bool_t *evvalid)
TString fxHisEventName[__MAXHISDIM__]
static const char * Get_fgcNOEVENT()
TGo4Condition * fxCondition
void SetHisVarName(Int_t ix, const char *name)