KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVValues Class Reference

Detailed Description

Handle Operation on variable.

Definition at line 25 of file KVValues.h.

#include <KVValues.h>

Inheritance diagram for KVValues:

Public Member Functions

 KVValues ()
 default constructor
 
 KVValues (const Char_t *name, Int_t ordre_max=3, Int_t nbre_max=20)
 constructor
 
virtual ~KVValues ()
 destructeur
 
Bool_t Add (KVValues *val)
 
void Clear (Option_t *option="")
 
void DefineAdditionalValue (KVString name, KVString expr)
 
void FillVar (Double_t val)
 
void FillVar (Double_t val, Double_t weight)
 
Int_t GetNumberOfFilling () const
 
Int_t GetNValues (KVString opt="base") const
 
Int_t GetOrdreMax () const
 
Int_t GetShift () const
 
Double_t GetValue (const Char_t *name) const
 
Double_t GetValue (Int_t idx) const
 
TString GetValueExpression (const Char_t *name) const
 
TString GetValueExpression (Int_t idx) const
 
Int_t GetValuePosition (const Char_t *name) const
 
void Print (Option_t *option="") const
 Info("Print","%s : %d values computed",GetName(),kval_tot);.
 
void Reset ()
 
- Public Member Functions inherited from KVNameValueList
 KVNameValueList ()
 Default constructor.
 
 KVNameValueList (const Char_t *name, const Char_t *title="")
 
 KVNameValueList (const KVNameValueList &)
 Copy constructor.
 
 KVNameValueList (std::initializer_list< KVNamedParameter >)
 
virtual ~KVNameValueList ()
 Destructor.
 
void AddValue (const KVNamedParameter &p)
 
Iterator begin () const
 
virtual void ClearSelection (TRegexp &)
 
Int_t Compare (const TObject *nvl) const
 
void Copy (TObject &nvl) const
 
Iterator end () const
 
KVNamedParameterFindParameter (const Char_t *name) const
 return the parameter object with the asking name
 
KVString Get () const
 
Bool_t GetBoolValue (const Char_t *name) const
 
Bool_t GetBoolValue (Int_t idx) const
 
Double_t GetDoubleValue (const Char_t *name) const
 
Double_t GetDoubleValue (Int_t idx) const
 
Int_t GetEntries () const
 
Int_t GetIntValue (const Char_t *name) const
 
Int_t GetIntValue (Int_t idx) const
 
KVHashListGetList () const
 
const Char_tGetNameAt (Int_t idx) const
 
Int_t GetNameIndex (const Char_t *name) const
 
Int_t GetNpar () const
 return the number of stored parameters
 
KVNamedParameterGetParameter (Int_t idx) const
 return the parameter object with index idx
 
const Char_tGetStringValue (const Char_t *name) const
 
const Char_tGetStringValue (Int_t idx) const
 
TString GetTStringValue (const Char_t *name) const
 
TString GetTStringValue (Int_t idx) const
 
template<typename value_type >
value_type GetValue (const Char_t *name) const
 
template<typename value_type >
value_type GetValue (Int_t idx) const
 
ULong64_t GetValue64bit (const Char_t *name) const
 
Bool_t HasBoolParameter (const Char_t *name) const
 
Bool_t HasDoubleParameter (const Char_t *name) const
 
Bool_t HasIntParameter (const Char_t *name) const
 
Bool_t HasNumericParameter (const Char_t *name) const
 
Bool_t HasParameter (const Char_t *name) const
 
template<typename value_type >
Bool_t HasParameter (const Char_t *name) const
 
Bool_t HasStringParameter (const Char_t *name) const
 
Bool_t HasValue64bit (const Char_t *name) const
 
template<typename value_type >
void IncrementValue (const Char_t *name, value_type value)
 
Bool_t IsEmpty () const
 
Bool_t IsOwner () const
 
template<typename value_type >
Bool_t IsValue (const Char_t *name, value_type value) const
 
virtual void ls (Option_t *opt="") const
 
void Merge (const KVNameValueList &)
 
KVNameValueList operator+= (const KVNameValueList &nvl)
 
KVNameValueListoperator= (const KVNameValueList &)
 
virtual KVEnvProduceEnvFile ()
 
virtual void ReadEnvFile (const Char_t *filename)
 
void RemoveParameter (const Char_t *name)
 
bool Set (const KVString &)
 
template<typename value_type >
void SetFirstValue (const Char_t *name, value_type value)
 
void SetFromEnv (TEnv *tenv, const TString &prefix="")
 
void SetIgnoreBool (Bool_t ignore=kTRUE)
 
template<typename value_type >
void SetLastValue (const Char_t *name, value_type value)
 
void SetOwner (Bool_t enable=kTRUE)
 
template<typename value_type >
void SetValue (const Char_t *name, value_type value)
 
void SetValue (const KVNamedParameter &)
 add (or replace) a parameter with the same name, type & value as 'p'
 
void SetValue64bit (const Char_t *name, ULong64_t)
 
template<typename value_type >
void SetValueAt (const Char_t *name, value_type value, Int_t idx)
 
void Sort (Bool_t order=kSortAscending)
 
void WriteClass (const Char_t *classname, const Char_t *classdesc, const Char_t *base_class="")
 
virtual void WriteEnvFile (const Char_t *filename)
 Write all name-value pairs in this list as a TEnv format file.
 
void WriteToEnv (TEnv *tenv, const TString &prefix="")
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 
void Clear (Option_t *option="") override
 
TObjectClone (const char *newname="") const override
 
Int_t Compare (const TObject *obj) const override
 
void Copy (TObject &named) const override
 
virtual void FillBuffer (char *&buffer)
 
const char * GetName () const override
 
const char * GetTitle () const override
 
ULong_t Hash () const override
 
TClassIsA () const override
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 
TNamedoperator= (const TNamed &rhs)
 
void Print (Option_t *option="") const override
 
virtual void SetName (const char *name)
 
virtual void SetNameTitle (const char *name, const char *title)
 
virtual void SetTitle (const char *title="")
 
virtual Int_t Sizeof () const
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *vp)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, void *vp)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 

Private Member Functions

Bool_t AddFormula (KVString name, KVString expr)
 
void ComputeAdditionalValues (Int_t min=-1, Int_t max=-1)
 
void init_val ()
 protected method
 
void init_val_add ()
 protected method
 
void init_val_base ()
 
void LinkParameters (KVNumberList *nl)
 
KVNumberListTransformExpression (KVString &expr)
 

Private Attributes

Int_t kdeb
 separation entre les valeurs MIN et MAX et les valeurs moments SUMd, par defaut kdeb=2
 
KVListkform_add
 liste contenant les formules des variables additionnelle (stockees en TFormula)
 
Int_t knbre_val_max
 nombre maximum de valeurs pouvant etre calculees (argument du constructeur)
 
Int_t kordre_mom_max
 ordre maximum pour le calcul des moments (argument du constructeur)
 
KVListkpar_add
 liste contenant les liste de parametres (stockees en KVNumberList)
 
Int_t kTimesFillVarIsCalled
 nombre de fois ou la methode FillVar est appelee
 
Bool_t kToBeRecalculated
 
Int_t kval_add
 nbre de valeurs additionelles definies via la methode DefineAdditionalValue
 
Int_t kval_base
 nbre de valeurs de base definies par le constructeur, kval_base = kdeb+kordre_mom_max+1
 
Int_t kval_tot
 nbre total de valeurs definies kval_tot = kval_base+kval_add (=KVNameValueList::GetNpar())
 
Double_tvalues
 [knbre_val_max] tableau ou sont stockees les valeurs
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Constructor & Destructor Documentation

◆ KVValues() [1/2]

KVValues::KVValues ( )

default constructor

Definition at line 92 of file KVValues.cpp.

◆ KVValues() [2/2]

KVValues::KVValues ( const Char_t name,
Int_t  ordre_max = 3,
Int_t  nbre_max = 20 
)

constructor

Definition at line 102 of file KVValues.cpp.

◆ ~KVValues()

KVValues::~KVValues ( )
virtual

destructeur

Definition at line 129 of file KVValues.cpp.

Member Function Documentation

◆ Add()

Bool_t KVValues::Add ( KVValues val)

Definition at line 459 of file KVValues.cpp.

◆ AddFormula()

Bool_t KVValues::AddFormula ( KVString  name,
KVString  expr 
)
private

Definition at line 242 of file KVValues.cpp.

◆ Clear()

void KVValues::Clear ( Option_t option = "")
virtual

Reimplemented from KVNameValueList.

Definition at line 143 of file KVValues.cpp.

◆ ComputeAdditionalValues()

void KVValues::ComputeAdditionalValues ( Int_t  min = -1,
Int_t  max = -1 
)
private

Definition at line 185 of file KVValues.cpp.

◆ DefineAdditionalValue()

void KVValues::DefineAdditionalValue ( KVString  name,
KVString  expr 
)

Definition at line 211 of file KVValues.cpp.

◆ FillVar() [1/2]

void KVValues::FillVar ( Double_t  val)

Definition at line 329 of file KVValues.cpp.

◆ FillVar() [2/2]

void KVValues::FillVar ( Double_t  val,
Double_t  weight 
)

Definition at line 340 of file KVValues.cpp.

◆ GetNumberOfFilling()

Int_t KVValues::GetNumberOfFilling ( ) const

Definition at line 366 of file KVValues.cpp.

◆ GetNValues()

Int_t KVValues::GetNValues ( KVString  opt = "base") const

Definition at line 446 of file KVValues.cpp.

◆ GetOrdreMax()

Int_t KVValues::GetOrdreMax ( ) const

Definition at line 356 of file KVValues.cpp.

◆ GetShift()

Int_t KVValues::GetShift ( ) const

Definition at line 376 of file KVValues.cpp.

◆ GetValue() [1/2]

Double_t KVValues::GetValue ( const Char_t name) const

Definition at line 400 of file KVValues.cpp.

◆ GetValue() [2/2]

Double_t KVValues::GetValue ( Int_t  idx) const

Definition at line 387 of file KVValues.cpp.

◆ GetValueExpression() [1/2]

TString KVValues::GetValueExpression ( const Char_t name) const

Definition at line 421 of file KVValues.cpp.

◆ GetValueExpression() [2/2]

TString KVValues::GetValueExpression ( Int_t  idx) const

Definition at line 432 of file KVValues.cpp.

◆ GetValuePosition()

Int_t KVValues::GetValuePosition ( const Char_t name) const

Definition at line 410 of file KVValues.cpp.

◆ init_val()

void KVValues::init_val ( )
private

protected method

Definition at line 75 of file KVValues.cpp.

◆ init_val_add()

void KVValues::init_val_add ( )
private

protected method

Definition at line 57 of file KVValues.cpp.

◆ init_val_base()

void KVValues::init_val_base ( )
private

protected method Mise en correspondance du noms des differentes valeurs a calculees et de leur position dans le tableau values Ex: nom_valeurs -> id_valeurs -> values[id_valeurs]

Definition at line 20 of file KVValues.cpp.

◆ LinkParameters()

void KVValues::LinkParameters ( KVNumberList nl)
private

Definition at line 176 of file KVValues.cpp.

◆ Print()

void KVValues::Print ( Option_t option = "") const
virtual

Info("Print","%s : %d values computed",GetName(),kval_tot);.

Reimplemented from KVNameValueList.

Definition at line 163 of file KVValues.cpp.

◆ Reset()

void KVValues::Reset ( )

Definition at line 117 of file KVValues.cpp.

◆ TransformExpression()

KVNumberList * KVValues::TransformExpression ( KVString expr)
private

Definition at line 261 of file KVValues.cpp.

Member Data Documentation

◆ kdeb

Int_t KVValues::kdeb
private

separation entre les valeurs MIN et MAX et les valeurs moments SUMd, par defaut kdeb=2

Definition at line 29 of file KVValues.h.

◆ kform_add

KVList* KVValues::kform_add
private

liste contenant les formules des variables additionnelle (stockees en TFormula)

Definition at line 46 of file KVValues.h.

◆ knbre_val_max

Int_t KVValues::knbre_val_max
private

nombre maximum de valeurs pouvant etre calculees (argument du constructeur)

Definition at line 35 of file KVValues.h.

◆ kordre_mom_max

Int_t KVValues::kordre_mom_max
private

ordre maximum pour le calcul des moments (argument du constructeur)

Definition at line 36 of file KVValues.h.

◆ kpar_add

KVList* KVValues::kpar_add
private

liste contenant les liste de parametres (stockees en KVNumberList)

Definition at line 47 of file KVValues.h.

◆ kTimesFillVarIsCalled

Int_t KVValues::kTimesFillVarIsCalled
private

nombre de fois ou la methode FillVar est appelee

Definition at line 37 of file KVValues.h.

◆ kToBeRecalculated

Bool_t KVValues::kToBeRecalculated
private

Definition at line 40 of file KVValues.h.

◆ kval_add

Int_t KVValues::kval_add
private

nbre de valeurs additionelles definies via la methode DefineAdditionalValue

Definition at line 32 of file KVValues.h.

◆ kval_base

Int_t KVValues::kval_base
private

nbre de valeurs de base definies par le constructeur, kval_base = kdeb+kordre_mom_max+1

Definition at line 31 of file KVValues.h.

◆ kval_tot

Int_t KVValues::kval_tot
private

nbre total de valeurs definies kval_tot = kval_base+kval_add (=KVNameValueList::GetNpar())

Definition at line 33 of file KVValues.h.

◆ values

Double_t* KVValues::values
private

[knbre_val_max] tableau ou sont stockees les valeurs

Definition at line 38 of file KVValues.h.