KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVNuclDataTable.h
Go to the documentation of this file.
1 
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 
21 namespace 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 
79 class KVNuclDataTable : public TNamed {
80 
81 protected:
82 
87 
90 
92 
95 
97  {
98  return (KVNuclData*)tobj->At(current_idx);
99  }
100  void CreateTable(Int_t ntot); //Creation of the table
101  void CreateElement(Int_t idx);//a new KVNuclData pointeur is created and added
102  void InfoOnMeasured() const;
103 
104  virtual NDT::value* getNDTvalue(Int_t zz, Int_t aa) const;
105 
106 public:
107  KVNuclDataTable();
108  KVNuclDataTable(KVString classname);
109  virtual ~KVNuclDataTable();
110  void init();
111  virtual void Initialize() = 0;
112 
113  virtual void GiveIndexToNucleus(Int_t zz, Int_t aa, Int_t ntot);
114  Bool_t IsInTable(Int_t zz, Int_t aa) const;
115 
116  KVNuclData* GetData(Int_t zz, Int_t aa) const;
117  Double_t GetValue(Int_t zz, Int_t aa) const;
118  void SetValue(Int_t zz, Int_t aa, Double_t val);
119  const Char_t* GetUnit(Int_t zz, Int_t aa) const;
120  Bool_t IsMeasured(Int_t zz, Int_t aa) const;
121 
122  Int_t GetNumberOfNuclei() const;
123  const Char_t* GetReadFileName() const;
125 
126  ClassDef(KVNuclDataTable, 1) //Store information on nuclei
127 
128 };
129 
130 #endif
int Int_t
char Char_t
bool Bool_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
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;.
KVNuclData * GetCurrent() const
TObjArray* tobj_rangeA; //! array where range of A associated to each Z is stored via KVIntegerList.
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:17
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
virtual ~key()
key(int z, int a)
virtual ~value()
int Index() const
virtual void SetName(const char *name)
TObject * At(Int_t idx) const
Define key-value pair for nuclear data tables.
auto * a