62 cout <<
"Setting parameters of INDRA array for run " << run <<
":" <<
66 Error(
"SetParameters(UInt_t)",
"Run %u not found in database!", run);
72 CheckStatusOfDetectors(kvrun);
73 SetChIoPressures(kvrun);
75 if (!physics_parameters_only) {
77 SetCalibrationParameters(run);
78 SetIdentificationParameters(run);
102 cout <<
"Setting calibration parameters of INDRA array for run " << run <<
":" <<
106 Error(
"SetParameters(UInt_t)",
"Run %u not found in database!", run);
110 TIter next(fArray->GetDetectors());
121 SetCalibParameters(kvrun);
135 cout <<
"--> Setting Trigger:" << endl;
137 cout <<
" M>=" << (
Int_t)GetINDRA()->GetTrigger() << endl;
152 TIter next(fArray->GetDetectors());
156 Int_t ndet_absent = 0;
218 Info(
"KVINDRAUpDater",
"%d detecteurs absents", ndet_absent);
219 Info(
"KVINDRAUpDater",
"%d detecteurs ne fonctionnent pas", ndet_ooo);
220 Info(
"KVINDRAUpDater",
"%d parametres d acquisition ne fonctionnent pas", nacq_ooo);
240 TIter next(fArray->GetDetectors());
248 cout <<
"--> Setting Gains:" << endl;
250 cout <<
" Setting gains for " << ndets <<
" detectors : " << endl;
251 for (
int i = 0; i < ndets; i++) {
253 kvd = fArray->GetDetector(dbps->
GetName());
256 cout <<
" " << kvd->
GetName() <<
" : G=" << kvd->
260 Error(
"SetGains",
"le detecteur %s n ext pas present", dbps->
GetName());
306 TIter next_ps(param_list);
309 Error(
"SetChIoPressures",
310 "fArray->GetListOfChIo() returns null list pointer");
313 cout <<
"--> Setting ChIo pressures" << endl;
314 TIter next_chio(chios);
316 cout <<
" Ring 2/3: " << kvps->
317 GetPressure(
CHIO_2_3) <<
"mbar" << endl;
318 cout <<
" Ring 4/5: " << kvps->
319 GetPressure(
CHIO_4_5) <<
"mbar" << endl;
320 cout <<
" Ring 6/7: " << kvps->
321 GetPressure(
CHIO_6_7) <<
"mbar" << endl;
322 cout <<
" Ring 8/12: " << kvps->
323 GetPressure(
CHIO_8_12) <<
"mbar" << endl;
324 cout <<
" Ring 13/17: " << kvps->
326 while ((kvd = (
KVChIo*) next_chio())) {
327 if (!strcmp(kvd->
GetType(),
"CI")) {
369 TIter next_ps(param_list);
377 str.Remove(
str.Sizeof() - 4, 3);
378 kvd = fArray->GetDetector(
str.Data());
380 Warning(
"SetChVoltParameters(UInt_t)",
"Dectector %s not found !",
385 Warning(
"SetChVoltParameters(UInt_t)",
386 "Calibrator %s %s not found !", kvps->
GetName(),
416 TIter next_ps(param_list);
420 kvd = fArray->GetDetector(kvps->
GetName());
430 Warning(
"SetVoltEnergyParameters(UInt_t)",
431 "Calibrator %s %s not found !", kvps->
GetName(),
450 SetChVoltParameters(run);
451 SetVoltEnergyChIoSiParameters(run);
452 SetLitEnergyCsIParameters(run);
453 SetCsIGainCorrectionParameters(run);
466 SetChIoSiPedestals(kvrun);
467 SetCsIPedestals(kvrun);
489 TIter next_csi(GetINDRA()->GetListOfCsI());
503 TIter next_ps(param_list);
513 if (
a) csi = (
KVCsI*)
a->GetDetector();
516 Warning(
"SetCsIGainCorrectionParameters",
517 "Cannot find detector associated with %s", dbps->
GetName());
538 if (param_list && param_list->
GetSize()) {
543 TIter next_ps(param_list);
548 kvd = fArray->GetDetector(
str.Data());
550 Warning(
"SetLitEnergyCsIParameters(UInt_t)",
551 "Dectector %s not found !",
str.Data());
555 Warning(
"SetLitEnergyCsIParameters(UInt_t)",
556 "Calibrator %s %s not found ! - it will be created",
569 param_list = kvrun->
GetLinks(
"Light-Energy CsI Z>1");
571 if (!param_list || !param_list->
GetSize()) {
580 TIter next_ps2(param_list);
583 kvd = fArray->GetDetector(
str.Data());
585 Warning(
"SetLitEnergyCsIParameters(UInt_t)",
586 "Dectector %s not found !",
str.Data());
590 Warning(
"SetLitEnergyCsIParameters(UInt_t)",
591 "Calibrator %s %s not found ! - it will be created",
614 if (!kvrun->
GetKey(
"Pedestals"))
621 ifstream file_pied_chiosi;
624 GetName(), file_pied_chiosi, fDataSet.Data())) {
625 Error(
"SetPedestals",
"Problem opening file %s",
629 cout <<
"--> Setting Pedestals" << endl;
630 cout <<
" ChIo/Si/Etalons: " << kvrun->
GetKey(
"Pedestals")->
631 GetLinks()->At(0)->
GetName() << endl;
635 for (
int i = 5; i; i--) {
636 line.ReadLine(file_pied_chiosi);
639 int cou, mod,
type, n_phys, n_gene;
640 float ave_phys, sig_phys, ave_gene, sig_gene;
642 while (file_pied_chiosi.good()) {
644 file_pied_chiosi >> cou >> mod >>
type >> n_phys >> ave_phys >>
645 sig_phys >> n_gene >> ave_gene >> sig_gene;
697 file_pied_chiosi.close();
707 if (!kvrun->
GetKey(
"Pedestals"))
715 ifstream file_pied_csi;
718 GetName(), file_pied_csi, fDataSet.Data())) {
719 Error(
"SetPedestals",
"Problem opening file %s",
723 cout <<
"--> Setting Pedestals" << endl;
724 cout <<
" CsI : " << kvrun->
GetKey(
"Pedestals")->
725 GetLinks()->At(1)->
GetName() << endl;
727 int cou, mod,
type, n_phys, n_gene;
728 float ave_phys, sig_phys, ave_gene, sig_gene;
732 for (
int i = 5; i; i--) {
733 line.ReadLine(file_pied_csi);
736 while (file_pied_csi.good()) {
738 file_pied_csi >> cou >> mod >>
type >> n_phys >> ave_phys >> sig_phys
739 >> n_gene >> ave_gene >> sig_gene;
761 file_pied_csi.close();
794 cout <<
"--> Setting Si pulse height defect parameters (Moulton)" << endl;
802 Error(
"SetPHDs",
"TEnv::ReadFile != 0, cannot read PHD file");
805 TIter next_si(GetINDRA()->GetListOfSi());
820 GetINDRA()->PHDSet();
823 Error(
"SetPHDs",
"File %s not found", phdfile.
Data());
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
void AbstractMethod(const char *method)
char * Form(const char *fmt,...)
GANIL VXI/VME acquisition parameter.
void SetWorking(Bool_t on=kTRUE)
Base class for KaliVeda framework.
const Char_t * GetType() const
static Bool_t SearchKVFile(const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
Base class for all detector calibrations.
Int_t GetNumberParams() const
void SetParameter(int i, Double_t par_val) const
void SetStatus(Bool_t ready)
Ionisation chamber detectors of the INDRA multidetector array.
virtual Double_t GetPressure() const
virtual void SetPressure(Double_t P)
CsI(Tl) scintillation detectors of the INDRA multidetector array.
CHIO pressure parameters.
virtual Float_t GetPressure(UInt_t chio_number)
virtual KVRList * GetLinks() const
return the list of cross-referenced objects
To store calibration parameters in a database ,.
Double_t GetParameter(UShort_t i=0) const
virtual KVDBKey * GetKey(const Char_t *key) const
virtual KVRList * GetLinks(const Char_t *key) const
Returns the list of records linked to this record in table "key".
Description of an experimental run in database ,.
Base class for detector geometry description, interface to energy-loss calculations.
virtual void SetPedestal(const Char_t *, Float_t)
Set value of pedestal associated to parameter with given name.
KVList * GetListOfCalibrators() const
void SetDetecting(Bool_t yes=kTRUE)
virtual Bool_t IsDetecting() const
KVCalibrator * GetCalibrator(const Char_t *name, const Char_t *type) const
KVList * GetACQParamList() const
virtual Bool_t IsPresent() const
void SetGain(Double_t gain)
void SetPresent(Bool_t yes=kTRUE)
KVDBRun * GetDBRun(Int_t number) const
virtual TString GetDBEnv(const Char_t *) const
UInt_t GetRingNumber() const
Class implementing necessary methods for setting INDRA parameters for each run, using information sto...
virtual void SetVoltEnergyChIoSiParameters(KVDBRun *)
virtual void SetChIoPressures(KVDBRun *)
virtual void SetCsIPedestals(KVDBRun *)
virtual void SetPHDs(KVDBRun *)
virtual void SetPedestals(KVDBRun *)
Set pedestals for this run.
virtual void SetChVoltParameters(KVDBRun *)
virtual void SetGains(KVDBRun *)
virtual void SetTrigger(KVDBRun *)
Set trigger used during this run.
virtual void CheckStatusOfDetectors(KVDBRun *)
Check status (present, working) of each detector for run.
virtual void SetCalibParameters(KVDBRun *)
Override in child classes to set specific calibrations.
virtual void SetLitEnergyCsIParameters(KVDBRun *)
Setting Light- Energy CsI calibration parameters for Z=1.
virtual void SetParameters(UInt_t run, Bool_t physics_parameters_only=kFALSE)
virtual void SetCsIGainCorrectionParameters(KVDBRun *)
virtual void SetCalibrationParameters(UInt_t)
virtual void SetChIoSiPedestals(KVDBRun *)
read Chio-Si-Etalons pedestals
INDRA multidetector array geometry.
Wrapper for TRefArray adding some functionality.
virtual Int_t GetSize() const
virtual KVBase * FindObject(const Char_t *name, const Char_t *type) const
KaliVeda extensions to ROOT collection classes.
Silicon detectors of the INDRA array.
void SetMoultonPHDParameters(Double_t a1, Double_t a2, Double_t b1, Double_t b2)
virtual const char * GetValue(const char *name, const char *dflt) const
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
virtual const char * GetName() const
virtual const char * GetTitle() const
virtual const char * GetName() const
TObject * At(Int_t idx) const
const char * Data() const