39 return StatusCode::FAILURE;
44 ATH_MSG_FATAL(
" No input text file supplied. Nothing can be done. ");
45 return StatusCode::FAILURE;
51 return StatusCode::FAILURE;
54 return StatusCode::SUCCESS;
76 sc=StatusCode::FAILURE;
82 std::string linestring(
line) ;
83 size_t pos = linestring.find(
"Fileformat") ;
84 if(
pos != std::string::npos) {
87 ATH_MSG_WARNING(
"Input file has no Fileformat identifier. Assuming format=0.");
110 std::string linestring(
line) ;
111 size_t pos = linestring.find(
"Fileformat") ;
112 if(
pos != std::string::npos) {
115 ATH_MSG_WARNING(
"Input file has no Fileformat identifier. Assuming format=1");
139 enum ReadMode { ReadingRtRelation, ReadingStrawT0, ReadingGarbage } ;
140 ReadMode readmode =ReadingGarbage ;
148 int nrtrelations(0), nstrawt0(0) ;
152 std::string linestring(
line) ;
153 if(linestring.find(
"RtRelation") != std::string::npos) {
154 readmode = ReadingRtRelation ;
157 }
else if (linestring.find(
"StrawT0") != std::string::npos) {
158 readmode = ReadingStrawT0 ;
161 }
else readmode = ReadingGarbage ;
162 }
else if( readmode != ReadingGarbage) {
163 std::istringstream is(
line) ;
172 if( readmode == ReadingRtRelation ) {
177 rtContainer->
set(
id,rt);
180 }
else if( readmode == ReadingStrawT0 ) {
182 float t0(0), t0err(0) ;
188 t0Container->
setT0(
id,
t0, t0err );
199 size_t t0footprint = t0Container->
footprint() ;
200 size_t rtfootprint = rtContainer->
footprint() ;
203 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nrtrelations <<
" rt from file. "
204 <<
" t0/rt footprints " << t0footprint <<
" / " << rtfootprint ) ;
213 return StatusCode::FAILURE;
216 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
217 return StatusCode::FAILURE ;
227 return StatusCode::FAILURE;
230 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
231 return StatusCode::FAILURE ;
238 return StatusCode::SUCCESS ;
245 enum ReadMode { ReadingRtRelation, ReadingErrors, ReadingStrawT0, ReadingGarbage } ;
246 ReadMode readmode =ReadingGarbage ;
248 int nrtrelations(0), nerrors(0), nstrawt0(0) ;
259 std::string linestring(
line) ;
260 if( linestring.find(
"RtRelation") != std::string::npos) {
261 readmode = ReadingRtRelation ;
263 rtContainer->
clear() ;
264 }
else if(linestring.find(
"StrawT0") != std::string::npos) {
265 readmode = ReadingStrawT0 ;
267 t0Container->
clear() ;
268 }
else if(linestring.find(
"RtErrors") != std::string::npos) {
269 readmode = ReadingErrors ;
271 errContainer->
clear() ;
272 }
else { readmode = ReadingGarbage ; }
273 }
else if( readmode != ReadingGarbage) {
274 std::istringstream is(
line) ;
282 if( readmode == ReadingRtRelation ) {
286 rtContainer->
set(
id,rt);
290 }
else if( readmode == ReadingErrors ) {
294 errContainer->
set(
id,
err);
298 }
else if( readmode == ReadingStrawT0 ) {
300 float t0(0), t0err(0) ;
303 t0Container->
setT0(
id,
t0, t0err );
310 size_t t0footprint = t0Container->
footprint() ;
311 size_t rtfootprint = rtContainer->
footprint() ;
312 size_t errfootprint = errContainer->
footprint() ;
314 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nerrors <<
" errors and " << nrtrelations <<
" rt relations "
315 <<
" t0/rt/err footprints " << t0footprint <<
" / " << rtfootprint <<
" / " << errfootprint ) ;
322 return StatusCode::FAILURE;
325 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
326 return StatusCode::FAILURE ;
336 return StatusCode::FAILURE;
339 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
340 return StatusCode::FAILURE ;
349 return StatusCode::FAILURE;
352 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
353 return StatusCode::FAILURE ;
359 return StatusCode::SUCCESS ;
373 enum ReadMode { ReadingRtRelation, ReadingErrors, ReadingSlopes, ReadingStrawT0, ReadingGarbage } ;
374 ReadMode readmode =ReadingGarbage ;
376 int nrtrelations(0), nerrors(0), nslopes(0), nstrawt0(0) ;
381 std::string linestring(
line) ;
382 if( linestring.find(
"RtRelation") != std::string::npos) {
383 readmode = ReadingRtRelation ;
384 rtContainer->
clear() ;
386 }
else if(linestring.find(
"RtErrors") != std::string::npos) {
387 readmode = ReadingErrors ;
388 errContainer->
clear() ;
390 }
else if(linestring.find(
"RtSlopes") != std::string::npos) {
391 readmode = ReadingSlopes ;
392 slopeContainer->
clear() ;
394 }
else if(linestring.find(
"StrawT0") != std::string::npos) {
395 readmode = ReadingStrawT0 ;
396 t0Container->
clear() ;
398 }
else { readmode = ReadingGarbage ; }
399 }
else if( readmode != ReadingGarbage) {
400 std::istringstream is(
line) ;
408 if( readmode == ReadingRtRelation ) {
412 rtContainer->
set(
id,rt);
416 }
else if( readmode == ReadingErrors ) {
420 errContainer->
set(
id,
err);
424 }
else if( readmode == ReadingSlopes ) {
428 slopeContainer->
set(
id,slope);
432 }
else if( readmode == ReadingStrawT0 ) {
434 float t0(0), t0err(0) ;
437 t0Container->
setT0(
id,
t0, t0err );
443 size_t t0footprint = t0Container->
footprint() ;
444 size_t rtfootprint = rtContainer->
footprint() ;
445 size_t errfootprint = errContainer->
footprint() ;
446 size_t slopefootprint = slopeContainer->
footprint() ;
448 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nerrors <<
" errors and " << nrtrelations <<
" rt relations and " << nslopes <<
" error slopes "
449 <<
" t0/rt/err/slope footprints " << t0footprint <<
" / " << rtfootprint <<
" / " << errfootprint <<
" / " << slopefootprint) ;
457 return StatusCode::FAILURE;
460 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
461 return StatusCode::FAILURE ;
471 return StatusCode::FAILURE;
474 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
475 return StatusCode::FAILURE ;
484 return StatusCode::FAILURE;
487 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
488 return StatusCode::FAILURE ;
497 return StatusCode::FAILURE;
500 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
501 return StatusCode::FAILURE ;
508 return StatusCode::SUCCESS ;