27 m_par_caltextfile(
""),
29 m_detstore(
"DetectorStore",
name),
30 m_condSvc(
"CondSvc",
name)
61 return StatusCode::SUCCESS;
65 ATH_MSG_INFO(
" No input text file supplied. Initialization done. ");
66 return StatusCode::SUCCESS;
84 ATH_MSG_INFO(
" Initilization done with WriteKey Registraton ");
86 return StatusCode::SUCCESS;
106 return StatusCode::FAILURE ;
138 sc=StatusCode::FAILURE;
144 std::string linestring(
line) ;
145 size_t pos = linestring.find(
"Fileformat") ;
146 if(
pos != std::string::npos) {
149 ATH_MSG_WARNING(
"Input file has no Fileformat identifier. Assuming format=0.");
172 std::string linestring(
line) ;
173 size_t pos = linestring.find(
"Fileformat") ;
174 if(
pos != std::string::npos) {
177 ATH_MSG_WARNING(
"Input file has no Fileformat identifier. Assuming format=1");
196 enum ReadMode { ReadingRtRelation, ReadingStrawT0, ReadingGarbage } ;
197 ReadMode readmode =ReadingGarbage ;
200 std::unique_ptr<RtRelationContainer> rtCdo{std::make_unique<RtRelationContainer>()};
201 std::unique_ptr<StrawT0Container> t0Cdo{std::make_unique<StrawT0Container>()};
204 int nrtrelations(0), nstrawt0(0) ;
208 std::string linestring(
line) ;
209 if(linestring.find(
"RtRelation") != std::string::npos) {
210 readmode = ReadingRtRelation ;
213 }
else if (linestring.find(
"StrawT0") != std::string::npos) {
214 readmode = ReadingStrawT0 ;
217 }
else readmode = ReadingGarbage ;
218 }
else if( readmode != ReadingGarbage) {
219 std::istringstream is(
line) ;
228 if( readmode == ReadingRtRelation ) {
235 }
else if( readmode == ReadingStrawT0 ) {
237 float t0(0), t0err(0) ;
239 t0Cdo->setT0(
id,
t0, t0err);
247 size_t t0footprint = t0Cdo->footprint() ;
248 size_t rtfootprint = rtCdo->footprint() ;
252 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nrtrelations <<
" rt from file. "
253 <<
" t0/rt footprints " << t0footprint <<
" / " << rtfootprint <<
" t0 footprint after crunch " << t0Cdo->footprint());
261 if(rtWriteHandle.isValid()) {
263 return StatusCode::SUCCESS ;
266 if(rtWriteHandle.record(rangeW,std::move(rtCdo)).isFailure()) {
268 return StatusCode::FAILURE;
270 ATH_MSG_INFO(
"Recorded RT Container for key " <<
m_rtWriteKey.fullKey() <<
" with range " << rtWriteHandle.getRange());
275 if(t0WriteHandle.isValid()) {
277 return StatusCode::SUCCESS ;
282 if(t0WriteHandle.record(rangeW,std::move(t0Cdo)).isFailure()) {
284 return StatusCode::FAILURE;
286 ATH_MSG_INFO(
"Recorded T0 Container for key " <<
m_t0WriteKey.fullKey() <<
" with range " << t0WriteHandle.getRange());
290 return StatusCode::SUCCESS ;
301 const EventIDBase
start {1, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM, 0};
302 const EventIDBase
stop {EventIDBase::UNDEFNUM-1, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM-1};