KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVNuclData.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Wed Feb 23 10:21:20 2011
2 //Author: bonnet
3 
4 #include "KVNuclData.h"
5 #include "Riostream.h"
6 
7 using namespace std;
8 
10 
11 
12 
15 KVNuclData::KVNuclData(const Char_t* name, const Char_t* units): fName(name), fUnits(units)
16 {
17  //Constructor with name & units
18  init();
19 
20 }
21 
22 
23 
26 
28 {
29  // Copy constructor
30  o.Copy(*this);
31 }
32 
33 
34 
37 
38 KVNuclData::KVNuclData(): fName(), fUnits("NONE")
39 {
40  // Default constructor
41  init();
42 }
43 
44 
45 
48 
50 {
51  // Destructor
52 }
53 
54 
55 
58 
59 void KVNuclData::Copy(TObject& object) const
60 {
61  // Copy this to object
62  TObject::Copy(object);
63  KVNuclData& nd = (KVNuclData&)object;
64  nd.kValue = kValue;
65  nd.fName = fName;
66  nd.fUnits = fUnits;
67  nd.SetMeasured(IsMeasured());
68 }
69 
70 
71 
73 
75 {
76 
78  SetValue(0);
79 }
80 
81 
82 
83 
85 
87 {
88 
89  return fName.Data();
90 
91 }
92 
93 
94 
96 
98 {
99 
100  kValue = val;
101 
102 }
103 
104 
105 
107 
109 {
110 
111  return kValue;
112 
113 }
114 
115 
116 
118 
120 {
121 
122  TString post = " ";
123  if (!IsMeasured()) post += "(SYST)";
124 
125  cout << ClassName() << " : " << GetName() << " " << GetValue() << " " << GetUnit() << " " << post.Data() << endl;
126 }
127 
128 
129 
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char Char_t
const Bool_t kFALSE
double Double_t
const char Option_t
Simple abstract class to store value related to nuclear data.
Definition: KVNuclData.h:17
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
virtual const char * ClassName() const
virtual void Copy(TObject &object) const
const char * Data() const