GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4TreeHistogramEntry.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 TGO4TREEHISTOGRAMENTRY_H
15#define TGO4TREEHISTOGRAMENTRY_H
16
17#include "TGo4DynamicEntry.h"
18
19#include "TString.h"
20
21class TTree;
22
33
35
36 friend class TGo4DynamicList;
37
38 public:
41
42 TGo4TreeHistogramEntry(const char *histogramname,
43 const char *treename,
44 const char *varexp,
45 const char *cutexp);
46
48
50 void SetHistogramName(const char *name) { fxHistogramName = name; }
52 const char *GetHistogramName() const { return fxHistogramName.Data(); }
53
54 void SetTreeName(const char *name) { fxTreeName = name; }
55 const char *GetTreeName() const { return fxTreeName.Data(); }
56
57 void SetVarExp(const char *exp) { fxVarExp = exp; }
58 const char *GetVarExp() const { return fxVarExp.Data(); }
59
60 void SetCutExp(const char *cut) { fxCutExp = cut; }
61 const char *GetCutExp() const { return fxCutExp.Data(); }
62
63 void SetDynListInterval(Int_t value) { fiDynListInterval = value; }
64 Int_t GetDynListInterval() const { return fiDynListInterval; }
65
67 void Reset() override;
68
69 void Print(Option_t *opt = "") const override;
70
72 static const char *fgcENTRYSUF;
73
74 protected:
75 void ProcessTreeNew(TTree *tree, Int_t times);
76
77 private:
78
81
83 TString fxTreeName;
84
86 TString fxVarExp;
87
89 TString fxCutExp;
90
92
95 Bool_t fbNewHistogram{kFALSE};
96
98 Int_t fiLastEvent{0};
99
100 ClassDefOverride(TGo4TreeHistogramEntry,3)
101};
102
103#endif //TGO4TREEHISTOGRAMENTRY_H
TGo4DynamicEntry()
default ctor for streamer.
Dynamic list entry which links a histogram to a certain tree.
Bool_t fbNewHistogram
True before Process is called the first time.
TString fxTreeName
The Treename to find the tree.
const char * GetTreeName() const
void SetVarExp(const char *exp)
const char * GetHistogramName() const
Get name of the external histogram to be filled.
Int_t fiLastEvent
index of last tree entry of the previous Process() call
void SetDynListInterval(Int_t value)
const char * GetVarExp() const
TString fxVarExp
The varexp string needed by TTree:Draw()
void SetTreeName(const char *name)
TString fxHistogramName
The target histogram name to be filled.
void Print(Option_t *opt="") const override
TGo4TreeHistogramEntry()
default ctor for streamer.
const char * GetCutExp() const
void SetHistogramName(const char *name)
Set name of the external histogram to be filled.
void ProcessTreeNew(TTree *tree, Int_t times)
void Reset() override
Resets this entry to an initial status.
static const char * fgcENTRYSUF
suffix for entryname to differ from histogram name
TString fxCutExp
The selection string needed by TTree:Draw()
void SetCutExp(const char *cut)