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