![]() |
ATLAS Offline Software
|
concrete implementation of IEvtSelector for ByteStream More...
#include <EventSelectorByteStream.h>
Public Member Functions | |
| EventSelectorByteStream (const std::string &name, ISvcLocator *svcloc) | |
| Standard Constructor. | |
| virtual | ~EventSelectorByteStream () |
| Standard Destructor. | |
| virtual StatusCode | initialize () override |
| Implementation of Service base class methods. | |
| virtual StatusCode | start () override |
| virtual StatusCode | stop () override |
| virtual StatusCode | finalize () override |
| virtual StatusCode | createContext (Context *&it) const override |
| create context | |
| virtual StatusCode | next (Context &it) const override |
| virtual StatusCode | next (Context &it, int jump) const override |
| virtual StatusCode | previous (Context &it) const override |
| virtual StatusCode | previous (Context &it, int jump) const override |
| virtual StatusCode | last (Context &it) const override |
| virtual StatusCode | rewind (Context &it) const override |
| virtual StatusCode | createAddress (const Context &it, IOpaqueAddress *&iop) const override |
| virtual StatusCode | releaseContext (Context *&it) const override |
| virtual StatusCode | resetCriteria (const std::string &criteria, Context &context) const override |
| Set a selection criteria. | |
| virtual StatusCode | seek (Context &, int evtnum) const override |
| Seek to a given event number. | |
| virtual int | curEvent (const Context &it) const override |
| Return the current event number. | |
| virtual int | size (Context &it) const override |
| Always returns -1. | |
| virtual StatusCode | makeServer (int num) override |
| Make this a server. | |
| virtual StatusCode | makeClient (int num) override |
| Make this a client. | |
| virtual StatusCode | share (int evtnum) override |
| Request to share a given event number. | |
| virtual StatusCode | readEvent (int maxevt) override |
| Read the next maxevt events. | |
| virtual StatusCode | io_reinit () override |
Callback method to reinitialize the internal state of the component for I/O purposes (e.g. upon fork(2)). | |
Protected Types | |
| using | mutex_t = std::recursive_mutex |
| using | lock_t = std::lock_guard<mutex_t> |
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 |
Private Member Functions | |
| StatusCode | nextImpl (Context &it, lock_t &lock) const |
| StatusCode | nextImpl (Context &it, int jump, lock_t &lock) const |
| StatusCode | previousImpl (Context &it, lock_t &lock) const |
| StatusCode | previousImpl (Context &it, int jump, lock_t &lock) const |
| StatusCode | nextHandleFileTransitionImpl (IEvtSelector::Context &ctxt, lock_t &lock) const |
| StatusCode | nextWithSkipImpl (IEvtSelector::Context &ctxt, lock_t &lock) const |
| StatusCode | recordAttributeListImpl (lock_t &lock) const |
| StatusCode | fillAttributeListImpl (coral::AttributeList *attrList, const std::string &suffix, bool copySource, lock_t &lock) const |
| StatusCode | reinit (lock_t &lock) |
Reinitialize the service when a fork() occurred/was-issued. | |
| StatusCode | openNewRun (lock_t &lock) const |
| long | openBlock (const std::string &fileName, lock_t &lock) const |
Open fileName as the current file, without input file incidents (see fileTransition()). | |
| void | fileTransition (lock_t &lock) const |
| EndInputFile for the file begun last and BeginInputFile for the file opened since, if any. | |
| void | nextFile (lock_t &lock) const |
| int | findEvent (int evtNum, lock_t &lock) const |
| Search for event with number evtNum. | |
| StoreGateSvc * | eventStore () const |
| void | inputCollectionsHandler (Gaudi::Details::PropertyBase &) |
Private Attributes | |
| mutex_t | m_mutex |
| int m_fileCount | ATLAS_THREAD_SAFE = 0 |
| number of files to process. | |
| std::vector< int > m_numEvt | ATLAS_THREAD_SAFE |
| std::vector< int > m_firstEvt | ATLAS_THREAD_SAFE |
| std::vector< std::string >::const_iterator m_inputCollectionsIterator | ATLAS_THREAD_SAFE |
| std::vector< long > m_skipEventSequence | ATLAS_THREAD_SAFE |
| long m_NumEvents | ATLAS_THREAD_SAFE = 0 |
| ToolHandle< IAthenaIPCTool > m_eventStreamingTool | ATLAS_THREAD_SAFE {this, "SharedMemoryTool", "", ""} |
| Gaudi::Property< bool > | m_isSecondary {this, "IsSecondary", false, ""} |
| IsSecondary, know if this is an instance of secondary event selector. | |
| Gaudi::Property< std::string > | m_eventSourceName {this, "ByteStreamInputSvc", "", ""} |
| Gaudi::Property< bool > | m_procBadEvent {this, "ProcessBadEvent", false, ""} |
| process bad events, which fail check_tree(). | |
| Gaudi::Property< int > | m_maxBadEvts {this, "MaxBadEvents", -1, ""} |
| number of bad events allowed before quitting. | |
| EventContextByteStream * | m_beginIter {} |
| EventContextByteStream * | m_endIter {} |
| SmartIF< IByteStreamInputSvc > | m_eventSource |
| Gaudi::Property< std::vector< std::string > > | m_inputCollectionsProp {this, "Input", {}, ""} |
| ServiceHandle< IIncidentSvc > | m_incidentSvc {this, "IncidentSvc", "IncidentSvc", ""} |
| Gaudi::Property< long > | m_skipEvents {this, "SkipEvents", 0, ""} |
| Gaudi::Property< std::vector< long > > | m_skipEventSequenceProp {this, "SkipEventSequence", {}, ""} |
| bool | m_firstFileFired {} |
| std::optional< InputFileIncidentGuard > m_inputFileGuard | ATLAS_THREAD_SAFE |
| RAII guard: guarantees a matching EndInputFile for every BeginInputFile. | |
| std::optional< std::pair< std::string, std::string > > m_pendingFile | ATLAS_THREAD_SAFE |
| Name and GUID of the file opened last, until fileTransition() fires its BeginInputFile. | |
| ToolHandleArray< IAthenaSelectorTool > | m_helperTools {this, "HelperTools", {}, "Helper tools executed by EventSelector"} |
| HelperTools, vector of names of AlgTools that are executed by the EventSelector. | |
| ToolHandle< IAthenaSelectorTool > | m_counterTool {this, "CounterTool", "", ""} |
| Gaudi::Property< bool > | m_overrideRunNumber {this, "OverrideRunNumber", false, ""} |
| The following are included for compatibility with McEventSelector and are not really used. | |
| Gaudi::Property< bool > | m_filebased {this, "FileBased", true, ""} |
| Gaudi::CheckedProperty< uint32_t > | m_runNo {this, "RunNumber", 0, ""} |
| 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, ""} |
concrete implementation of IEvtSelector for ByteStream
An event selector service that steps through Event Filter packed raw events by use of an event source object and an iterator object called EventIteratorByteStream. The type of event source is specified at run time. It
Definition at line 45 of file EventSelectorByteStream.h.
|
protected |
Definition at line 130 of file EventSelectorByteStream.h.
|
protected |
Definition at line 129 of file EventSelectorByteStream.h.
| EventSelectorByteStream::EventSelectorByteStream | ( | const std::string & | name, |
| ISvcLocator * | svcloc ) |
Standard Constructor.
Definition at line 43 of file EventSelectorByteStream.cxx.
|
virtual |
|
overridevirtual |
| it | [IN] current event context. |
| iop | [OUT] pointer to IOpaqueAddress reference of selection context. |
Definition at line 985 of file EventSelectorByteStream.cxx.
|
overridevirtual |
create context
Definition at line 315 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Return the current event number.
| it | [IN/OUT] current event context. |
Definition at line 896 of file EventSelectorByteStream.cxx.
|
overrideprotectedvirtual |
Definition at line 1041 of file EventSelectorByteStream.cxx.
|
private |
Definition at line 78 of file EventSelectorByteStream.cxx.
|
private |
EndInputFile for the file begun last and BeginInputFile for the file opened since, if any.
Definition at line 305 of file EventSelectorByteStream.cxx.
|
overrideprotectedvirtual |
Fill AttributeList with specific items from the selector and a suffix.
Definition at line 761 of file EventSelectorByteStream.cxx.
|
private |
Definition at line 766 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Definition at line 226 of file EventSelectorByteStream.cxx.
|
private |
Search for event with number evtNum.
Definition at line 858 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Implementation of Service base class methods.
Definition at line 84 of file EventSelectorByteStream.cxx.
|
private |
|
overridevirtual |
Callback method to reinitialize the internal state of the component for I/O purposes (e.g. upon fork(2)).
Definition at line 1004 of file EventSelectorByteStream.cxx.
|
overridevirtual |
| it | [IN/OUT] current event context is iterated to last event. |
Definition at line 660 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Make this a client.
Definition at line 917 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Make this a server.
Definition at line 908 of file EventSelectorByteStream.cxx.
|
overridevirtual |
| it | [IN/OUT] current event context is iterated to next event. |
|
overridevirtual |
| it | [IN/OUT] current event context is iterated to next event. |
| jump | [IN] number of events to jump (currently not supported). |
|
private |
Definition at line 244 of file EventSelectorByteStream.cxx.
|
overrideprotectedvirtual |
Handle file transition at the next iteration.
Definition at line 481 of file EventSelectorByteStream.cxx.
|
private |
Definition at line 486 of file EventSelectorByteStream.cxx.
|
private |
|
private |
|
overrideprotectedvirtual |
Go to next event and skip if necessary.
Definition at line 540 of file EventSelectorByteStream.cxx.
|
private |
Definition at line 545 of file EventSelectorByteStream.cxx.
|
private |
Open fileName as the current file, without input file incidents (see fileTransition()).
Returns the number of events in the file, -1 if it cannot be opened.
Definition at line 297 of file EventSelectorByteStream.cxx.
|
private |
Definition at line 253 of file EventSelectorByteStream.cxx.
|
overridevirtual |
| it | [IN/OUT] current event context is iterated to previous event. |
|
overridevirtual |
| it | [IN/OUT] current event context is iterated to previous event. |
| jump | [IN] number of events to jump (currently not supported). |
|
private |
|
private |
|
overridevirtual |
Read the next maxevt events.
| evtnum | [IN] The number of events to read. |
Definition at line 944 of file EventSelectorByteStream.cxx.
|
overrideprotectedvirtual |
Record AttributeList in StoreGate.
Definition at line 734 of file EventSelectorByteStream.cxx.
|
private |
Definition at line 739 of file EventSelectorByteStream.cxx.
|
private |
Reinitialize the service when a fork() occurred/was-issued.
Definition at line 155 of file EventSelectorByteStream.cxx.
|
overridevirtual |
| it | [IN] current event context is released. |
Definition at line 999 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Set a selection criteria.
| criteria | filter predicate (SQL-style WHERE clause) |
| context | [IN] current event context. |
Definition at line 674 of file EventSelectorByteStream.cxx.
|
overridevirtual |
| it | [IN/OUT] current event context is rewound to first event. |
Definition at line 668 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Seek to a given event number.
| it | [IN/OUT] current event context. |
| evtnum | [IN] The event number to which to seek. |
Definition at line 679 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Request to share a given event number.
| evtnum | [IN] The event number to share. |
Definition at line 927 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Always returns -1.
| it | [IN/OUT] current event context. |
Definition at line 903 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Definition at line 200 of file EventSelectorByteStream.cxx.
|
overridevirtual |
Definition at line 212 of file EventSelectorByteStream.cxx.
|
mutableprivate |
Name and GUID of the file opened last, until fileTransition() fires its BeginInputFile.
Definition at line 208 of file EventSelectorByteStream.h.
|
mutableprivate |
RAII guard: guarantees a matching EndInputFile for every BeginInputFile.
Definition at line 206 of file EventSelectorByteStream.h.
|
mutableprivate |
Definition at line 185 of file EventSelectorByteStream.h.
|
mutableprivate |
Definition at line 184 of file EventSelectorByteStream.h.
|
mutableprivate |
Definition at line 183 of file EventSelectorByteStream.h.
|
mutableprivate |
Definition at line 182 of file EventSelectorByteStream.h.
|
mutableprivate |
Definition at line 181 of file EventSelectorByteStream.h.
|
mutableprivate |
Definition at line 180 of file EventSelectorByteStream.h.
|
mutableprivate |
number of files to process.
Definition at line 179 of file EventSelectorByteStream.h.
|
private |
Definition at line 194 of file EventSelectorByteStream.h.
|
private |
Definition at line 212 of file EventSelectorByteStream.h.
|
private |
Definition at line 195 of file EventSelectorByteStream.h.
|
private |
Definition at line 196 of file EventSelectorByteStream.h.
|
private |
Definition at line 190 of file EventSelectorByteStream.h.
|
private |
Definition at line 224 of file EventSelectorByteStream.h.
|
private |
Definition at line 222 of file EventSelectorByteStream.h.
|
private |
Definition at line 218 of file EventSelectorByteStream.h.
|
private |
Definition at line 221 of file EventSelectorByteStream.h.
|
private |
Definition at line 204 of file EventSelectorByteStream.h.
|
private |
Definition at line 223 of file EventSelectorByteStream.h.
|
private |
HelperTools, vector of names of AlgTools that are executed by the EventSelector.
Definition at line 211 of file EventSelectorByteStream.h.
|
private |
Definition at line 199 of file EventSelectorByteStream.h.
|
private |
Definition at line 225 of file EventSelectorByteStream.h.
|
private |
Definition at line 197 of file EventSelectorByteStream.h.
|
private |
IsSecondary, know if this is an instance of secondary event selector.
Definition at line 188 of file EventSelectorByteStream.h.
|
private |
number of bad events allowed before quitting.
Definition at line 192 of file EventSelectorByteStream.h.
|
mutableprivate |
Definition at line 178 of file EventSelectorByteStream.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 217 of file EventSelectorByteStream.h.
|
private |
process bad events, which fail check_tree().
Definition at line 191 of file EventSelectorByteStream.h.
|
private |
Definition at line 220 of file EventSelectorByteStream.h.
|
private |
Definition at line 201 of file EventSelectorByteStream.h.
|
private |
Definition at line 202 of file EventSelectorByteStream.h.
|
private |
Definition at line 226 of file EventSelectorByteStream.h.