10#ifndef ANA_ALGORITHM__ANA_ALGORITHM_H
11#define ANA_ALGORITHM__ANA_ALGORITHM_H
25#include <GaudiKernel/IIncidentListener.h>
26#include <GaudiKernel/ServiceHandle.h>
70 :
public asg::AsgComponent
91 ISvcLocator* pSvcLocator);
105#ifdef XAOD_STANDALONE
127#ifdef XAOD_STANDALONE
163 template<
typename T=TH1>
164 T *
hist (
const std::string& name)
const;
173 TH2 *
hist2d (
const std::string& name)
const;
182 TH3 *
hist3d (
const std::string& name)
const;
195 TEfficiency *histeff (
const std::string& name)
const;
196 TEfficiency *
efficiency (
const std::string& name)
const;
224 TTree *
tree (
const std::string& name)
const;
317#pragma GCC diagnostic push
318#pragma GCC diagnostic ignored "-Woverloaded-virtual"
328 virtual ::StatusCode
execute ();
337 virtual ::StatusCode
execute (
const EventContext& ctx);
339#pragma GCC diagnostic pop
354 virtual void print ()
const;
441#ifdef XAOD_STANDALONE
517 bool hasFileExecute ()
const noexcept;
525 bool hasBeginInputFile ()
const noexcept;
533 bool hasEndInputFile ()
const noexcept;
537#ifndef XAOD_STANDALONE
544 void handle (
const Incident& inc);
553#ifdef XAOD_STANDALONE
559#ifdef XAOD_STANDALONE
575#ifdef XAOD_STANDALONE
581#ifdef XAOD_STANDALONE
587 std::string m_treeStreamName;
590#ifdef XAOD_STANDALONE
596#ifdef XAOD_STANDALONE
virtual bool filterPassed(const EventContext &ctx) const
virtual void setFilterPassed(bool state, const EventContext &ctx) const
virtual StatusCode sysExecute(const EventContext &ctx) override
StoreGateSvc_t m_evtStore
ServiceHandle< StoreGateSvc > & evtStore()
virtual StatusCode sysInitialize()
Initialization method invoked by the framework.
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
TTree * tree(const std::string &treeName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered TTrees.
StatusCode book(const TH1 &hist, const std::string &tDir="", const std::string &stream="")
Simplify the booking and registering (into THistSvc) of histograms.
TH1 * hist(const std::string &histName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered histograms of any type.
TH3 * hist3d(const std::string &histName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered 3-d histograms.
TEfficiency * efficiency(const std::string &effName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered TEfficiency.
TH2 * hist2d(const std::string &histName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered 2-d histograms.
virtual void print() const
print the state of the algorithm
virtual::StatusCode endInputFile()
perform the action for the end of an input file
ConstMetaStorePtr_t inputMetaStore() const
::StatusCode requestBeginInputFile()
register this algorithm to have an implementation of beginInputFile
virtual::StatusCode fileExecute()
perform the action exactly once for each file in the dataset
virtual ~AnaAlgorithm() noexcept=default
standard (virtual) destructor
const ServiceHandle< StoreGateSvc > & ConstMetaStorePtr_t
bool m_hasBeginInputFile
the value of hasBeginInputFile
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
::StatusCode requestEndInputFile()
register this algorithm to have an implementation of endInputFile
ServiceHandle< StoreGateSvc > MetaStore_t
Type of the metadata store variable in Athena.
::StatusCode requestFileExecute()
register this algorithm to have an implementation of fileexecute
bool m_hasFileExecute
the value of hasFileExecute
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.
ServiceHandle< StoreGateSvc > & MetaStorePtr_t
Type of the metadata store pointer in Athena.
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.
void handle(const Incident &inc)
receive the given incident
virtual::StatusCode execute()
execute this algorithm
bool m_hasEndInputFile
the value of hasEndInputFile
virtual::StatusCode finalize()
finalize this algorithm
virtual::StatusCode beginInputFile()
perform the action for the beginning of an input file
ConstMetaStorePtr_t outputMetaStore() const
virtual::StatusCode initialize()
initialize this algorithm
the interface to the filter functions in the algorithm sequence
the interface to histogram storage on the worker
The interface to TTree storage on the worker.
the interface for algorithms to access IWorker
Wrapper for Event to make it look like StoreGate.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.