asg::AsgMetadataTool Class Reference

#include <AsgMetadataTool.h>

Inheritance diagram for asg::AsgMetadataTool:
asg::AsgTool asg::IAsgTool AsgElectronEfficiencyCorrectionTool CP::EgammaCalibrationAndSmearingTool CP::IsolationCorrectionTool CP::JetTileCorrectionTool CP::MetadataToolExample JERTool ST::SUSYObjDef_xAOD TauAnalysisTools::CommonSmearingTool TauAnalysisTools::TauEfficiencyCorrectionsTool TauAnalysisTools::TauOverlappingElectronLLHDecorator TauAnalysisTools::TauSelectionTool TauAnalysisTools::TauTruthMatchingTool Trig::BunchCrossingToolBase Trig::TrigDecisionTool TrigConf::xAODConfigTool xAODMaker::FileMetaDataCreatorTool xAODMaker::FileMetaDataTool xAODMaker::TriggerMenuMetaDataTool

List of all members.

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.

Detailed Description

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.

Author:
Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Revision
771072
Date
2016-08-31 16:50:22 +0200 (Wed, 31 Aug 2016)

Member Function Documentation

StatusCode asg::AsgMetadataTool::beginEvent (  )  [protected, virtual]
StatusCode asg::AsgMetadataTool::beginInputFile (  )  [protected, virtual]
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.

template<typename T >
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]

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1