GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4HistogramEntry.h
Go to the documentation of this file.
1// $Id$
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 fuer 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
24class TH1;
25class TGo4Condition;
26class 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 void Reset() override;
83
84 void Print(Option_t *opt = "") const override;
85
86 void RecursiveRemove(TObject *obj) override;
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
131 TH1 *fxHistogram{nullptr};
132
135
136 Bool_t fbNeedInitialisation{kFALSE};
137
139 TObject *fxHisEvents[__MAXHISDIM__] = { nullptr, nullptr, nullptr };
140
143 TObject *fxConEvents[__MAXCONDIM__] = { nullptr, nullptr };
144
146 Int_t fxHistType[__MAXHISDIM__] = { 0, 0, 0 };
147 void *fxHistPtr[__MAXHISDIM__] = { nullptr, nullptr, nullptr };
148
150 Int_t fxCondType[__MAXCONDIM__] = { 0, 0 };
151 void *fxCondPtr[__MAXCONDIM__] = { nullptr, nullptr };
152
154 static const char *fgcNOCONDITION;
156 static const char *fgcNODATA;
158 static const char *fgcNOEVENT;
159
160 ClassDefOverride(TGo4HistogramEntry,3)
161};
162
163#endif //TGO4HISTOGRAMENTRY_H
#define __MAXHISDIM__
#define __MAXCONDIM__
Go4 condition class.
TGo4DynamicEntry()
default ctor for streamer.
static const char * fgcNOCONDITION
Text to indicate that no condition is used.
TObject * fxHisEvents[__MAXHISDIM__]
Pointer for event objects, class does not known to entry itself.
const char * GetConVarName(Int_t ix) const
TString fxConditionName
Name of the condition to be applied for this entry.
void SetHistogramName(const char *name)
Set name of the external histogram to be filled.
void SetConVarName(Int_t ix, const char *name)
Set Name of the data value (eventclass member) that is to be tested by condition for axis number ix.
TH1 * fxHistogram
The (histogram) object kept by this entry.
Double_t GetPtrValue(Int_t type, void *ptr)
const char * GetHistogramName() const
Get name of the external histogram to be filled.
void InitHistPointer(Int_t ix, TObject *event, TDataMember *member, Long_t offset)
TObject * fxConEvents[__MAXCONDIM__]
Array of pointers to the event structure that contains the data for the condition test.
void * fxCondPtr[__MAXCONDIM__]
TString fxHisEventName[__MAXHISDIM__]
Array of names of the events which contain the data members to be filled into the x,...
TString fxConEventName[__MAXCONDIM__]
Array of names of the events which contain the data members to be tested with the x,...
static const char * Get_fgcNOCONDITION()
static const char * Get_fgcNOEVENT()
const char * GetHistEventName(Int_t ix) const
static const char * fgcNOEVENT
Text to indicate that no condition is used.
Bool_t NeedInitialisation() const
TString fxConVarName[__MAXCONDIM__]
Name of the eventstructure datamembers that shall be tested with the condition.
static const char * fgcNODATA
Text to indicate that no condition is used.
void SetConditionName(const char *name)
Set name of the external condition to be referenced.
const char * GetConEventName(Int_t ix) const
void InitCondPointer(Int_t ix, TObject *event, TDataMember *member, Long_t offset)
friend class TGo4DynamicList
const char * GetConditionName() const
void Reset() override
Resets this entry to an initial status.
void SetHisVarName(Int_t ix, const char *name)
Set Name of the data member that is to be filled in histogram for axis number ix.
TString fxHisVarName[__MAXHISDIM__]
Array of names of the x,y,z,.
TString fxHistogramName
Title of the analysis object, for example a histogram.
void SetHisEventName(Int_t ix, const char *name)
Set Name of the event object that contains the data to be filled in histogram, for axis number ix.
void ProcessNew(Bool_t *evvalid)
void SetNeedInitialisation(Bool_t on=kTRUE)
void RecursiveRemove(TObject *obj) override
void Print(Option_t *opt="") const override
const char * GetHistVarName(Int_t ix) const
void SetConEventName(Int_t ix, const char *name)
Set Name of the eventstructure object that is to be tested by the condition for axis number ix.
static const char * Get_fgcNODATA()
Int_t fxCondType[__MAXCONDIM__]
Array of pointers and data types to check condition.
void * fxHistPtr[__MAXHISDIM__]
Int_t fxHistType[__MAXHISDIM__]
Array of pointers and data types to fill histogram.
TGo4Condition * fxCondition
Condition to be checked on processing this entry.