KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVElementDensity.cpp
1//Created by KVClassFactory on Thu Sep 27 17:23:23 2012
2//Author: John Frankland,,,
3
4#include "KVElementDensity.h"
5
7
8
9
11
13{
14 // Default constructor
15 fIsGas = kFALSE;
16 fUnits = "g/cm**3";
17}
18
19
20
21
24
26{
27 // Default constructor
28 fIsGas = kFALSE;
29}
30
31
32
33
40
42{
43 // Copy constructor
44 // This ctor is used to make a copy of an existing object (for example
45 // when a method returns an object), and it is always a good idea to
46 // implement it.
47 // If your class allocates memory in its constructor(s) then it is ESSENTIAL :-)
48
49 obj.Copy(*this);
50}
51
52
53
56
58{
59 // Destructor
60}
61
62
63
64
72
74{
75 // This method copies the current state of 'this' object into 'obj'
76 // You should add here any member variables, for example:
77 // (supposing a member variable KVElementDensity::fToto)
78 // CastedObj.fToto = fToto;
79 // or
80 // CastedObj.SetToto( GetToto() );
81
83 KVElementDensity& CastedObj = (KVElementDensity&)obj;
84 CastedObj.fZ = fZ;
85 CastedObj.fElementName = fElementName;
86 CastedObj.fSymbol = fSymbol;
87 CastedObj.fIsGas = fIsGas;
88}
89
90
91
93
95{
96 printf("Atomic element: %s (%s) Z=%d. Density=%f %s",
98 if (IsGas()) printf(" (gas)");
99 printf("\n");
100}
101
102
103
char Char_t
constexpr Bool_t kFALSE
const char Option_t
char name[80]
Atomic element with name, symbol and density.
Int_t GetZ() const
const Char_t * GetElementName() const
const Char_t * GetElementSymbol() const
void Print(Option_t *o="") const
void Copy(TObject &) const
Bool_t IsGas() const
virtual ~KVElementDensity()
Destructor.
KVElementDensity()
Default constructor.
Simple abstract class to store value related to nuclear data.
Definition KVNuclData.h:18
Double_t GetValue() const
const Char_t * GetUnit() const
Definition KVNuclData.h:51
void Copy(TObject &object) const
Copy this to object.
ClassImp(TPyArg)