1 #include "StFstDbMaker/StFstDbMaker.h"
2 #include "StFstDbMaker/StFstDb.h"
3 #include "St_base/StMessMgr.h"
4 #include "St_db_Maker/St_db_Maker.h"
6 #include "tables/St_Survey_Table.h"
7 #include "tables/St_fstPedNoise_Table.h"
8 #include "tables/St_fstGain_Table.h"
9 #include "tables/St_fstMapping_Table.h"
10 #include "tables/St_fstControl_Table.h"
11 #include "tables/St_fstChipConfig_Table.h"
25 Int_t StFstDbMaker::Init()
27 ToWhiteConst(
"fst_db", mFstDb);
33 Int_t StFstDbMaker::InitRun(Int_t runNumber)
37 LOG_DEBUG <<
"StFstDbMaker::InitRun() - Access data from database" << endm;
40 St_Survey *st_fstOnTpc = (St_Survey *) GetDataBase(
"Geometry/fst/fstOnTpc");
43 LOG_ERROR <<
"No relevant entry found in 'Geometry/fst/fstOnTpc' table."
44 " StFstDb object will not be created" << endm;
47 st_fstOnTpc->Print(0,1);
50 St_Survey *st_fstHssOnFst = (St_Survey *) GetDataBase(
"Geometry/fst/hssOnFst");
52 if (!st_fstHssOnFst) {
53 LOG_ERROR <<
"No relevant entry found in 'Geometry/fst/hssOnFst' table."
54 " StFstDb object will not be created" << endm;
57 st_fstHssOnFst->Print(0,1);
60 St_Survey *st_fstWedgeOnHss = (St_Survey *) GetDataBase(
"Geometry/fst/fstWedgeOnHss");
62 if (!st_fstWedgeOnHss) {
63 LOG_ERROR <<
"No relevant entry found in 'Geometry/fst/fstWedgeOnHss' table."
64 " StFstDb object will not be created" << endm;
67 st_fstWedgeOnHss->Print(0,1);
70 St_Survey *st_fstSensorOnWedge = (St_Survey *) GetDataBase(
"Geometry/fst/fstSensorOnWedge");
72 if (!st_fstSensorOnWedge) {
73 LOG_ERROR <<
"No relevant entry found in 'Geometry/fst/fstSensorOnWedge' table."
74 " StFstDb object will not be created" << endm;
77 st_fstSensorOnWedge->Print(0,1);
79 Survey_st *tables[4] = {st_fstOnTpc->GetTable(), st_fstHssOnFst->GetTable(),
80 st_fstWedgeOnHss->GetTable(), st_fstSensorOnWedge->GetTable()
82 mFstDb->setGeoHMatrices(tables);
85 St_fstPedNoise *mPedNoise = (St_fstPedNoise *) GetDataBase(
"Calibrations/fst/fstPedNoise");
88 LOG_ERROR <<
"No relevant entry found in 'Calibrations/fst/fstPedNoise' table."
89 " StFstDb object will not be created" << endm;
93 mFstDb->setPedNoise(mPedNoise->GetTable());
94 if(Debug()) mPedNoise->Print(0,1);
97 St_fstGain *mGain = (St_fstGain *) GetDataBase(
"Calibrations/fst/fstGain");
100 LOG_ERROR <<
"No relevant entry found in 'Calibrations/fst/fstGain' table."
101 " StFstDb object will not be created" << endm;
105 mFstDb->setGain(mGain->GetTable());
106 if(Debug()) mGain->Print(0,1);
108 St_fstMapping *mMapping = (St_fstMapping *) GetDataBase(
"Calibrations/fst/fstMapping");
111 LOG_ERROR <<
"No relevant entry found in 'Calibrations/fst/fstMapping' table."
112 " StFstDb object will not be created" << endm;
116 mFstDb->setMapping(mMapping->GetTable());
117 if(Debug()) mMapping->Print(0,1);
120 St_fstControl *mControl = (St_fstControl *) GetDataBase(
"Calibrations/fst/fstControl");
123 LOG_ERROR <<
"No relevant entry found in 'Calibrations/fst/fstControl' table."
124 " StFstDb object will not be created" << endm;
128 mFstDb->setControl(mControl->GetTable());
129 mControl->Print(0,1);
132 St_fstChipConfig *mChipConfig = (St_fstChipConfig *) GetDataBase(
"Calibrations/fst/fstChipConfig");
135 LOG_ERROR <<
"No relevant entry found in 'Calibrations/fst/fstChipConfig' table."
136 " StFstDb object will not be created" << endm;
140 mFstDb->setChipStatus(mChipConfig->GetTable());
141 mChipConfig->Print(0,1);
143 if ( GetDebug() >= 2)