26 ISvcLocator* pSvcLocator) :
58 m_cell_id =
new std::vector<unsigned int>;
65 return StatusCode::FAILURE;
74 Branch(
"Header",&
m_header.m_nRun,
"nrun/I:ener/F:xcryo:ytable");
80 return StatusCode::SUCCESS;
92 return StatusCode::SUCCESS;
111 if (evType != 3)
return StatusCode::FAILURE;
124 return StatusCode::FAILURE;
128 <<
", tableY = " <<
m_header.m_yTable );
139 for (
const CaloCell* cell : *cellContainer) {
140 unsigned int id = cell->ID().get_identifier32().get_compact();
147 return StatusCode::SUCCESS;
155 std::ifstream xyFile;
158 xyFile.open(filename.c_str());
159 if (!xyFile.is_open()) {
161 return StatusCode::FAILURE;
164 while ( getline(xyFile, line,
'\n') ) {
166 std::istringstream buf(line);
168 buf >>
run >>
x >>
y >> e;
170 if (
run ==
m_header.m_nRun && xyFile.good())
return StatusCode::SUCCESS;
173 return StatusCode::FAILURE;
#define ATH_CHECK
Evaluate an expression and check for errors.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
Container class for CaloCell.
Data object for each calorimeter readout cell.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
float getBeamMomentum() const
unsigned int getRunNum() const
virtual StatusCode execute() override
std::string m_txtFileWithXY
Text file containing xCryo and yTable.
std::string m_noiseTreeName
std::vector< unsigned int > * m_cell_id
virtual StatusCode finalize() override
std::string m_caloCellContainerName
std::string m_headerTreeName
virtual StatusCode initialize() override
TBNoiseWrite(const std::string &name, ISvcLocator *pSvcLocator)
int m_nEventRandomTrigger
std::string m_rootfile_name
StatusCode getXcryoYtable(float &x, float &y, float &eBeam)
Get Xcryo and Ytable from a text file.
std::vector< float > * m_cell_energy