3 #include "StIstDbMaker/StIstDbMaker.h"
4 #include "StIstDbMaker/StIstDb.h"
5 #include "St_base/StMessMgr.h"
6 #include "St_db_Maker/St_db_Maker.h"
8 #include "tables/St_Survey_Table.h"
9 #include "tables/St_istPedNoise_Table.h"
10 #include "tables/St_istGain_Table.h"
11 #include "tables/St_istMapping_Table.h"
12 #include "tables/St_istControl_Table.h"
13 #include "tables/St_istChipConfig_Table.h"
14 #include "tables/St_istSimPar_Table.h"
28 Int_t StIstDbMaker::Init()
30 ToWhiteConst(
"ist_db", mIstDb);
36 Int_t StIstDbMaker::InitRun(Int_t runNumber)
40 LOG_DEBUG <<
"StIstDbMaker::InitRun() - Access data from database" << endm;
43 St_Survey *st_idsOnTpc = (St_Survey *) GetDataBase(
"Geometry/ist/idsOnTpc");
46 LOG_ERROR <<
"No relevant entry found in 'Geometry/ist/idsOnTpc' table."
47 " StIstDb object will not be created" << endm;
50 st_idsOnTpc->Print(0,1);
53 St_Survey *st_pstOnIds = (St_Survey *) GetDataBase(
"Geometry/ist/pstOnIds");
56 LOG_ERROR <<
"No relevant entry found in 'Geometry/ist/pstOnIds' table."
57 " StIstDb object will not be created" << endm;
60 st_pstOnIds->Print(0,1);
63 St_Survey *st_istOnPst = (St_Survey *) GetDataBase(
"Geometry/ist/istOnPst");
66 LOG_ERROR <<
"No relevant entry found in 'Geometry/ist/istOnPst' table."
67 " StIstDb object will not be created" << endm;
70 st_istOnPst->Print(0,1);
73 St_Survey *st_istLadderOnIst = (St_Survey *) GetDataBase(
"Geometry/ist/istLadderOnIst");
75 if (!st_istLadderOnIst) {
76 LOG_ERROR <<
"No relevant entry found in 'Geometry/ist/istLadderOnIst' table."
77 " StIstDb object will not be created" << endm;
80 st_istLadderOnIst->Print(0,1);
83 St_Survey *st_istSensorOnLadder = (St_Survey *) GetDataBase(
"Geometry/ist/istSensorOnLadder");
85 if (!st_istSensorOnLadder) {
86 LOG_ERROR <<
"No relevant entry found in 'Geometry/ist/istSensorOnLadder' table."
87 " StIstDb object will not be created" << endm;
90 st_istSensorOnLadder->Print(0,1);
92 Survey_st *tables[5] = {st_idsOnTpc->GetTable(), st_pstOnIds->GetTable(), st_istOnPst->GetTable(),
93 st_istLadderOnIst->GetTable(), st_istSensorOnLadder->GetTable()
95 mIstDb->setGeoHMatrices(tables);
98 St_istPedNoise *mPedNoise = (St_istPedNoise *) GetDataBase(
"Calibrations/ist/istPedNoise");
101 LOG_ERROR <<
"No relevant entry found in 'Calibrations/ist/istPedNoise' table."
102 " StIstDb object will not be created" << endm;
106 mIstDb->setPedNoise(mPedNoise->GetTable());
107 if(Debug()) mPedNoise->Print(0,1);
110 St_istGain *mGain = (St_istGain *) GetDataBase(
"Calibrations/ist/istGain");
113 LOG_ERROR <<
"No relevant entry found in 'Calibrations/ist/istGain' table."
114 " StIstDb object will not be created" << endm;
118 mIstDb->setGain(mGain->GetTable());
119 if(Debug()) mGain->Print(0,1);
121 St_istMapping *mMapping = (St_istMapping *) GetDataBase(
"Calibrations/ist/istMapping");
124 LOG_ERROR <<
"No relevant entry found in 'Calibrations/ist/istMapping' table."
125 " StIstDb object will not be created" << endm;
129 mIstDb->setMapping(mMapping->GetTable());
130 if(Debug()) mMapping->Print(0,1);
133 St_istControl *mControl = (St_istControl *) GetDataBase(
"Calibrations/ist/istControl");
136 LOG_ERROR <<
"No relevant entry found in 'Calibrations/ist/istControl' table."
137 " StIstDb object will not be created" << endm;
141 mIstDb->setControl(mControl->GetTable());
142 mControl->Print(0,1);
145 St_istChipConfig *mChipConfig = (St_istChipConfig *) GetDataBase(
"Calibrations/ist/istChipConfig");
148 LOG_ERROR <<
"No relevant entry found in 'Calibrations/ist/istChipConfig' table."
149 " StIstDb object will not be created" << endm;
153 mIstDb->setChipStatus(mChipConfig->GetTable());
154 mChipConfig->Print(0,1);
157 St_istSimPar *istSimPar = (St_istSimPar *)GetDataBase(
"Calibrations/ist/istSimPar");
159 mIstDb->setIstSimPar(istSimPar->GetTable());
162 LOG_WARN <<
"InitRun : No access to istSimPar table, abort IST reconstruction" << endm;
165 istSimPar->Print(0,1);
167 if ( GetDebug() >= 2)