60 #include "St_spa_Maker.h"
61 #include "TDataSetIter.h"
64 #include "StMessMgr.h"
66 #include "StSsdUtil/StSsdBarrel.hh"
67 #include "StSsdPointMaker/StSsdPointMaker.h"
68 #include "tables/St_spa_strip_Table.h"
69 #include "tables/St_sls_strip_Table.h"
70 #include "tables/St_ssdDimensions_Table.h"
71 #include "tables/St_sdm_calib_par_Table.h"
72 #include "tables/St_slsCtrl_Table.h"
73 #include "tables/St_sdm_calib_db_Table.h"
74 #include "tables/St_ssdStripCalib_Table.h"
75 #include "tables/St_ssdWafersPosition_Table.h"
76 #include "StSsdDbMaker/StSsdDbMaker.h"
83 St_spa_Maker::~St_spa_Maker(){}
85 Int_t St_spa_Maker::Init(){
88 TDataSet *ssdparams = GetInputDB(
"svt/ssd");
91 m_condition = (St_sdm_condition_db *)local(
"sdm_condition_db");
92 return StMaker::Init();
95 Int_t St_spa_Maker::InitRun(Int_t runnumber){
96 m_noise = (St_ssdStripCalib*) GetDataBase(
"Calibrations/ssd/ssdStripCalib");
98 m_ctrl = gStSsdDbMaker->GetSlsCtrl();
100 LOG_ERROR <<
"No access to control parameters" << endm;
108 if (Debug()==
true) {LOG_DEBUG <<
"Make() ..." << endm;}
112 St_sls_strip *sls_strip = (St_sls_strip *)GetDataSet(
"sls_strip/.data/sls_strip");
114 St_spa_strip *spa_strip =
new St_spa_strip(
"spa_strip",40000);
119 LOG_INFO<<
"#################################################"<<endm;
120 LOG_INFO<<
"#### START OF SSD PEDESTAL ANNIHILATOR ####"<<endm;
121 LOG_INFO<<
"#### SSD BARREL INITIALIZATION ####"<<endm;
124 mySsd->readStripFromTable(sls_strip);
125 LOG_INFO<<
"#### NUMBER OF SLS STRIPS "<<sls_strip->GetNRows()<<
" ####"<<endm;
126 Int_t numberOfNoise = 0;
129 LOG_INFO<<
"#### NUMBER OF DB ENTRIES "<<numberOfNoise<<
" ####"<<endm;
131 LOG_ERROR<<
"m_noise is missing" <<endm;
134 mySsd->readConditionDbFromTable(m_condition);
135 LOG_INFO<<
"#### ADD SPA NOISE ####"<<endm;
137 LOG_ERROR<<
"m_condition is missing" <<endm;
140 mySsd->addNoiseToStrip(m_ctrl);
141 LOG_INFO<<
"#### DO DAQ SIMULATION ####"<<endm;
143 LOG_ERROR<<
"m_ctrl is missing" <<endm;
145 mySsd->doDaqSimulation(m_ctrl);
146 Int_t nSsdStrips = mySsd->writeStripToTable(spa_strip,sls_strip);
149 LOG_INFO<<
"#### NUMBER OF SPA STRIP "<<nSsdStrips<<
" ####"<<endm;
151 LOG_INFO<<
"#################################################"<<endm;
152 if (nSsdStrips) res =
kStOK;
155 LOG_WARN <<
"no output"<<endm;
162 void St_spa_Maker::PrintInfo()
164 if (Debug()==
true){ StMaker::PrintInfo();}
168 if (Debug()==
true) {LOG_DEBUG <<
"Finish() ... " << endm; }
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.
Int_t readNoiseFromTable(St_sdm_calib_db *spa_noise, StSsdDynamicControl *dynamicControl)