11#ifndef ATHENAROOTCOMPS_ATHENA_XAODEVENTSELECTOR_H
12#define ATHENAROOTCOMPS_ATHENA_XAODEVENTSELECTOR_H 1
17#include "GaudiKernel/IEvtSelector.h"
18#include "GaudiKernel/IIoComponent.h"
19#include "GaudiKernel/IIncidentSvc.h"
20#include "GaudiKernel/MsgStream.h"
21#include "Gaudi/Property.h"
22#include "GaudiKernel/ServiceHandle.h"
32#include <unordered_map>
48 public extends<::AthService,
72 virtual StatusCode
finalize()
override;
74 virtual void handle(
const Incident& incident)
override;
78 virtual StatusCode
createContext( Context*& refpCtxt )
const override;
80 virtual StatusCode
last( Context& refContext )
const override;
81 virtual StatusCode
next( Context& refCtxt )
const override;
82 virtual StatusCode
next( Context& refCtxt,
int jump )
const override;
83 virtual StatusCode
previous( Context& refCtxt )
const override;
84 virtual StatusCode
previous( Context& refCtxt,
int jump )
const override;
85 virtual StatusCode
rewind( Context& refCtxt )
const override;
88 IOpaqueAddress*& )
const override;
89 virtual StatusCode
releaseContext( Context*& refCtxt )
const override;
91 Context& ctx )
const override;
100 virtual StatusCode
seek (Context& refCtxt,
int evtnum)
const override;
106 virtual int curEvent (
const Context& refCtxt)
const override;
126 const EventContext& ctx)
override;
130 virtual int size (Context& refCtxt)
const override;
150 StatusCode
setFile(
const std::string& fname);
Extension to IEvtSelector to allow for seeking.
This file contains the class definition for the IPoolSvc interface class.
Define macros for attributes used to control the static checker.
event selector context ... just holds reference back to the selector
ServiceHandle< StoreGateSvc > m_ometaStore
Pointer to the StoreGateSvc output metadata store.
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
update a transient Address
virtual int size(Context &refCtxt) const override
ICollectionSize interface
StringProperty m_tupleName
Name of TTree to load from collection of input files.
virtual StatusCode next(Context &refCtxt) const override
xAODEventSelector(const std::string &name, ISvcLocator *svcLoc)
Constructor with parameters:
long m_nbrEvts
Number of Events read so far.
ServiceHandle< IDictLoaderSvc > m_dictsvc
Pointer to the IDictLoaderSvc.
TFile * m_tfile
current TFile being read
virtual StatusCode resetCriteria(const std::string &cr, Context &ctx) const override
StringArrayProperty m_inputCollectionsName
List of input files containing TTree.
StatusCode createRootBranchAddresses(StoreID::type storeID, tadList &tads)
helper method to create proxies
int find_coll_idx(int evtidx) const
helper method to get the collection index (into m_inputCollectionsName) for a given event index evtid...
StatusCode createMetaDataRootBranchAddresses() const
helper method to create proxies for the metadata store
bool m_readMetadataWithPool
StringProperty m_collectionType
virtual StatusCode releaseContext(Context *&refCtxt) const override
StringProperty m_metadataName
Name of TTree to load from metadata of input files.
xAOD::xAODTEvent * m_tevent
current TEvent being read
xAODEventSelector * self() const
non-const access to self (b/c next() is const)
std::vector< CollMetaData > m_collEvts
cache of the number of entries for each collection
StatusCode do_init_io()
helper method to init the i/o components
virtual StatusCode io_reinit() override
Callback method to reinitialize the internal state of the component for I/O purposes (e....
ServiceHandle< IProxyProviderSvc > m_ppSvc
Handle to the proxy provider svc.
virtual StatusCode loadAddresses(StoreID::type storeID, tadList &list) override
get all new addresses from Provider for this Event.
ServiceHandle< StoreGateSvc > m_dataStore
Pointer to the StoreGateSvc event store.
bool m_printEventProxyWarnings
StatusCode setFile(const std::string &fname)
switch to given file, loading metadata and triggering a beginInputFile incident
virtual StatusCode previous(Context &refCtxt) const override
std::unordered_map< SG::TransientAddress *, bool > m_rootAddresses
virtual int curEvent(const Context &refCtxt) const override
return the current event number.
ServiceHandle< IIncidentSvc > m_incsvc
Handle to the incident service.
virtual StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&) const override
virtual StatusCode finalize() override
ServiceHandle< IClassIDSvc > m_clidsvc
Pointer to the IClassIDSvc.
virtual StatusCode last(Context &refContext) const override
virtual StatusCode seek(Context &refCtxt, int evtnum) const override
Seek to a given event number.
TFile * fetchNtupleFile(const std::string &fname) const
helper method to retrieve the correct tuple
long m_curEvt
current event index
ServiceHandle< IPoolSvc > m_poolSvc
Handle to the PoolSvc (used in Hybrid mode when user is reading metadata with pool)
virtual StatusCode createContext(Context *&refpCtxt) const override
long m_skipEvts
Number of events to skip at the beginning.
virtual StatusCode rewind(Context &refCtxt) const override
long m_collIdx
current collection index (into m_inputCollectionsName)
virtual void handle(const Incident &incident) override
virtual StatusCode preLoadAddresses(StoreID::type storeID, tadList &list) override
ServiceHandle< StoreGateSvc > m_imetaStore
Pointer to the StoreGateSvc input metadata store.
a simple interface to interact with the Reflex dictionaries and abstract/workaround a few ROOT bugs.
The Athena Transient Store API.
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....
StatusCode ROOTMessageFilterSvc::initialize ATLAS_NOT_THREAD_SAFE()
Return the file descriptor fataldump() uses for output.