KaliVeda
Toolkit for HIC analysis
KVValues.h
1 
4 #ifndef __KVVALUES_H
5 #define __KVVALUES_H
6 
7 #include "TNamed.h"
8 #include "TMath.h"
9 #include "TFormula.h"
10 
11 #include "KVString.h"
12 #include "KVNameValueList.h"
13 
14 
15 class KVNumberList;
16 class KVList;
17 
25 class KVValues : public KVNameValueList {
26 
27 protected:
28 
30 
34 
39 
41 
42  /*
43  kform_add et kpar_add sont remplies en parallele et permettent le calcul des variables
44  additionnelles
45  */
48 
49 
50  void init_val_base();
51  void init_val_add();
52  void init_val();
53 
54  void ComputeAdditionalValues(Int_t min = -1, Int_t max = -1);
55  void LinkParameters(KVNumberList* nl);
56  Bool_t AddFormula(KVString name, KVString expr);
58 
59 public:
60 
61  KVValues();
62  KVValues(const Char_t* name, Int_t ordre_max = 3, Int_t nbre_max = 20);
63  virtual ~KVValues();
64 
65  void Reset();
66  void Clear(Option_t* option = "");
67  void Print(Option_t* option = "") const;
68 
69  void FillVar(Double_t val);
70  void FillVar(Double_t val, Double_t weight);
71 
72  Int_t GetOrdreMax() const;
73  Int_t GetNumberOfFilling() const;
74  Int_t GetShift() const;
75 
76  Double_t GetValue(Int_t idx) const;
77 
78  Double_t GetValue(const Char_t* name) const;
79  Int_t GetValuePosition(const Char_t* name) const;
80 
81  TString GetValueExpression(const Char_t* name) const;
82  TString GetValueExpression(Int_t idx) const;
83 
84  Int_t GetNValues(KVString opt = "base") const;
85 
86  void DefineAdditionalValue(KVString name, KVString expr);
87 
88  Bool_t Add(KVValues* val);
89 
90  ClassDef(KVValues, 1) //Handle Operation on variable
91 
92 };
93 
94 #endif
int Int_t
bool Bool_t
char Char_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Extended TList class which owns its objects by default.
Definition: KVList.h:28
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
Handle Operation on variable.
Definition: KVValues.h:25
Int_t kval_tot
nbre total de valeurs definies kval_tot = kval_base+kval_add (=KVNameValueList::GetNpar())
Definition: KVValues.h:33
void Clear(Option_t *option="")
Definition: KVValues.cpp:143
Int_t GetNValues(KVString opt="base") const
Definition: KVValues.cpp:446
Bool_t Add(KVValues *val)
Definition: KVValues.cpp:459
KVNumberList * TransformExpression(KVString &expr)
Definition: KVValues.cpp:261
Int_t kdeb
separation entre les valeurs MIN et MAX et les valeurs moments SUMd, par defaut kdeb=2
Definition: KVValues.h:29
KVList * kpar_add
liste contenant les liste de parametres (stockees en KVNumberList)
Definition: KVValues.h:47
void FillVar(Double_t val)
Definition: KVValues.cpp:329
void Reset()
Definition: KVValues.cpp:117
void LinkParameters(KVNumberList *nl)
Definition: KVValues.cpp:176
void DefineAdditionalValue(KVString name, KVString expr)
Definition: KVValues.cpp:211
Int_t GetShift() const
Definition: KVValues.cpp:376
Double_t GetValue(Int_t idx) const
Definition: KVValues.cpp:387
KVValues()
default constructor
Definition: KVValues.cpp:92
Int_t GetValuePosition(const Char_t *name) const
Definition: KVValues.cpp:410
Int_t kordre_mom_max
ordre maximum pour le calcul des moments (argument du constructeur)
Definition: KVValues.h:36
void init_val_base()
Definition: KVValues.cpp:20
Bool_t kToBeRecalculated
Definition: KVValues.h:40
TString GetValueExpression(const Char_t *name) const
Definition: KVValues.cpp:421
Bool_t AddFormula(KVString name, KVString expr)
Definition: KVValues.cpp:242
KVList * kform_add
liste contenant les formules des variables additionnelle (stockees en TFormula)
Definition: KVValues.h:46
Int_t GetNumberOfFilling() const
Definition: KVValues.cpp:366
virtual ~KVValues()
destructeur
Definition: KVValues.cpp:129
Int_t kval_base
nbre de valeurs de base definies par le constructeur, kval_base = kdeb+kordre_mom_max+1
Definition: KVValues.h:31
void init_val_add()
protected method
Definition: KVValues.cpp:57
Int_t kTimesFillVarIsCalled
nombre de fois ou la methode FillVar est appelee
Definition: KVValues.h:37
void Print(Option_t *option="") const
Info("Print","%s : %d values computed",GetName(),kval_tot);.
Definition: KVValues.cpp:163
void init_val()
protected method
Definition: KVValues.cpp:75
Int_t GetOrdreMax() const
Definition: KVValues.cpp:356
Int_t kval_add
nbre de valeurs additionelles definies via la methode DefineAdditionalValue
Definition: KVValues.h:32
void ComputeAdditionalValues(Int_t min=-1, Int_t max=-1)
Definition: KVValues.cpp:185
Int_t knbre_val_max
nombre maximum de valeurs pouvant etre calculees (argument du constructeur)
Definition: KVValues.h:35
Double_t * values
[knbre_val_max] tableau ou sont stockees les valeurs
Definition: KVValues.h:38