13#ifndef ATHANALYSISBASECOMPS_ATHANALYSISALGORITHM_H
14#define ATHANALYSISBASECOMPS_ATHANALYSISALGORITHM_H 1
27#include "GaudiKernel/ToolHandle.h"
28#include "GaudiKernel/IIncidentSvc.h"
62 virtual StatusCode
sysExecute(
const EventContext&)
override;
65 template<
typename T> StatusCode
retrieveMetadata(
const std::string& folder,
const std::string& key, T& out) {
68 }
catch(std::exception& e) {
70 return StatusCode::FAILURE;
76 template<
typename T> StatusCode
retrieveMetadata(
const std::string& folder,
const std::string& key, T& out,
const IOVTime& time,
int channel=-1) {
79 }
catch(std::exception& e) {
81 return StatusCode::FAILURE;
93 virtual void handle(
const Incident& inc )
override;
112 virtual TFile*
currentFile(
const char* evtSelName=
"EventSelector") final;
#define ATH_MSG_WARNING(x)
virtual TFile * currentFile(const char *evtSelName="EventSelector") final
Function returning the TFile pointer of the currently open file of the given EventSelector (in athena...
StatusCode retrieveMetadata(const std::string &folder, const std::string &key, T &out)
Helper function to access IOVMetaDataContainer information helped in the MetaDataStore.
ServiceHandle< StoreGateSvc > & outputMetaStore()
Accessor for the output metadata store.
virtual StatusCode beginInputFile()
Function called when a new input file is opened user can read input metadata from inputMetaStore()
StatusCode retrieveMetadata(const std::string &folder, const std::string &key, T &out, const IOVTime &time, int channel=-1)
Helper function to access IOVMetaDataContainer information held in InputMetaDataStore,...
virtual StatusCode endInputFile()
Function called as an input file is being closed.
virtual StatusCode sysExecute(const EventContext &) override
override to do firstEvent method
ServiceHandle< StoreGateSvc > m_inputMetaStore
Object accessing the input metadata store.
virtual void handle(const Incident &inc) override
Function receiving incidents from IncidentSvc/TEvent Experts can override but they should ensure they...
const ServiceHandle< StoreGateSvc > & outputMetaStore() const
Const accessor for the output metadata store.
virtual StatusCode metaDataStop()
Function called before finalize user can read output metadata from outputMetaStore()
void updateEvtStore(Gaudi::Details::PropertyBase &prop)
ServiceHandle< StoreGateSvc > m_outputMetaStore
Object accessing the output metadata store.
ServiceHandle< StoreGateSvc > & inputMetaStore()
Accessor for the input metadata store.
virtual ~AthAnalysisAlgorithm() override
virtual StatusCode firstExecute()
Function called when first execute is encountered user can read event information with evtStore()
const ServiceHandle< StoreGateSvc > & inputMetaStore() const
Const accessor for the input metadata store.
virtual StatusCode sysInitialize() override
Function initialising the tool in the correct way in Athena.
AthAnalysisAlgorithm(const std::string &name)
Constructor taking just a name.
static std::string retrieveMetadata(const std::string &folder, const std::string &key, const ServiceHandle< StoreGateSvc > &inputMetaStore)
method that always returns as a string you can use from, e.g, pyROOT with evt = ROOT....
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Basic time unit for IOVSvc.
The Athena Transient Store API.