KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVVarGlob1.h
Go to the documentation of this file.
1 #ifndef KVVarGlob1_h
2 #define KVVarGlob1_h
3 #include "KVVarGlob.h"
4 
13 class KVVarGlob1: public KVVarGlob {
14 
16  void init(void)
17  {
18  var = 0;
19  }
20 
21 protected:
22  void FillVar(Double_t val)
23  {
24  var += val;
25  }
26  void SetValue(Double_t val)
27  {
28  var = val;
29  }
30  static void FillMethodBody(KVString& body, int type);
31 
33  {
34  return var;
35  }
36 
37 public:
38  KVVarGlob1() : KVVarGlob("KVVarGlob1")
39  {
40  init();
41  }
42  KVVarGlob1(const Char_t* nom) : KVVarGlob(nom)
43  {
44  init();
45  }
46  ROOT_COPY_CTOR(KVVarGlob1, KVVarGlob)
47  ROOT_COPY_ASSIGN_OP(KVVarGlob1)
48  virtual ~KVVarGlob1() {}
49 
50  void Copy(TObject& obj) const
51  {
52  KVVarGlob::Copy(obj);
53  ((KVVarGlob1&)obj).var = var;
54  }
55  void Init()
56  {
57  init();
58  }
59  void Reset()
60  {
61  init();
62  }
63 
64  static void MakeClass(const Char_t* classname,
65  const Char_t* classdesc, int type = KVVarGlob::kOneBody);
67  {
68  return 1;
69  }
70 
71  ClassDef(KVVarGlob1, 1) // Base class for global variables with one value
72 };
73 #endif
int Int_t
char Char_t
double Double_t
#define ClassDef(name, id)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
Abstract base class for global variables which calculate a single value.
Definition: KVVarGlob1.h:13
void init(void)
Definition: KVVarGlob1.h:16
void Init()
Definition: KVVarGlob1.h:55
Int_t GetNumberOfValues() const
Definition: KVVarGlob1.h:66
Double_t getvalue_int(Int_t) const
Definition: KVVarGlob1.h:32
static void MakeClass(const Char_t *classname, const Char_t *classdesc, int type=KVVarGlob::kOneBody)
Definition: KVVarGlob1.cpp:23
KVVarGlob1(const Char_t *nom)
Definition: KVVarGlob1.h:42
void SetValue(Double_t val)
Definition: KVVarGlob1.h:26
void FillVar(Double_t val)
Definition: KVVarGlob1.h:22
static void FillMethodBody(KVString &body, int type)
Definition: KVVarGlob1.cpp:63
Double_t var
the quantity to be calculated
Definition: KVVarGlob1.h:15
void Reset()
Definition: KVVarGlob1.h:59
void Copy(TObject &obj) const
Make a copy of this object.
Definition: KVVarGlob1.h:50
Base class for all global variable implementations.
Definition: KVVarGlob.h:217
void Copy(TObject &obj) const
Make a copy of this object.
Definition: KVVarGlob.h:328