5#ifndef EVENTSELECTORATHENAPOOL_H
6#define EVENTSELECTORATHENAPOOL_H
13#include "GaudiKernel/IEvtSelector.h"
14#include "GaudiKernel/IIoComponent.h"
15#include "GaudiKernel/IIncidentListener.h"
16#include "GaudiKernel/ServiceHandle.h"
17#include "GaudiKernel/ToolHandle.h"
50 public extends<::AthService, IEvtSelector, IEvtSelectorSeek, IIoComponent, IIncidentListener, ISecondaryEventSelector>
61 virtual StatusCode
start()
override;
62 virtual StatusCode
stop()
override;
63 virtual StatusCode
finalize()
override;
68 virtual StatusCode
createContext(IEvtSelector::Context*& ctxt)
const override;
71 virtual StatusCode
next(IEvtSelector::Context& ctxt)
const override;
74 virtual StatusCode
next(IEvtSelector::Context& ctxt,
int jump)
const override;
77 virtual StatusCode
previous(IEvtSelector::Context& ctxt)
const override;
80 virtual StatusCode
previous(IEvtSelector::Context& ctxt,
int jump)
const override;
83 virtual StatusCode
last(IEvtSelector::Context& ctxt)
const override;
86 virtual StatusCode
rewind(IEvtSelector::Context& ctxt)
const override;
90 virtual StatusCode
createAddress(
const IEvtSelector::Context& ctxt, IOpaqueAddress*& iop)
const override;
93 virtual StatusCode
releaseContext(IEvtSelector::Context*& ctxt)
const override;
98 virtual StatusCode
resetCriteria(
const std::string& criteria, IEvtSelector::Context& ctxt)
const override;
105 virtual StatusCode
seek(Context& ctxt,
int evtnum)
const override;
109 virtual int curEvent (
const Context& ctxt)
const override;
113 virtual int size (Context& ctxt)
const override;
125 virtual void handle(
const Incident& incident)
override;
133 virtual StatusCode
nextWithSkip(IEvtSelector::Context& ctxt)
const override;
137 virtual StatusCode
fillAttributeList(coral::AttributeList *attrList,
const std::string &suffix,
bool copySource)
const override;
145 StatusCode
reinit()
const;
147 std::unique_ptr<PoolCollectionConverter>
getCollectionCnv(
bool throwIncidents =
false)
const;
153 mutable std::unique_ptr<PoolCollectionConverter> m_poolCollectionConverter
ATLAS_THREAD_SAFE {};
169 Gaudi::Property<std::string>
m_collectionType{
this,
"CollectionType",
"ImplicitCollection",
""};
186 mutable ToolHandleArray<IAthenaSelectorTool> m_helperTools
ATLAS_THREAD_SAFE {
this,
"HelperTools", {},
""};
192 Gaudi::CheckedProperty<uint32_t>
m_runNo{
this,
"RunNumber", 0,
""};
193 Gaudi::CheckedProperty<uint32_t>
m_oldRunNo{
this,
"OldRunNumber", 0,
""};
199 Gaudi::CheckedProperty<uint64_t>
m_eventsPerRun{
this,
"EventsPerRun", 1000000,
""};
200 Gaudi::CheckedProperty<uint32_t>
m_firstLBNo{
this,
"FirstLB", 0,
""};
201 Gaudi::CheckedProperty<uint32_t>
m_eventsPerLB{
this,
"EventsPerLB", 1000,
""};
Maintain a set of objects, one per slot.
This file contains the class definition for the Guid class (migrated from POOL).
This file contains the class definition for the IAthenaPoolCnvSvc interface class.
Extension to IEvtSelector to allow for seeking.
Abstract interface for secondary event selectors.
size_t size() const
Number of registered mappings.
This class provides the context to access an event from POOL persistent store.
EventSelectorAthenaPool(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
Gaudi::CheckedProperty< uint64_t > m_firstEventNo
virtual StatusCode start() override
std::unique_ptr< PoolCollectionConverter > getCollectionCnv(bool throwIncidents=false) const
Return pointer to new PoolCollectionConverter.
Gaudi::Property< bool > m_isSecondary
IsSecondary, know if this is an instance of secondary event selector.
Gaudi::Property< bool > m_overrideRunNumberFromInput
virtual StatusCode nextWithSkip(IEvtSelector::Context &ctxt) const override
Go to next event and skip if necessary.
virtual StatusCode initialize() override
Required of all Gaudi Services.
Gaudi::Property< int > m_skipEvents
SkipEvents, numbers of events to skip: default = 0.
Gaudi::Property< bool > m_processMetadata
ProcessMetadata, switch on firing of FileIncidents which will trigger processing of metadata: default...
virtual int curEvent(const Context &ctxt) const override
Return the current event number.
virtual StatusCode createContext(IEvtSelector::Context *&ctxt) const override
create context
friend class EventSelectorAthenaPoolSharedIO
make the EventSelectorAthenaPoolSharedIO a friend so it can access the internal EventSelectorAthenaPo...
virtual StatusCode io_finalize() override
Callback method to finalize the internal state of the component for I/O purposes (e....
Gaudi::Property< std::vector< long > > m_skipEventSequenceProp
friend class DoubleEventSelectorAthenaPool
make the DoubleEventSelectorAthenaPool a friend so it can access the internal EventSelectorAthenaPool...
Gaudi::CheckedProperty< uint32_t > m_initTimeStamp
void inputCollectionsHandler(Gaudi::Details::PropertyBase &)
virtual StatusCode io_reinit() override
Callback method to reinitialize the internal state of the component for I/O purposes (e....
virtual StatusCode resetCriteria(const std::string &criteria, IEvtSelector::Context &ctxt) const override
Set a selection criteria.
StatusCode reinit() const
Reinitialize the service when a fork() occurred/was-issued.
StoreGateSvc * eventStore() const
Return pointer to active event SG.
virtual StatusCode releaseContext(IEvtSelector::Context *&ctxt) const override
virtual StatusCode stop() override
ServiceHandle< IIncidentSvc > m_incidentSvc
virtual StatusCode next(IEvtSelector::Context &ctxt) const override
virtual ~EventSelectorAthenaPool()
Destructor.
std::unique_ptr< PoolCollectionConverter > m_poolCollectionConverter ATLAS_THREAD_SAFE
ToolHandle< IAthenaSelectorTool > m_counterTool
virtual StatusCode fillAttributeList(coral::AttributeList *attrList, const std::string &suffix, bool copySource) const override
Fill AttributeList with specific items from the selector and a suffix.
std::string m_attrListKey
AttributeList SG key.
virtual StatusCode seek(Context &ctxt, int evtnum) const override
Seek to a given event number.
SG::SlotSpecificObj< SG::SourceID > m_sourceID
virtual StatusCode last(IEvtSelector::Context &ctxt) const override
Gaudi::CheckedProperty< uint64_t > m_eventsPerRun
Gaudi::CheckedProperty< uint32_t > m_eventsPerLB
virtual StatusCode createAddress(const IEvtSelector::Context &ctxt, IOpaqueAddress *&iop) const override
virtual void handle(const Incident &incident) override
Incident service handle listening for BeginProcessing and EndProcessing.
virtual StatusCode previous(IEvtSelector::Context &ctxt) const override
ServiceHandle< IAthenaPoolCnvSvc > m_athenaPoolCnvSvc
virtual StatusCode rewind(IEvtSelector::Context &ctxt) const override
Gaudi::Property< bool > m_keepInputFilesOpen
KeepInputFilesOpen, boolean flag to keep files open after PoolCollection reaches end: default = false...
Gaudi::CheckedProperty< uint32_t > m_oldRunNo
Gaudi::Property< std::string > m_collectionType
CollectionType, type of the collection: default = "ImplicitCollection".
virtual StatusCode finalize() override
virtual bool disconnectIfFinished(const SG::SourceID &fid) const override
Disconnect DB if all events from the source FID were processed and the Selector moved to another file...
Gaudi::Property< std::vector< std::string > > m_inputCollectionsProp
InputCollections, vector with names of the input collections.
EventContextAthenaPool * m_endIter
std::atomic_int m_evtCount
std::atomic_bool m_firedIncident
std::atomic_long m_curCollection
virtual StatusCode nextHandleFileTransition(IEvtSelector::Context &ctxt) const override
Handle file transition at the next iteration.
virtual StatusCode recordAttributeList() const override
Record AttributeList in StoreGate.
Gaudi::CheckedProperty< uint32_t > m_runNo
The following are included for compatibility with McEventSelector and are not really used.
int findEvent(int evtNum) const
Search for event with number evtNum.
Gaudi::Property< bool > m_overrideRunNumber
Gaudi::Property< std::string > m_skipEventRangesProp
Skip Events - comma separated list of event to skip, ranges with '-': <start> - <end>.
Gaudi::Property< uint32_t > m_timeStampInterval
Gaudi::CheckedProperty< uint32_t > m_firstLBNo
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
This class provides an interface to POOL collections.
Maintain a set of objects, one per slot.
The Athena Transient Store API.
An interface used to navigate the result of a query on a collection.