KaliVeda
Toolkit for HIC analysis
KVVGSum.h
1 /*
2 $Id: KVVGSum.h,v 1.2 2009/01/23 15:25:52 franklan Exp $
3 $Revision: 1.2 $
4 $Date: 2009/01/23 15:25:52 $
5 */
6 
9 
10 #ifndef __KVVGSUM_H
11 #define __KVVGSUM_H
12 
13 #include "KVVarGlobMean.h"
14 #include "TMethodCall.h"
15 #include "TROOT.h"
16 #include "TClass.h"
17 
100 class KVVGSum: public KVVarGlobMean {
101 
102  TClass* fClass;
103  std::unique_ptr<TMethodCall> fMethod;
104  Double_t fVal;
105 
106  enum {
107  kMult = BIT(14), //set in "mult" mode
108  kSum = BIT(15), //set in "sum" mode
109  kMean = BIT(16), //set in "mean" mode
110  kNoFrame = BIT(17), //set if property to be calculated is independent of reference frame
111  kInitDone = BIT(18) //set if Init() has been called
112  };
113  void init(void);
114 
115 protected:
116  Double_t getvalue_int(Int_t index) const override
117  {
124  return KVVarGlobMean::getvalue_int(GetIndexAtListPosition(index));
125  }
126 
127  Double_t getvalue_char(const Char_t* name) const override
128  {
129  return KVVarGlobMean::getvalue_int(GetNameIndex(name));
130  }
131 
132 public:
133  ROOT_FULL_SET_WITH_INIT(KVVGSum, KVVarGlobMean)
134 
135  void Init() override;
136  void fill(const KVNucleus* c) override; // Filling method
137 
138  TString GetValueName(Int_t i) const override
139  {
146  if (i < GetNumberOfValues()) {
147  return GetNameAtListPosition(i);
148  }
149  return TString("unknown");
150  }
151 
152  ClassDefOverride(KVVGSum, 0) //General global variable for calculating sums of various quantities
153 };
154 #endif
int Int_t
#define c(i)
char Char_t
double Double_t
#define BIT(n)
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
char name[80]
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
General global variable for calculating sums of various quantities.
Definition: KVVGSum.h:100
void Init() override
Definition: KVVGSum.cpp:52
void fill(const KVNucleus *c) override
Definition: KVVGSum.cpp:34
TString GetValueName(Int_t i) const override
Definition: KVVGSum.h:138
Abstract base class for global variables which calculate a mean value.
Definition: KVVarGlobMean.h:35
virtual Int_t GetNumberOfValues() const
Definition: KVVarGlob.h:638
Int_t GetNameIndex(const Char_t *name) const
Definition: KVVarGlob.cpp:254