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 
103  std::unique_ptr<TMethodCall> fMethod;
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:
117  {
125  }
126 
127  Double_t getvalue_char(const Char_t* name) const
128  {
130  }
131 
132 public:
133  ROOT_FULL_SET_WITH_INIT(KVVGSum, KVVarGlobMean)
134 
135  void Init();
136  void fill(const KVNucleus* c); // Filling method
137 
138  virtual TString GetValueName(Int_t i) const
139  {
146  if (i < GetNumberOfValues()) {
147  return GetNameAtListPosition(i);
148  }
149  return TString("unknown");
150  }
151 
152  ClassDef(KVVGSum, 0) //General global variable for calculating sums of various quantities
153 };
154 #endif
int Int_t
char Char_t
double Double_t
#define ClassDef(name, id)
#define BIT(n)
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:126
General global variable for calculating sums of various quantities.
Definition: KVVGSum.h:100
void fill(const KVNucleus *c)
Definition: KVVGSum.cpp:34
Double_t getvalue_char(const Char_t *name) const
Definition: KVVGSum.h:127
virtual TString GetValueName(Int_t i) const
Definition: KVVGSum.h:138
@ kMult
Definition: KVVGSum.h:107
@ kNoFrame
Definition: KVVGSum.h:110
@ kInitDone
Definition: KVVGSum.h:111
@ kSum
Definition: KVVGSum.h:108
@ kMean
Definition: KVVGSum.h:109
Double_t fVal
used to retrieve value of property for each particle
Definition: KVVGSum.h:104
void Init()
Definition: KVVGSum.cpp:52
void init(void)
Definition: KVVGSum.cpp:21
std::unique_ptr< TMethodCall > fMethod
method used to extract property of interest from particles
Definition: KVVGSum.h:103
Double_t getvalue_int(Int_t index) const
Definition: KVVGSum.h:116
TClass * fClass
class used to represent particles
Definition: KVVGSum.h:102
Abstract base class for global variables which calculate a mean value.
Definition: KVVarGlobMean.h:35
virtual Double_t getvalue_int(Int_t i) const
virtual Int_t GetNumberOfValues() const
Definition: KVVarGlob.h:638
Int_t GetNameIndex(const Char_t *name) const
Definition: KVVarGlob.cpp:254
TString GetNameAtListPosition(int pos) const
Definition: KVVarGlob.h:279
int GetIndexAtListPosition(int pos) const
Definition: KVVarGlob.h:274