KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVNuclDataTable.h
1
3
4#ifndef __KVNUCLDATATABLE_H
5#define __KVNUCLDATATABLE_H
6
7#include "TNamed.h"
8#include "TMap.h"
9#include "TObject.h"
10#include "TClass.h"
11#include "TObjArray.h"
12
13#include "KVString.h"
14#include "KVNuclData.h"
15
21namespace NDT {
22 class key : public TNamed {
23 public:
24 key(int z, int a)
25 {
26 SetName(Form("%d:%d", z, a));
27 };
28 virtual ~key() {};
29 ClassDef(key, 0)
30 };
31 class value : public TObject {
32 int idx;
33 public:
34 value(int i) : idx(i) {};
35 virtual ~value() {};
36 int Index() const
37 {
38 return idx;
39 };
40 ClassDef(value, 0)
41 };
42};
43
80class KVNuclDataTable : public TNamed {
81
82protected:
83
88
91
93
96
98 {
99 return (KVNuclData*)tobj->At(current_idx);
100 }
101 void CreateTable(Int_t ntot); //Creation of the table
102 void CreateElement(Int_t idx);//a new KVNuclData pointeur is created and added
103 void InfoOnMeasured() const;
104
105 virtual NDT::value* getNDTvalue(Int_t zz, Int_t aa) const;
106
107public:
109 KVNuclDataTable(KVString classname);
110 virtual ~KVNuclDataTable();
111 void init();
112 virtual void Initialize() = 0;
113
114 virtual void GiveIndexToNucleus(Int_t zz, Int_t aa, Int_t ntot);
115 Bool_t IsInTable(Int_t zz, Int_t aa) const;
116
117 KVNuclData* GetData(Int_t zz, Int_t aa) const;
118 Double_t GetValue(Int_t zz, Int_t aa) const;
119 void SetValue(Int_t zz, Int_t aa, Double_t val);
120 const Char_t* GetUnit(Int_t zz, Int_t aa) const;
121 Bool_t IsMeasured(Int_t zz, Int_t aa) const;
122
123 Int_t GetNumberOfNuclei() const;
124 const Char_t* GetReadFileName() const;
126
127 ClassDef(KVNuclDataTable, 1) //Store information on nuclei
128
129};
130
131#endif
int Int_t
bool Bool_t
char Char_t
double Double_t
#define ClassDef(name, id)
char * Form(const char *fmt,...)
Abstract base class for nuclear data table.
KVString kcomments
Commentaire provenant de la lecture fichier.
virtual void Initialize()=0
TMap * nucMap
mapping (Z,A) -> nucleus index
void SetValue(Int_t zz, Int_t aa, Double_t val)
Int_t current_idx
current index
void InfoOnMeasured() const
KVNuclData * GetCurrent() const
TObjArray* tobj_rangeA; //! array where range of A associated to each Z is stored via KVIntegerList.
KVString GetCommentsFromFile() const
Bool_t IsInTable(Int_t zz, Int_t aa) const
Returns kTRUE if there is a couple (Z,A) in the table.
Int_t GetNumberOfNuclei() const
Double_t GetValue(Int_t zz, Int_t aa) const
virtual ~KVNuclDataTable()
Destructor.
TObjArray * tobj
KVNumberList plageZ;.
KVNuclDataTable()
Default constructor.
TClass * cl
pointeur pour gerer les heritages de classes de KVNuclData
const Char_t * GetUnit(Int_t zz, Int_t aa) const
Int_t NbNuc
nbre de noyaux presents dans la table
KVNuclData * GetData(Int_t zz, Int_t aa) const
const Char_t * GetReadFileName() const
virtual NDT::value * getNDTvalue(Int_t zz, Int_t aa) const
Return NDT::value object pointer stored at map position (Z,A).
void CreateTable(Int_t ntot)
virtual void GiveIndexToNucleus(Int_t zz, Int_t aa, Int_t ntot)
Add a new entry in the table.
Bool_t IsMeasured(Int_t zz, Int_t aa) const
void CreateElement(Int_t idx)
Simple abstract class to store value related to nuclear data.
Definition KVNuclData.h:18
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition KVString.h:73
virtual ~key()
key(int z, int a)
virtual ~value()
int Index() const
virtual void SetName(const char *name)
TObject * At(Int_t idx) const override
Define key-value pair for nuclear data tables.
TArc a