Loading [MathJax]/jax/output/SVG/config.js
 |
ATLAS Offline Software
|
#include <TRTCondStoreText.h>
|
| TRTCondStoreText (const std::string &name, ISvcLocator *pSvcLocator) |
| constructor More...
|
|
| ~TRTCondStoreText () |
| destructor More...
|
|
virtual StatusCode | initialize (void) override |
|
virtual StatusCode | execute (void) override |
|
virtual StatusCode | finalize (void) override |
|
virtual TRTCond::ExpandedIdentifier | trtcondid (const Identifier &id, int level=TRTCond::ExpandedIdentifier::STRAW) const |
| create an TRTCond::ExpandedIdentifier from a TRTID identifier More...
|
|
virtual StatusCode | checkTextFile (const std::string &file, int &format) |
| read calibration from text file into TDS More...
|
|
virtual StatusCode | readTextFile (const std::string &file, int &format) |
|
virtual StatusCode | readTextFile_Format1 (std::istream &) |
|
virtual StatusCode | readTextFile_Format2 (std::istream &) |
|
virtual StatusCode | readTextFile_Format3 (std::istream &) |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
read calibration constants from text file and store them in a pool and cool file.
Definition at line 30 of file TRTCondStoreText.h.
◆ RtRelationContainer
◆ StoreGateSvc_t
◆ StrawT0Container
◆ TRTCondStoreText()
TRTCondStoreText::TRTCondStoreText |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TRTCondStoreText()
TRTCondStoreText::~TRTCondStoreText |
( |
| ) |
|
◆ checkTextFile()
StatusCode TRTCondStoreText::checkTextFile |
( |
const std::string & |
file, |
|
|
int & |
format |
|
) |
| |
|
virtual |
read calibration from text file into TDS
Definition at line 103 of file TRTCondStoreText.cxx.
110 sc=StatusCode::FAILURE;
116 std::string linestring(
line) ;
117 size_t pos = linestring.find(
"Fileformat") ;
118 if(
pos != std::string::npos) {
121 ATH_MSG_WARNING(
"Input file has no Fileformat identifier. Assuming format=0.");
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TRTCondStoreText::execute |
( |
void |
| ) |
|
|
overridevirtual |
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode TRTCondStoreText::finalize |
( |
void |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode TRTCondStoreText::initialize |
( |
void |
| ) |
|
|
overridevirtual |
Definition at line 47 of file TRTCondStoreText.cxx.
51 if (StatusCode::SUCCESS!=
m_detstore.retrieve()) {
53 return StatusCode::FAILURE;
60 if (
sc.isFailure() ) {
73 return StatusCode::FAILURE ;
77 ATH_MSG_FATAL(
" No input text file supplied. Nothing can be done. ");
78 return StatusCode::FAILURE;
84 return StatusCode::FAILURE ;
88 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ readTextFile()
StatusCode TRTCondStoreText::readTextFile |
( |
const std::string & |
file, |
|
|
int & |
format |
|
) |
| |
|
virtual |
Definition at line 132 of file TRTCondStoreText.cxx.
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=1");
◆ readTextFile_Format1()
StatusCode TRTCondStoreText::readTextFile_Format1 |
( |
std::istream & |
infile | ) |
|
|
virtual |
Definition at line 169 of file TRTCondStoreText.cxx.
173 enum ReadMode { ReadingRtRelation, ReadingStrawT0, ReadingGarbage } ;
174 ReadMode readmode =ReadingGarbage ;
182 int nrtrelations(0), nstrawt0(0) ;
186 std::string linestring(
line) ;
187 if(linestring.find(
"RtRelation") != std::string::npos) {
188 readmode = ReadingRtRelation ;
191 }
else if (linestring.find(
"StrawT0") != std::string::npos) {
192 readmode = ReadingStrawT0 ;
195 }
else readmode = ReadingGarbage ;
196 }
else if( readmode != ReadingGarbage) {
197 std::istringstream is(
line) ;
206 if( readmode == ReadingRtRelation ) {
210 rtContainer->set(
id,rt);
213 }
else if( readmode == ReadingStrawT0 ) {
215 float t0(0), t0err(0) ;
221 t0Container->setT0(
id,
t0, t0err );
232 size_t t0footprint = t0Container->footprint() ;
233 size_t rtfootprint = rtContainer->footprint() ;
236 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nrtrelations <<
" rt from file. "
237 <<
" t0/rt footprints " << t0footprint <<
" / " << rtfootprint ) ;
246 return StatusCode::FAILURE;
249 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
250 return StatusCode::FAILURE ;
260 return StatusCode::FAILURE;
263 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
264 return StatusCode::FAILURE ;
271 return StatusCode::SUCCESS ;
◆ readTextFile_Format2()
StatusCode TRTCondStoreText::readTextFile_Format2 |
( |
std::istream & |
infile | ) |
|
|
virtual |
Definition at line 274 of file TRTCondStoreText.cxx.
278 enum ReadMode { ReadingRtRelation, ReadingErrors, ReadingStrawT0, ReadingGarbage } ;
279 ReadMode readmode =ReadingGarbage ;
281 int nrtrelations(0), nerrors(0), nstrawt0(0) ;
292 std::string linestring(
line) ;
293 if( linestring.find(
"RtRelation") != std::string::npos) {
294 readmode = ReadingRtRelation ;
296 rtContainer->clear() ;
297 }
else if(linestring.find(
"StrawT0") != std::string::npos) {
298 readmode = ReadingStrawT0 ;
300 t0Container->clear() ;
301 }
else if(linestring.find(
"RtErrors") != std::string::npos) {
302 readmode = ReadingErrors ;
304 errContainer->clear() ;
305 }
else { readmode = ReadingGarbage ; }
306 }
else if( readmode != ReadingGarbage) {
307 std::istringstream is(
line) ;
315 if( readmode == ReadingRtRelation ) {
318 rtContainer->set(
id,rt);
322 }
else if( readmode == ReadingErrors ) {
325 errContainer->set(
id,
err);
329 }
else if( readmode == ReadingStrawT0 ) {
331 float t0(0), t0err(0) ;
333 t0Container->setT0(
id,
t0, t0err );
340 size_t t0footprint = t0Container->footprint() ;
341 size_t rtfootprint = rtContainer->footprint() ;
342 size_t errfootprint = errContainer->footprint() ;
344 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nerrors <<
" errors and " << nrtrelations <<
" rt relations "
345 <<
" t0/rt/err footprints " << t0footprint <<
" / " << rtfootprint <<
" / " << errfootprint ) ;
352 return StatusCode::FAILURE;
355 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
356 return StatusCode::FAILURE ;
366 return StatusCode::FAILURE;
369 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
370 return StatusCode::FAILURE ;
379 return StatusCode::FAILURE;
382 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
383 return StatusCode::FAILURE ;
389 return StatusCode::SUCCESS ;
◆ readTextFile_Format3()
StatusCode TRTCondStoreText::readTextFile_Format3 |
( |
std::istream & |
infile | ) |
|
|
virtual |
Definition at line 393 of file TRTCondStoreText.cxx.
403 enum ReadMode { ReadingRtRelation, ReadingErrors, ReadingSlopes, ReadingStrawT0, ReadingGarbage } ;
404 ReadMode readmode =ReadingGarbage ;
406 int nrtrelations(0), nerrors(0), nslopes(0), nstrawt0(0) ;
411 std::string linestring(
line) ;
412 if( linestring.find(
"RtRelation") != std::string::npos) {
413 readmode = ReadingRtRelation ;
414 rtContainer->clear() ;
416 }
else if(linestring.find(
"RtErrors") != std::string::npos) {
417 readmode = ReadingErrors ;
418 errContainer->clear() ;
420 }
else if(linestring.find(
"RtSlopes") != std::string::npos) {
421 readmode = ReadingSlopes ;
422 slopeContainer->clear() ;
424 }
else if(linestring.find(
"StrawT0") != std::string::npos) {
425 readmode = ReadingStrawT0 ;
426 t0Container->clear() ;
428 }
else { readmode = ReadingGarbage ; }
429 }
else if( readmode != ReadingGarbage) {
430 std::istringstream is(
line) ;
438 if( readmode == ReadingRtRelation ) {
441 rtContainer->set(
id,rt);
445 }
else if( readmode == ReadingErrors ) {
448 errContainer->set(
id,
err);
452 }
else if( readmode == ReadingSlopes ) {
455 slopeContainer->set(
id,slope);
459 }
else if( readmode == ReadingStrawT0 ) {
461 float t0(0), t0err(0) ;
463 t0Container->setT0(
id,
t0, t0err );
469 size_t t0footprint = t0Container->footprint() ;
470 size_t rtfootprint = rtContainer->footprint() ;
471 size_t errfootprint = errContainer->footprint() ;
472 size_t slopefootprint = slopeContainer->footprint() ;
474 ATH_MSG_INFO(
"read " << nstrawt0 <<
" t0 and " << nerrors <<
" errors and " << nrtrelations <<
" rt relations and " << nslopes <<
" error slopes "
475 <<
" t0/rt/err/slope footprints " << t0footprint <<
" / " << rtfootprint <<
" / " << errfootprint <<
" / " << slopefootprint) ;
483 return StatusCode::FAILURE;
486 ATH_MSG_FATAL(
"Could not retrieve data handle for StrawT0Container " );
487 return StatusCode::FAILURE ;
497 return StatusCode::FAILURE;
500 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
501 return StatusCode::FAILURE ;
510 return StatusCode::FAILURE;
513 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
514 return StatusCode::FAILURE ;
523 return StatusCode::FAILURE;
526 ATH_MSG_FATAL(
"Could not retrieve data handle for RtRelationContainer " );
527 return StatusCode::FAILURE ;
534 return StatusCode::SUCCESS ;
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ trtcondid()
◆ updateVHKA()
◆ m_detstore
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_par_caltextfile
std::string TRTCondStoreText::m_par_caltextfile |
|
private |
◆ m_par_errcontainerkey
std::string TRTCondStoreText::m_par_errcontainerkey |
|
private |
◆ m_par_rtcontainerkey
std::string TRTCondStoreText::m_par_rtcontainerkey |
|
private |
◆ m_par_slopecontainerkey
std::string TRTCondStoreText::m_par_slopecontainerkey |
|
private |
◆ m_par_t0containerkey
std::string TRTCondStoreText::m_par_t0containerkey |
|
private |
◆ m_streamer
std::string TRTCondStoreText::m_streamer |
|
private |
◆ m_trtid
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
virtual StatusCode checkTextFile(const std::string &file, int &format)
read calibration from text file into TDS
std::string m_par_caltextfile
calibration text file specified in jobOptions
std::string m_par_t0containerkey
std::string m_par_slopecontainerkey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::string m_par_errcontainerkey
std::vector< ALFA_RawData_p1 > t0
virtual StatusCode readTextFile_Format3(std::istream &)
TRTCond::StrawT0MultChanContainer StrawT0Container
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
TRTCond::RtRelationMultChanContainer RtRelationContainer
int straw(const Identifier &id) const
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
static RtRelation * readFromFile(std::istream &is)
read method
::StatusCode StatusCode
StatusCode definition for legacy code.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
virtual StatusCode readTextFile_Format1(std::istream &)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
int phi_module(const Identifier &id) const
ServiceHandle< StoreGateSvc > m_detstore
virtual StatusCode readTextFile_Format2(std::istream &)
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode readTextFile(const std::string &file, int &format)
AthAlgorithm()
Default constructor:
Identifier for TRT detector elements in the conditions code.
std::string m_par_rtcontainerkey
const TRT_ID * m_trtid
trt id helper
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>