#include <AsgMetadataTool.h>
Public Member Functions | |
AsgMetadataTool (const std::string &name) | |
Normal ASG tool constructor with a name. | |
~AsgMetadataTool () | |
Destructor. | |
virtual StatusCode | sysInitialize () |
Function initialising the tool in the correct way in Athena. | |
template<typename T > | |
StatusCode | retrieveMetadata (const std::string &folder, const std::string &key, T &out) __attribute__((deprecated)) |
Functions providing access to the input/output metadata | |
MetaStorePtr_t | inputMetaStore () const |
Accessor for the input metadata store. | |
MetaStorePtr_t | outputMetaStore () const |
Accessor for the output metadata store. | |
Protected Member Functions | |
Callback functions helping in metadata reading/writing | |
virtual void | handle (const Incident &inc) |
Function receiving incidents from IncidentSvc/TEvent. | |
virtual StatusCode | beginInputFile () |
Function called when a new input file is opened. | |
virtual StatusCode | endInputFile () |
virtual StatusCode | beginEvent () |
Function called when a new events is loaded. | |
virtual StatusCode | metaDataStop () |
Function called when the tool should write out its metadata. |
Base class for dual-use tools that provide file metadata access
Didn't want to make the AsgTool base class even heavier with a feature that only very few dual-use tools will actually use. So instead decided that tools that need metadata access, will need to inherit from this base class instead of AsgTool. Very much in sync with how the class hierarchy looks like in AthenaBaseComps.
The class provides StoreGate-like access to the input and output metadata store in a uniform way across Athena and ROOT. In Athena it just relies on the two StoreGateSvc instances taking care of this, and in ROOT it uses a wrapper around xAOD::TEvent to achieve the same interface.
StatusCode asg::AsgMetadataTool::beginEvent | ( | ) | [protected, virtual] |
Function called when a new events is loaded.
Dummy implementation that can be overridden by the derived tool.
Reimplemented in CP::MetadataToolExample, AsgElectronEfficiencyCorrectionTool, CP::EgammaCalibrationAndSmearingTool, CP::IsolationCorrectionTool, Trig::WebBunchCrossingTool, Trig::xAODBunchCrossingTool, TrigConf::xAODConfigTool, Trig::TrigDecisionTool, xAODMaker::FileMetaDataTool, and xAODMaker::TriggerMenuMetaDataTool.
StatusCode asg::AsgMetadataTool::beginInputFile | ( | ) | [protected, virtual] |
Function called when a new input file is opened.
Dummy implementation that can be overridden by the derived tool.
Reimplemented in CP::MetadataToolExample, AsgElectronEfficiencyCorrectionTool, CP::EgammaCalibrationAndSmearingTool, CP::IsolationCorrectionTool, Trig::xAODBunchCrossingTool, TrigConf::xAODConfigTool, Trig::TrigDecisionTool, xAODMaker::FileMetaDataCreatorTool, xAODMaker::FileMetaDataTool, and xAODMaker::TriggerMenuMetaDataTool.
StatusCode asg::AsgMetadataTool::endInputFile | ( | ) | [protected, virtual] |
Function called when the currently open input file got completely processed
Dummy implementation that can be overridden by the derived tool.
Reimplemented in CP::MetadataToolExample, AsgElectronEfficiencyCorrectionTool, CP::EgammaCalibrationAndSmearingTool, and CP::IsolationCorrectionTool.
StatusCode asg::AsgMetadataTool::metaDataStop | ( | ) | [protected, virtual] |
Function called when the tool should write out its metadata.
Dummy implementation that can be overridden by the derived tool.
Reimplemented in xAODMaker::FileMetaDataCreatorTool, xAODMaker::FileMetaDataTool, and xAODMaker::TriggerMenuMetaDataTool.
StatusCode asg::AsgMetadataTool::retrieveMetadata | ( | const std::string & | folder, | |
const std::string & | key, | |||
T & | out | |||
) | [inline] |
Helper function to access IOVMetaDataContainer information held in the MetaDataStore For non athena environments, this will just return StatusCode::FAILURE
Note that having this function here is very bad design. :-( For now it's marked as deprecated, but Will needs to put replacement code into AthenaBaseComps to replace this...
StatusCode asg::AsgMetadataTool::sysInitialize | ( | ) | [virtual] |