36 return StatusCode::FAILURE;
41 ATH_MSG_FATAL(
" No input text file supplied. Nothing can be done. ");
42 return StatusCode::FAILURE;
48 return StatusCode::FAILURE;
51 return StatusCode::SUCCESS;
73 sc=StatusCode::FAILURE;
79 std::string linestring(
line) ;
80 size_t pos = linestring.find(
"Fileformat") ;
81 if(
pos != std::string::npos) {
84 ATH_MSG_WARNING(
"Input file has no Fileformat identifier. Assuming format=0.");
107 std::string linestring(
line) ;
108 size_t pos = linestring.find(
"Fileformat") ;
109 if(
pos != std::string::npos) {
112 ATH_MSG_WARNING(
"Input file has no Fileformat identifier. Assuming format=1");
136 enum ReadMode { ReadingRtRelation, ReadingStrawT0, ReadingGarbage } ;
137 ReadMode readmode =ReadingGarbage ;
145 int nrtrelations(0), nstrawt0(0) ;
149 std::string linestring(
line) ;
150 if(linestring.find(
"RtRelation") != std::string::npos) {
151 readmode = ReadingRtRelation ;
154 }
else if (linestring.find(
"StrawT0") != std::string::npos) {
155 readmode = ReadingStrawT0 ;
158 }
else readmode = ReadingGarbage ;
159 }
else if( readmode != ReadingGarbage) {
160 std::istringstream is(
line) ;
169 if( readmode == ReadingRtRelation ) {
173 rtContainer->
set(
id,rt);
176 }
else if( readmode == ReadingStrawT0 ) {
178 float t0(0), t0err(0) ;
184 t0Container->
setT0(
id,
t0, t0err );
195 size_t t0footprint = t0Container->
footprint() ;
196 size_t rtfootprint = rtContainer->
footprint() ;
199 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nrtrelations <<
" rt from file. "
200 <<
" t0/rt footprints " << t0footprint <<
" / " << rtfootprint ) ;
209 return StatusCode::FAILURE;
212 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
213 return StatusCode::FAILURE ;
223 return StatusCode::FAILURE;
226 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
227 return StatusCode::FAILURE ;
234 return StatusCode::SUCCESS ;
241 enum ReadMode { ReadingRtRelation, ReadingErrors, ReadingStrawT0, ReadingGarbage } ;
242 ReadMode readmode =ReadingGarbage ;
244 int nrtrelations(0), nerrors(0), nstrawt0(0) ;
255 std::string linestring(
line) ;
256 if( linestring.find(
"RtRelation") != std::string::npos) {
257 readmode = ReadingRtRelation ;
259 rtContainer->
clear() ;
260 }
else if(linestring.find(
"StrawT0") != std::string::npos) {
261 readmode = ReadingStrawT0 ;
263 t0Container->
clear() ;
264 }
else if(linestring.find(
"RtErrors") != std::string::npos) {
265 readmode = ReadingErrors ;
267 errContainer->
clear() ;
268 }
else { readmode = ReadingGarbage ; }
269 }
else if( readmode != ReadingGarbage) {
270 std::istringstream is(
line) ;
278 if( readmode == ReadingRtRelation ) {
281 rtContainer->
set(
id,rt);
285 }
else if( readmode == ReadingErrors ) {
288 errContainer->
set(
id,
err);
292 }
else if( readmode == ReadingStrawT0 ) {
294 float t0(0), t0err(0) ;
296 t0Container->
setT0(
id,
t0, t0err );
303 size_t t0footprint = t0Container->
footprint() ;
304 size_t rtfootprint = rtContainer->
footprint() ;
305 size_t errfootprint = errContainer->
footprint() ;
307 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nerrors <<
" errors and " << nrtrelations <<
" rt relations "
308 <<
" t0/rt/err footprints " << t0footprint <<
" / " << rtfootprint <<
" / " << errfootprint ) ;
315 return StatusCode::FAILURE;
318 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
319 return StatusCode::FAILURE ;
329 return StatusCode::FAILURE;
332 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
333 return StatusCode::FAILURE ;
342 return StatusCode::FAILURE;
345 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
346 return StatusCode::FAILURE ;
352 return StatusCode::SUCCESS ;
366 enum ReadMode { ReadingRtRelation, ReadingErrors, ReadingSlopes, ReadingStrawT0, ReadingGarbage } ;
367 ReadMode readmode =ReadingGarbage ;
369 int nrtrelations(0), nerrors(0), nslopes(0), nstrawt0(0) ;
374 std::string linestring(
line) ;
375 if( linestring.find(
"RtRelation") != std::string::npos) {
376 readmode = ReadingRtRelation ;
377 rtContainer->
clear() ;
379 }
else if(linestring.find(
"RtErrors") != std::string::npos) {
380 readmode = ReadingErrors ;
381 errContainer->
clear() ;
383 }
else if(linestring.find(
"RtSlopes") != std::string::npos) {
384 readmode = ReadingSlopes ;
385 slopeContainer->
clear() ;
387 }
else if(linestring.find(
"StrawT0") != std::string::npos) {
388 readmode = ReadingStrawT0 ;
389 t0Container->
clear() ;
391 }
else { readmode = ReadingGarbage ; }
392 }
else if( readmode != ReadingGarbage) {
393 std::istringstream is(
line) ;
401 if( readmode == ReadingRtRelation ) {
404 rtContainer->
set(
id,rt);
408 }
else if( readmode == ReadingErrors ) {
411 errContainer->
set(
id,
err);
415 }
else if( readmode == ReadingSlopes ) {
418 slopeContainer->
set(
id,slope);
422 }
else if( readmode == ReadingStrawT0 ) {
424 float t0(0), t0err(0) ;
426 t0Container->
setT0(
id,
t0, t0err );
432 size_t t0footprint = t0Container->
footprint() ;
433 size_t rtfootprint = rtContainer->
footprint() ;
434 size_t errfootprint = errContainer->
footprint() ;
435 size_t slopefootprint = slopeContainer->
footprint() ;
437 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nerrors <<
" errors and " << nrtrelations <<
" rt relations and " << nslopes <<
" error slopes "
438 <<
" t0/rt/err/slope footprints " << t0footprint <<
" / " << rtfootprint <<
" / " << errfootprint <<
" / " << slopefootprint) ;
446 return StatusCode::FAILURE;
449 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
450 return StatusCode::FAILURE ;
460 return StatusCode::FAILURE;
463 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
464 return StatusCode::FAILURE ;
473 return StatusCode::FAILURE;
476 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
477 return StatusCode::FAILURE ;
486 return StatusCode::FAILURE;
489 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
490 return StatusCode::FAILURE ;
497 return StatusCode::SUCCESS ;