KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVNuclData.cpp
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
7using namespace std;
8
10
11
12
14
15KVNuclData::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
38KVNuclData::KVNuclData(): fName(), fUnits("NONE")
39{
40 // Default constructor
41 init();
42}
43
44
45
48
50{
51 // Destructor
52}
53
54
55
58
59void 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;
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
char Char_t
constexpr Bool_t kFALSE
double Double_t
const char Option_t
Simple abstract class to store value related to nuclear data.
Definition KVNuclData.h:18
void SetValue(Double_t val)
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
Double_t kValue
numerical value
Definition KVNuclData.h:20
Double_t GetValue() const
void init()
const Char_t * GetUnit() const
Definition KVNuclData.h:51
virtual ~KVNuclData()
Destructor.
void SetMeasured(Bool_t measured)
Definition KVNuclData.h:56
KVNuclData()
Default constructor.
void Copy(TObject &object) const
Copy this to object.
virtual void Print(Option_t *option="") const
virtual const char * ClassName() const
virtual void Copy(TObject &object) const
const char * Data() const
void init()
ClassImp(TPyArg)