KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVINDRADB.h
Go to the documentation of this file.
1 /***************************************************************************
2  kvINDRADB.h - description
3  -------------------
4  begin : 9/12 2003
5  copyright : (C) 2003 by J.D. Frankland
6  email : frankland@ganil.fr
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef KV_INDRADB_H
19 #define KV_INDRADB_H
20 
21 #include "KVExpDB.h"
22 #include "KVDataSet.h"
23 #include "KVINDRADBRun.h"
24 #include "KVDBSystem.h"
25 #include "KVDBTape.h"
26 #include "KVDetector.h"
27 #include "Riostream.h"
28 #include "TEnv.h"
29 #include "KVINDRARunListReader.h"
30 #include "KVINDRAPulserDataTree.h"
31 #include "KVNumberList.h"
32 
34 #define MAX_NUM_RUN_RANGES 100
35 
36 class KVNumberList;
37 
58 class KVINDRADB: public KVExpDB, public KVINDRARunListReader {
59 
60 private:
61 
62  std::ifstream __ifpeaks;
63 
64 protected:
65 
67 
80 
82 
83  virtual void ReadGainList();
84  virtual void ReadChIoPressures();
85  virtual void ReadCsITotalLightGainCorrections();
86  virtual void ReadChannelVolt();
87  virtual void ReadVoltEnergyChIoSi();
88  virtual void ReadLightEnergyCsI(const Char_t*, KVDBTable*);
89  virtual void ReadCalibCsI();
90  virtual void ReadPedestalList();
91 
92  virtual void ReadAbsentDetectors();
93  virtual void ReadOoODetectors();
94  virtual void ReadOoOACQParams();
95 
96 
100  std::ifstream& GetPeakFileStream()
101  {
102  return __ifpeaks;
103  };
104 
105  mutable TF1* fMeanGDir;
106  void _init_MeanGDir_func() const;
107 
108  void init();
109 
110 public:
111  KVINDRADB();
112  KVINDRADB(const Char_t* name);
113  virtual ~ KVINDRADB();
114 
115  virtual void Build();
116  virtual void cd();
117 
118  void AddTape(KVDBTape* r)
119  {
120  fTapes->AddRecord(r);
121  }
122  virtual KVDBTape* GetTape(Int_t tape) const
123  {
124  return (KVDBTape*) fTapes->GetRecord(tape);
125  }
126  virtual KVSeqCollection* GetTapes() const
127  {
128  return fTapes->GetRecords();
129  }
130 
131  virtual void GoodRunLine();
133  {
134  return (KVINDRADBRun*) GetDBRun(run);
135  }
136  void ReadNewRunList();
137 
138  KVList* GetCalibrationPeaks(Int_t run, KVDetector* detector = 0,
139  Int_t peak_type = -1, Int_t signal_type = 0,
140  Double_t peak_energy = -1.0);
141 
142  Double_t GetEventCrossSection(Int_t run, Double_t Q_apres_cible,
143  Double_t Coul_par_top = 1.e-10) const;
144  Double_t GetTotalCrossSection(Int_t run, Double_t Q_apres_cible,
145  Double_t Coul_par_top = 1.e-10) const;
147  Double_t Q_apres_cible,
148  Double_t Coul_par_top = 1.e-10) const;
150  Double_t Q_apres_cible,
151  Double_t Coul_par_top = 1.e-10) const;
153  Double_t Q_apres_cible,
154  Double_t Coul_par_top = 1.e-10) const;
156  Double_t Q_apres_cible,
157  Double_t Coul_par_top = 1.e-10) const;
158  Double_t GetEventCrossSection(const Char_t* system, Int_t Mult_trigger,
159  Double_t Q_apres_cible,
160  Double_t Coul_par_top = 1.e-10) const;
161  Double_t GetTotalCrossSection(const Char_t* system, Int_t Mult_trigger,
162  Double_t Q_apres_cible,
163  Double_t Coul_par_top = 1.e-10) const;
164  Double_t GetTotalCrossSection(TH1* events_histo, Double_t Q_apres_cible, Double_t Coul_par_top = 1.e-10);
165 
166  Double_t GetMeanGDirFreq(Int_t run) const;
167 
169  {
170  return fPulserData;
171  }
172  virtual void WriteObjects(TFile*);
173  virtual void ReadObjects(TFile*);
174 
175  virtual Double_t GetRunLengthFromGeneDirect(int run) const;
176 
177  ClassDef(KVINDRADB, 5) //DataBase of parameters for an INDRA campaign
178 };
179 
182 
183 #endif
int Int_t
#define R__EXTERN
R__EXTERN KVINDRADB * gIndraDB
........ global variable
Definition: KVINDRADB.h:181
ROOT::R::TRInterface & r
char Char_t
bool Bool_t
double Double_t
#define ClassDef(name, id)
Table in a database.
Definition: KVDBTable.h:33
virtual Bool_t AddRecord(KVDBRecord *add)
Definition: KVDBTable.cpp:74
virtual KVDBRecord * GetRecord(const Char_t *rec_name) const
Definition: KVDBTable.h:57
virtual KVSeqCollection * GetRecords() const
Definition: KVDBTable.h:62
Database entry describing a data storage tape used to store raw data.
Definition: KVDBTape.h:24
Base class for detector geometry description, interface to energy-loss calculations.
Definition: KVDetector.h:121
Base class to describe database of an experiment ,.
Definition: KVExpDB.h:18
KVDBRun * GetDBRun(Int_t number) const
Definition: KVExpDB.h:74
Database entry for each run of an INDRA experiment.
Definition: KVINDRADBRun.h:29
DataBase of parameters for an INDRA campaign.
Definition: KVINDRADB.h:58
KVDBTable * fOoODet
(optional) Liste les detecteurs hors service
Definition: KVINDRADB.h:78
void CloseCalibrationPeakFile()
Close file containing database of calibration peaks.
Definition: KVINDRADB.cpp:406
virtual void cd()
Definition: KVINDRADB.cpp:105
virtual KVSeqCollection * GetTapes() const
Definition: KVINDRADB.h:126
virtual void ReadObjects(TFile *)
Read associated objects (i.e. KVINDRAPulserDataTree's TTree) from file.
Definition: KVINDRADB.cpp:1160
void AddTape(KVDBTape *r)
Definition: KVINDRADB.h:118
KVDBTable * fChanVolt
ChIo/Si channel-volt calibration parameters.
Definition: KVINDRADB.h:73
Double_t GetEventCrossSection(Int_t run, Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
Definition: KVINDRADB.cpp:658
std::ifstream __ifpeaks
ifstream for calibration peaks file
Definition: KVINDRADB.h:62
virtual void GoodRunLine()
Definition: KVINDRADB.cpp:989
KVDBTable * fLitEnerCsI
CsI light-energy calibration for Z>1.
Definition: KVINDRADB.h:75
virtual void ReadOoOACQParams()
Definition: KVINDRADB.cpp:1947
Double_t GetTotalCrossSection(Int_t run, Double_t Q_apres_cible, Double_t Coul_par_top=1.e-10) const
Definition: KVINDRADB.cpp:675
void _init_MeanGDir_func() const
Definition: KVINDRADB.cpp:419
virtual void ReadChannelVolt()
Definition: KVINDRADB.cpp:1343
KVINDRAPulserDataTree * GetPulserData()
Definition: KVINDRADB.h:168
KVDBTable * fAbsentDet
(optional) Liste les detecteurs absents
Definition: KVINDRADB.h:77
void ReadNewRunList()
Read new-style runlist (written using KVDBRun v.10 or later)
Definition: KVINDRADB.cpp:947
std::ifstream & GetPeakFileStream()
Definition: KVINDRADB.h:100
Bool_t OpenCalibrationPeakFile()
calibration peaks database
Definition: KVINDRADB.cpp:384
virtual void ReadPedestalList()
Definition: KVINDRADB.cpp:1615
virtual void ReadGainList()
Read the file listing any detectors whose gain value changes during exeriment.
Definition: KVINDRADB.cpp:437
KVDBTable * fCsILumCorr
table of CsI gain corrections for total light output
Definition: KVINDRADB.h:71
virtual void WriteObjects(TFile *)
Write associated objects (i.e. KVINDRAPulserDataTree's TTree) in file.
Definition: KVINDRADB.cpp:1148
KVDBTable * fOoOACQPar
(optional) Liste des parametres d acquisition ne marchant pas
Definition: KVINDRADB.h:79
KVINDRAPulserDataTree * fPulserData
mean values of pulsers for all detectors & runs
Definition: KVINDRADB.h:81
virtual void ReadVoltEnergyChIoSi()
Definition: KVINDRADB.cpp:1526
virtual void ReadOoODetectors()
Definition: KVINDRADB.cpp:1899
KVList * GetCalibrationPeaks(Int_t run, KVDetector *detector=0, Int_t peak_type=-1, Int_t signal_type=0, Double_t peak_energy=-1.0)
Definition: KVINDRADB.cpp:151
virtual KVDBTape * GetTape(Int_t tape) const
Definition: KVINDRADB.h:122
TF1 * fMeanGDir
mean frequency of GENE_DIRECT vs. run number
Definition: KVINDRADB.h:103
void init()
Definition: KVINDRADB.cpp:49
virtual void ReadCsITotalLightGainCorrections()
Definition: KVINDRADB.cpp:1231
KVDBTable * fPedestals
table of pedestal files
Definition: KVINDRADB.h:72
KVDBTable * fVoltMeVChIoSi
ChIo/Si volt-energy calibration.
Definition: KVINDRADB.h:74
KVDBTable * fGains
(optional) table of detector gains, in case they change from run to run
Definition: KVINDRADB.h:69
virtual void ReadLightEnergyCsI(const Char_t *, KVDBTable *)
Definition: KVINDRADB.cpp:1704
virtual void ReadAbsentDetectors()
Definition: KVINDRADB.cpp:1852
virtual void ReadChIoPressures()
Definition: KVINDRADB.cpp:538
virtual Double_t GetRunLengthFromGeneDirect(int run) const
Definition: KVINDRADB.cpp:1174
Double_t GetMeanGDirFreq(Int_t run) const
Definition: KVINDRADB.cpp:874
KVINDRADBRun * GetRun(Int_t run) const
Definition: KVINDRADB.h:132
virtual void ReadCalibCsI()
Definition: KVINDRADB.cpp:1686
KVDBTable * fTapes
table of data tapes
Definition: KVINDRADB.h:70
KVDBTable * fChIoPressures
General information.
Definition: KVINDRADB.h:68
KVDBTable * fLitEnerCsIZ1
CsI light-energy calibration for Z=1.
Definition: KVINDRADB.h:76
virtual ~ KVINDRADB()
virtual void Build()
Definition: KVINDRADB.cpp:893
Handles TTree with mean pulser data for every run.
Utitlity base class for reading INDRA runlist files.
Extended TList class which owns its objects by default.
Definition: KVList.h:27
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
KaliVeda extensions to ROOT collection classes.