KaliVeda
Toolkit for HIC analysis
KVNuclData.h
1 
4 #ifndef __KVNUCLDATA_H
5 #define __KVNUCLDATA_H
6 
7 #include "TObject.h"
8 #include "TString.h"
9 #include "KVConfig.h"
10 
18 class KVNuclData : public TObject {
19 protected:
23 
24  void init();
25  /*
26  TObject's bits can be used as flags, bits 0 - 13 and 24-31 are
27  reserved as global bits while bits 14 - 23 can be used in different
28  */
29  enum EStatusBits {
30  kMeasured = BIT(14)
31  };
32 
33 
34 public:
35  KVNuclData();
36  KVNuclData(const Char_t* name, const Char_t* units = "NONE");
37  KVNuclData(const KVNuclData&);
38  ROOT_COPY_ASSIGN_OP(KVNuclData)
39  virtual ~KVNuclData();
40  void Copy(TObject& object) const;
41 
42  void SetName(TString name)
43  {
44  fName = name;
45  }
46  const Char_t* GetName() const;
47 
48  void SetValue(Double_t val);
49  Double_t GetValue() const;
50 
51  const Char_t* GetUnit() const
52  {
53  return fUnits;
54  }
55 
56  void SetMeasured(Bool_t measured)
57  {
58  SetBit(kMeasured, measured);
59  }
61  {
62  return TestBit(kMeasured);
63  }
64 
65  virtual void Print(Option_t* option = "") const;
66 
67 
68  ClassDef(KVNuclData, 2) //Simple abstract class to store value related to nuclear data
69 };
70 
71 #endif
bool Bool_t
char Char_t
double Double_t
const char Option_t
#define ClassDef(name, id)
#define BIT(n)
char name[80]
Simple abstract class to store value related to nuclear data.
Definition: KVNuclData.h:18
void SetName(TString name)
Definition: KVNuclData.h:42
void SetValue(Double_t val)
Definition: KVNuclData.cpp:97
Bool_t IsMeasured() const
Definition: KVNuclData.h:60
TString fUnits
units (if any)
Definition: KVNuclData.h:22
TString fName
name of the object
Definition: KVNuclData.h:21
const Char_t * GetName() const
Definition: KVNuclData.cpp:86
Double_t kValue
numerical value
Definition: KVNuclData.h:20
Double_t GetValue() const
Definition: KVNuclData.cpp:108
void init()
Definition: KVNuclData.cpp:74
const Char_t * GetUnit() const
Definition: KVNuclData.h:51
virtual ~KVNuclData()
Destructor.
Definition: KVNuclData.cpp:49
void SetMeasured(Bool_t measured)
Definition: KVNuclData.h:56
KVNuclData()
Default constructor.
Definition: KVNuclData.cpp:38
void Copy(TObject &object) const
Copy this to object.
Definition: KVNuclData.cpp:59
virtual void Print(Option_t *option="") const
Definition: KVNuclData.cpp:119
void SetBit(UInt_t f)
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const