![]() |
ATLAS Offline Software
|
This class is the EventSelector for event data. More...
#include <EventSelectorAthenaPool.h>
Public Member Functions | |
| EventSelectorAthenaPool (const std::string &name, ISvcLocator *pSvcLocator) | |
| Standard Service Constructor. | |
| virtual | ~EventSelectorAthenaPool () |
| Destructor. | |
| virtual StatusCode | initialize () override |
| Required of all Gaudi Services. | |
| virtual StatusCode | start () override |
| virtual StatusCode | stop () override |
| virtual StatusCode | finalize () override |
| virtual StatusCode | createContext (IEvtSelector::Context *&ctxt) const override |
| create context | |
| virtual StatusCode | next (IEvtSelector::Context &ctxt) const override |
| virtual StatusCode | next (IEvtSelector::Context &ctxt, int jump) const override |
| virtual StatusCode | previous (IEvtSelector::Context &ctxt) const override |
| virtual StatusCode | previous (IEvtSelector::Context &ctxt, int jump) const override |
| virtual StatusCode | last (IEvtSelector::Context &ctxt) const override |
| virtual StatusCode | rewind (IEvtSelector::Context &ctxt) const override |
| virtual StatusCode | createAddress (const IEvtSelector::Context &ctxt, IOpaqueAddress *&iop) const override |
| virtual StatusCode | releaseContext (IEvtSelector::Context *&ctxt) const override |
| virtual StatusCode | resetCriteria (const std::string &criteria, IEvtSelector::Context &ctxt) const override |
| Set a selection criteria. | |
| virtual StatusCode | seek (Context &ctxt, int evtnum) const override |
| Seek to a given event number. | |
| virtual int | curEvent (const Context &ctxt) const override |
| Return the current event number. | |
| virtual int | size (Context &ctxt) const override |
| Return the size of the collection. | |
| virtual StatusCode | io_reinit () override |
Callback method to reinitialize the internal state of the component for I/O purposes (e.g. upon fork(2)). | |
| virtual StatusCode | io_finalize () override |
Callback method to finalize the internal state of the component for I/O purposes (e.g. before fork(2)). | |
| virtual void | handle (const Incident &incident) override |
| Incident service handle listening for BeginProcessing and EndProcessing. | |
Protected Member Functions | |
| virtual StatusCode | nextHandleFileTransition (IEvtSelector::Context &ctxt) const override |
| Handle file transition at the next iteration. | |
| virtual StatusCode | nextWithSkip (IEvtSelector::Context &ctxt) const override |
| Go to next event and skip if necessary. | |
| virtual StatusCode | recordAttributeList () const override |
| Record AttributeList in StoreGate. | |
| 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. | |
| 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. | |
Private Types | |
| typedef std::mutex | CallMutex |
Private Member Functions | |
| StoreGateSvc * | eventStore () const |
| Return pointer to active event SG. | |
| StatusCode | reinit () const |
Reinitialize the service when a fork() occurred/was-issued. | |
| std::unique_ptr< PoolCollectionConverter > | getCollectionCnv (bool throwIncidents=false) const |
| Return pointer to new PoolCollectionConverter. | |
| int | findEvent (int evtNum) const |
| Search for event with number evtNum. | |
| void | inputCollectionsHandler (Gaudi::Details::PropertyBase &) |
Private Attributes | |
| EventContextAthenaPool * | m_endIter {} |
| std::unique_ptr< PoolCollectionConverter > m_poolCollectionConverter | ATLAS_THREAD_SAFE {} |
| pool::ICollectionCursor *m_headerIterator | ATLAS_THREAD_SAFE {} |
| Guid m_guid | ATLAS_THREAD_SAFE {} |
| std::map< SG::SourceID, int > m_activeEventsPerSource | ATLAS_THREAD_SAFE |
| std::optional< InputFileIncidentGuard > m_inputFileGuard | ATLAS_THREAD_SAFE |
| RAII guard: guarantees a matching EndInputFile for every BeginInputFile. | |
| ServiceHandle< IAthenaPoolCnvSvc > | m_athenaPoolCnvSvc {this, "ConversionService", "AthenaPoolCnvSvc", ""} |
| ServiceHandle< IIncidentSvc > | m_incidentSvc {this, "IncidentSvc", "IncidentSvc", ""} |
| Gaudi::Property< bool > | m_isSecondary {this, "IsSecondary", false, ""} |
| IsSecondary, know if this is an instance of secondary event selector. | |
| Gaudi::Property< bool > | m_processMetadata {this, "ProcessMetadata", true, ""} |
| ProcessMetadata, switch on firing of FileIncidents which will trigger processing of metadata: default = true. | |
| Gaudi::Property< std::string > | m_collectionType {this, "CollectionType", "ImplicitCollection", ""} |
| CollectionType, type of the collection: default = "ImplicitCollection". | |
| std::string | m_attrListKey {"Input"} |
| AttributeList SG key. | |
| Gaudi::Property< std::vector< std::string > > | m_inputCollectionsProp {this, "InputCollections", {}, ""} |
| InputCollections, vector with names of the input collections. | |
| std::vector< std::string >::const_iterator m_inputCollectionsIterator | ATLAS_THREAD_SAFE |
| bool m_inputCollectionsChanged | ATLAS_THREAD_SAFE |
| flag to notify the EvSel that the inputs were changed and reinit() needs to be called ASAP | |
| Gaudi::Property< bool > | m_keepInputFilesOpen {this, "KeepInputFilesOpen", false, ""} |
| KeepInputFilesOpen, boolean flag to keep files open after PoolCollection reaches end: default = false. | |
| ToolHandleArray< IAthenaSelectorTool > m_helperTools | ATLAS_THREAD_SAFE {this, "HelperTools", {}, ""} |
| HelperTools, vector of names of AlgTools that are executed by the EventSelector. | |
| ToolHandle< IAthenaSelectorTool > | m_counterTool {this, "CounterTool", "", ""} |
| Gaudi::CheckedProperty< uint32_t > | m_runNo {this, "RunNumber", 0, ""} |
| The following are included for compatibility with McEventSelector and are not really used. | |
| Gaudi::CheckedProperty< uint32_t > | m_oldRunNo {this, "OldRunNumber", 0, ""} |
| Gaudi::Property< bool > | m_overrideRunNumber {this, "OverrideRunNumber", false, ""} |
| Gaudi::Property< bool > | m_overrideRunNumberFromInput {this, "OverrideRunNumberFromInput", false, ""} |
| Gaudi::CheckedProperty< uint64_t > | m_firstEventNo {this, "FirstEvent", 1, ""} |
| Gaudi::CheckedProperty< uint64_t > | m_eventsPerRun {this, "EventsPerRun", 1000000, ""} |
| Gaudi::CheckedProperty< uint32_t > | m_firstLBNo {this, "FirstLB", 0, ""} |
| Gaudi::CheckedProperty< uint32_t > | m_eventsPerLB {this, "EventsPerLB", 1000, ""} |
| Gaudi::CheckedProperty< uint32_t > | m_initTimeStamp {this, "InitialTimeStamp", 0, ""} |
| Gaudi::Property< uint32_t > | m_timeStampInterval {this, "TimeStampInterval", 0, ""} |
| std::atomic_long | m_curCollection {} |
| std::vector< int > m_numEvt | ATLAS_THREAD_SAFE |
| std::vector< int > m_firstEvt | ATLAS_THREAD_SAFE |
| Gaudi::Property< int > | m_skipEvents {this, "SkipEvents", 0, ""} |
| SkipEvents, numbers of events to skip: default = 0. | |
| Gaudi::Property< std::vector< long > > | m_skipEventSequenceProp {this, "SkipEventSequence", {}, ""} |
| Gaudi::Property< std::string > | m_skipEventRangesProp {this, "SkipEventRanges", {}, ""} |
| Skip Events - comma separated list of event to skip, ranges with '-': <start> - <end>. | |
| std::vector< std::pair< long, long > > m_skipEventRanges | ATLAS_THREAD_SAFE |
| std::atomic_int | m_evtCount {} |
| std::atomic_bool | m_firedIncident {} |
| CallMutex | m_callLock |
| SG::SlotSpecificObj< SG::SourceID > | m_sourceID |
Friends | |
| class | DoubleEventSelectorAthenaPool |
make the DoubleEventSelectorAthenaPool a friend so it can access the internal EventSelectorAthenaPool methods and members | |
| class | EventSelectorAthenaPoolSharedIO |
make the EventSelectorAthenaPoolSharedIO a friend so it can access the internal EventSelectorAthenaPool methods and members | |
This class is the EventSelector for event data.
Definition at line 49 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 219 of file EventSelectorAthenaPool.h.
| EventSelectorAthenaPool::EventSelectorAthenaPool | ( | const std::string & | name, |
| ISvcLocator * | pSvcLocator ) |
Standard Service Constructor.
Definition at line 45 of file EventSelectorAthenaPool.cxx.
|
virtual |
|
overridevirtual |
| ctxt | [IN] current event context. |
| iop | [OUT] pointer to IOpaqueAddress reference of selection context. |
Definition at line 571 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
create context
Definition at line 343 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Return the current event number.
| ctxt | [IN/OUT] current event context. |
Definition at line 664 of file EventSelectorAthenaPool.cxx.
|
overrideprotectedvirtual |
Disconnect DB if all events from the source FID were processed and the Selector moved to another file.
Definition at line 902 of file EventSelectorAthenaPool.cxx.
|
private |
Return pointer to active event SG.
Definition at line 70 of file EventSelectorAthenaPool.cxx.
|
overrideprotectedvirtual |
Fill AttributeList with specific items from the selector and a suffix.
Definition at line 770 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Definition at line 324 of file EventSelectorAthenaPool.cxx.
|
private |
Search for event with number evtNum.
Definition at line 672 of file EventSelectorAthenaPool.cxx.
|
private |
Return pointer to new PoolCollectionConverter.
Definition at line 709 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Incident service handle listening for BeginProcessing and EndProcessing.
Reimplemented in DoubleEventSelectorAthenaPool.
Definition at line 861 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Required of all Gaudi Services.
Reimplemented in DoubleEventSelectorAthenaPool.
Definition at line 74 of file EventSelectorAthenaPool.cxx.
|
private |
Definition at line 61 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Callback method to finalize the internal state of the component for I/O purposes (e.g. before fork(2)).
Definition at line 844 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Callback method to reinitialize the internal state of the component for I/O purposes (e.g. upon fork(2)).
Definition at line 796 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
| ctxt | [IN/OUT] current event context is interated to last event. |
Definition at line 557 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
| ctxt | [IN/OUT] current event context is interated to next event. |
Reimplemented in DoubleEventSelectorAthenaPool.
Definition at line 348 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
| ctxt | [IN/OUT] current event context is interated to next event. |
| jump | [IN] number of events to jump (currently not supported). |
Reimplemented in DoubleEventSelectorAthenaPool.
Definition at line 411 of file EventSelectorAthenaPool.cxx.
|
overrideprotectedvirtual |
Handle file transition at the next iteration.
Definition at line 421 of file EventSelectorAthenaPool.cxx.
|
overrideprotectedvirtual |
Go to next event and skip if necessary.
Definition at line 504 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
| ctxt | [IN/OUT] current event context is interated to previous event. |
Definition at line 542 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
| ctxt | [IN/OUT] current event context is interated to previous event. |
| jump | [IN] number of events to jump (currently not supported). |
Definition at line 547 of file EventSelectorAthenaPool.cxx.
|
overrideprotectedvirtual |
Record AttributeList in StoreGate.
Reimplemented in DoubleEventSelectorAthenaPool.
Definition at line 752 of file EventSelectorAthenaPool.cxx.
|
private |
Reinitialize the service when a fork() occurred/was-issued.
Definition at line 182 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
| ctxt | [IN] current event context is released. |
Definition at line 593 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Set a selection criteria.
| criteria | filter predicate (SQL-style WHERE clause) |
| ctxt | [IN] current event context. |
Definition at line 597 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
| ctxt | [IN/OUT] current event context is rewound to first event. |
Definition at line 565 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Seek to a given event number.
| ctxt | [IN/OUT] current event context. |
| evtnum | [IN] The event number to which to seek. |
Reimplemented in DoubleEventSelectorAthenaPool.
Definition at line 602 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Return the size of the collection.
| ctxt | [IN/OUT] current event context. |
Reimplemented in DoubleEventSelectorAthenaPool.
Definition at line 702 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Definition at line 286 of file EventSelectorAthenaPool.cxx.
|
overridevirtual |
Definition at line 311 of file EventSelectorAthenaPool.cxx.
|
friend |
make the DoubleEventSelectorAthenaPool a friend so it can access the internal EventSelectorAthenaPool methods and members
Definition at line 226 of file EventSelectorAthenaPool.h.
|
friend |
make the EventSelectorAthenaPoolSharedIO a friend so it can access the internal EventSelectorAthenaPool methods and members
Definition at line 230 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 214 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 207 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 206 of file EventSelectorAthenaPool.h.
|
mutableprivate |
HelperTools, vector of names of AlgTools that are executed by the EventSelector.
Definition at line 186 of file EventSelectorAthenaPool.h.
|
mutableprivate |
flag to notify the EvSel that the inputs were changed and reinit() needs to be called ASAP
Definition at line 179 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 176 of file EventSelectorAthenaPool.h.
|
mutableprivate |
RAII guard: guarantees a matching EndInputFile for every BeginInputFile.
Definition at line 158 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 156 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 155 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 154 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 153 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 160 of file EventSelectorAthenaPool.h.
|
private |
|
mutableprivate |
Definition at line 220 of file EventSelectorAthenaPool.h.
|
private |
CollectionType, type of the collection: default = "ImplicitCollection".
Definition at line 169 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 187 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 205 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 152 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 201 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 199 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 216 of file EventSelectorAthenaPool.h.
|
mutableprivate |
Definition at line 217 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 197 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 200 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 161 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 202 of file EventSelectorAthenaPool.h.
|
private |
InputCollections, vector with names of the input collections.
Definition at line 175 of file EventSelectorAthenaPool.h.
|
private |
IsSecondary, know if this is an instance of secondary event selector.
Definition at line 165 of file EventSelectorAthenaPool.h.
|
private |
KeepInputFilesOpen, boolean flag to keep files open after PoolCollection reaches end: default = false.
Needed for PilUp to run without PoolFileCatalog. Relies on POOL to close files when reaching DB_AGE_LIMIT.
Definition at line 183 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 193 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 194 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 195 of file EventSelectorAthenaPool.h.
|
private |
ProcessMetadata, switch on firing of FileIncidents which will trigger processing of metadata: default = true.
Definition at line 167 of file EventSelectorAthenaPool.h.
|
private |
The following are included for compatibility with McEventSelector and are not really used.
However runNo, oldRunNo and overrideRunNumberFromInput are used to reset run number for simulated events, needed to use condition
Definition at line 192 of file EventSelectorAthenaPool.h.
|
private |
Skip Events - comma separated list of event to skip, ranges with '-': <start> - <end>.
Definition at line 213 of file EventSelectorAthenaPool.h.
|
private |
SkipEvents, numbers of events to skip: default = 0.
Definition at line 210 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 211 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 222 of file EventSelectorAthenaPool.h.
|
private |
Definition at line 203 of file EventSelectorAthenaPool.h.