119 #include "StFcsDbMaker.h"
121 #include "StFcsDbPulse.h"
122 #include "St_db_Maker/St_db_Maker.h"
123 #include "StMessMgr.h"
125 #include "tables/St_fcsDetectorPosition_Table.h"
126 #include "tables/St_fcsEcalGain_Table.h"
127 #include "tables/St_fcsHcalGain_Table.h"
128 #include "tables/St_fcsPresGain_Table.h"
129 #include "tables/St_fcsEcalGainCorr_Table.h"
130 #include "tables/St_fcsHcalGainCorr_Table.h"
131 #include "tables/St_fcsPresValley_Table.h"
132 #include "tables/St_fcsEcalGainOnline_Table.h"
133 #include "tables/St_fcsHcalGainOnline_Table.h"
134 #include "tables/St_fcsPresThreshold_Table.h"
135 #include "tables/St_vertexSeed_Table.h"
140 LOG_INFO <<
"******** StFcsDbMaker::StFcsDbMaker = "<<name<<endm;
142 AddData(mFcsDb,
".const");
144 AddData(mFcsDbPulse,
".const");
147 StFcsDbMaker::~StFcsDbMaker() {
152 int StFcsDbMaker::Init(){
156 return StMaker::Init();
167 int StFcsDbMaker::InitRun(
int runNumber) {
168 LOG_INFO <<
"StFcsDbMaker::InitRun - run = " << runNumber << endm;
173 LOG_INFO <<
"StFcsDbMaker::InitRun - Date&time from St_db_Maker="<<dbmaker->GetDate()<<
","<< dbmaker->GetTime() << endm;
175 LOG_ERROR <<
"StFcsDbMaker::InitRun - No St_db_Maker"<<endm;
return kStFatal;
180 St_fcsDetectorPosition *dbFcsDetPos=0;
181 DBgeom = GetInputDB(
"Geometry/fcs");
183 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Geometry/fcs"<<endm;
185 dbFcsDetPos = (St_fcsDetectorPosition*)DBgeom ->
Find(
"fcsDetectorPosition");
188 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Geometry/fcs/fcsDetectorPosition"<<endm;
196 St_fcsEcalGain *dbFcsEcalGain =0;
197 St_fcsHcalGain *dbFcsHcalGain =0;
198 St_fcsPresGain *dbFcsPresGain =0;
199 St_fcsEcalGainCorr *dbFcsEcalGainCorr =0;
200 St_fcsHcalGainCorr *dbFcsHcalGainCorr =0;
201 St_fcsPresValley *dbFcsPresValley =0;
202 St_fcsEcalGainOnline *dbFcsEcalGainOnline =0;
203 St_fcsHcalGainOnline *dbFcsHcalGainOnline =0;
204 St_fcsPresThreshold *dbFcsPresThreshold =0;
205 DBcalib = GetInputDB(
"Calibrations/fcs");
207 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs"<<endm;
209 dbFcsEcalGain = (St_fcsEcalGain*) DBcalib->
Find(
"fcsEcalGain");
210 dbFcsHcalGain = (St_fcsHcalGain*) DBcalib->
Find(
"fcsHcalGain");
211 dbFcsPresGain = (St_fcsPresGain*) DBcalib->
Find(
"fcsPresGain");
212 dbFcsEcalGainCorr = (St_fcsEcalGainCorr*) DBcalib->
Find(
"fcsEcalGainCorr");
213 dbFcsHcalGainCorr = (St_fcsHcalGainCorr*) DBcalib->
Find(
"fcsHcalGainCorr");
214 dbFcsPresValley = (St_fcsPresValley*) DBcalib->
Find(
"fcsPresValley");
215 dbFcsEcalGainOnline = (St_fcsEcalGainOnline*)DBcalib->
Find(
"fcsEcalGainOnline");
216 dbFcsHcalGainOnline = (St_fcsHcalGainOnline*)DBcalib->
Find(
"fcsHcalGainOnline");
217 dbFcsPresThreshold = (St_fcsPresThreshold*) DBcalib->
Find(
"fcsPresThreshold");
222 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsEcalGain"<<endm;
225 mFcsDb->
setFcsEcalGain((fcsEcalGain_st*) dbFcsEcalGain->GetTable());
229 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsHcalGain"<<endm;
232 mFcsDb->
setFcsHcalGain((fcsHcalGain_st*) dbFcsHcalGain->GetTable());
236 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsPresGain"<<endm;
239 mFcsDb->
setFcsPresGain((fcsPresGain_st*) dbFcsPresGain->GetTable());
242 if(!dbFcsEcalGainCorr) {
243 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsEcalGainCorr"<<endm;
249 if(!dbFcsHcalGainCorr) {
250 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsHcalGainCorr"<<endm;
256 if(!dbFcsPresValley) {
257 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsPresValley"<<endm;
264 if(!dbFcsEcalGainOnline) {
265 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsEcalGainOnline"<<endm;
271 if(!dbFcsHcalGainOnline) {
272 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsHcalGainOnline"<<endm;
278 if(!dbFcsPresThreshold) {
279 LOG_ERROR <<
"StFcsDbMaker::InitRun - No Calibration/fcs/fcsPresThreshold"<<endm;
286 mFcsDb->InitRun(runNumber);
void setFcsEcalGainOnline(fcsEcalGainOnline_st *)
set fcsPresValley_st*
void setFcsPresGain(fcsPresGain_st *)
set fcsHcalGain_st*
void setFcsPresValley(fcsPresValley_st *)
set fcsHcalGainCorr_st*
void setFcsHcalGain(fcsHcalGain_st *)
set fcsEcalGain_st*
virtual void Clear(Option_t *option="")
User defined functions.
int Init()
Initialize object.
void setFcsHcalGainOnline(fcsHcalGainOnline_st *)
set fcsEcalGainOnline_st*
void setFcsEcalGainCorr(fcsEcalGainCorr_st *)
set fcsPresGain_st*
void Clear(Option_t *option)
User defined functions.
void setFcsEcalGain(fcsEcalGain_st *)
set fcsDetectorPosition_st*
void setFcsPresThreshold(fcsPresThreshold_st *)
set fcsHcalGainOnline_st*
void setFcsDetectorPosition(fcsDetectorPosition_st *t)
set Et Gain Setting 0=Auto from run#, 1=Old, 2=New(23027048)
void setFcsHcalGainCorr(fcsHcalGainCorr_st *)
set fcsEcalGainCorr_st*
virtual TDataSet * Find(const char *path) const