10#include "KVINDRADB_e503.h"
11#include "KVDBParameterSet.h"
23 fDeltaPed = AddTable(
"DeltaPedestal",
"Pedestal correction value of detectors");
86 Warning(
"ReadVamosScalers",
"VAMOS scalers file not found : %s",
90 Info(
"ReadVamosScalers",
"Reading in Vamos Scaler file : %s",
106 sscanf(sline.
Data(),
"%30s %d ", Crunnumber, &irun);
109 for (
Int_t i = 0; i < 5; i++) {
113 sscanf(sline.
Data(),
"%20s %f ", str, &NormVamos);
114 idb->Set(str, NormVamos);
117 sscanf(sline.
Data(),
"%20s %f ", str, &NormScaler);
118 idb->Set(str, NormScaler);
121 sscanf(sline.
Data(),
"%20s %f ", str, &DT);
126 for (
Int_t i = 0; i < 40; i++) {
128 sscanf(sline.
Data(),
"%s %d ", str, &ScalerValue);
129 idb->SetScaler(str, ScalerValue);
151 Warning(
"VamosBrhoAngle",
"VAMOS Brho and angle file not found : %s",
156 Info(
"ReadVamosBrhoAngle",
"Reading in VamosBrho and angle file : %s",
166 sscanf(sline.
Data(),
"%d %f %f ", &run, &Brho, &theta);
174 idb->Set(
"Brho", Brho);
175 idb->Set(
"Theta", theta);
201 Warning(
"ReadPedestalCorrection",
"Pedestal correction file not found : %s",
205 Info(
"ReadPedestalCorrection",
"Reading in pedestal correction file : %s",
245 Double_t Dped = -1., Dgene = -1., Dbruit = -1.;
247 while (ifile.good()) {
257 numQDC = sline.
Atoi();
265 while (!sline.
End()) {
271 Dped = ((Dgene > 20) || !strcmp(signal.
Data(),
"GG") ? Dbruit : Dgene);
272 if (Dped > 20)
Warning(
"ReadDeltaPedestal",
"DeltaPed>20 for runs %s, signal %s", runs.
GetList(), signal.
Data());
274 parname.
Form(
"QDC%.2d", numQDC);
298 Error(
"ReadPedestalList()",
"Could not open file %s",
302 Info(
"ReadPedestalList()",
"Reading pedestal file list...");
305 Char_t filename_chio[80], filename_csi[80], filename_etalons[80];
314 if (
line.BeginsWith(
'+')) {
319 (
line.Data(),
"Run Range : %u %u", &runlist[0][0],
320 &runlist[0][1]) != 2) {
321 Warning(
"ReadPedestalList()",
"Format problem in line \n%s",
326 sscanf(
line.Data(),
"%s", filename_chio);
329 sscanf(
line.Data(),
"%s", filename_csi);
332 sscanf(
line.Data(),
"%s", filename_etalons);
336 dummy =
new KVDBRecord(filename_chio,
"ChIo/Si pedestals");
337 dummy->
AddKey(
"Runs",
"Runs for which to use this pedestal file");
340 dummy =
new KVDBRecord(filename_csi,
"CsI pedestals");
341 dummy->
AddKey(
"Runs",
"Runs for which to use this pedestal file");
344 dummy =
new KVDBRecord(filename_etalons,
"Si75/SiLi pedestals");
345 dummy->
AddKey(
"Runs",
"Runs for which to use this pedestal file");
352 cout <<
"Pedestals Read" << endl;
To store calibration parameters in a database ,.
void SetParameter(UShort_t i, Double_t val)
Record folder for the database.
virtual Bool_t AddKey(KVDBKey *key, Bool_t check=kTRUE)
virtual Bool_t AddRecord(KVDBRecord *add)
TString GetCalibFileName(const Char_t *type) const
virtual void LinkListToRunRanges(TList *list, UInt_t rr_number, UInt_t run_ranges[][2])
Link the records contained in the list to the set of runs (see LinkRecordToRunRanges).
virtual void LinkRecordToRunRange(KVDBRecord *rec, UInt_t first_run, UInt_t last_run)
Bool_t OpenCalibFile(const Char_t *type, std::ifstream &fs) const
Database entry for each run of an INDRA experiment.
Database for INDRA-VAMOS experiments E503 & E494S (2007)
virtual ~KVINDRADB_e503()
Destructor.
virtual void ReadPedestalList()
virtual void ReadPedestalCorrection()
KVINDRADB_e503()
Default constructor.
virtual void ReadVamosScalers()
virtual void ReadVamosBrhoAndAngle()
virtual void ReadDeltaPedestal(ifstream &ifile)
DataBase of parameters for an INDRA campaign.
KVINDRADBRun * GetRun(Int_t run) const
KVDBTable * fPedestals
table of pedestal files
Strings used to represent a set of ranges of values.
const Char_t * GetList() const
void SetList(const TString &)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
virtual void Remove(TObject *obj)
void Add(TObject *obj) override
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual Int_t Sizeof() const
void Form(const char *fmt,...)
TString & Remove(EStripType s, char c)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
std::istream & ReadLine(std::istream &str, Bool_t skipWhite=kTRUE)