ATLAS Offline Software
Loading...
Searching...
No Matches
EventSelectorByteStream Class Reference

concrete implementation of IEvtSelector for ByteStream More...

#include <EventSelectorByteStream.h>

Inheritance diagram for EventSelectorByteStream:
Collaboration diagram for EventSelectorByteStream:

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, ""}

Detailed Description

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

can be a single file, a set of files or the network.

Definition at line 45 of file EventSelectorByteStream.h.

Member Typedef Documentation

◆ lock_t

using EventSelectorByteStream::lock_t = std::lock_guard<mutex_t>
protected

Definition at line 130 of file EventSelectorByteStream.h.

◆ mutex_t

using EventSelectorByteStream::mutex_t = std::recursive_mutex
protected

Definition at line 129 of file EventSelectorByteStream.h.

Constructor & Destructor Documentation

◆ EventSelectorByteStream()

EventSelectorByteStream::EventSelectorByteStream ( const std::string & name,
ISvcLocator * svcloc )

Standard Constructor.

Definition at line 43 of file EventSelectorByteStream.cxx.

45 : base_class(name, svcloc) {
46 // RunNumber, OldRunNumber and OverrideRunNumberFromInput are used
47 // to override the run number coming in on the input stream
48 m_runNo.verifier().setLower(0);
49 // The following properties are only for compatibility with
50 // McEventSelector and are not really used anywhere
51 // TODO(berghaus): validate if those are even used
52 m_eventsPerRun.verifier().setLower(0);
53 m_firstEventNo.verifier().setLower(1);
54 m_firstLBNo.verifier().setLower(0);
55 m_eventsPerLB.verifier().setLower(0);
56 m_initTimeStamp.verifier().setLower(0);
57
58 m_inputCollectionsProp.declareUpdateHandler(
60}
Gaudi::CheckedProperty< uint32_t > m_firstLBNo
Gaudi::CheckedProperty< uint64_t > m_eventsPerRun
Gaudi::CheckedProperty< uint32_t > m_initTimeStamp
Gaudi::CheckedProperty< uint32_t > m_eventsPerLB
Gaudi::CheckedProperty< uint32_t > m_runNo
Gaudi::Property< std::vector< std::string > > m_inputCollectionsProp
void inputCollectionsHandler(Gaudi::Details::PropertyBase &)
Gaudi::CheckedProperty< uint64_t > m_firstEventNo

◆ ~EventSelectorByteStream()

EventSelectorByteStream::~EventSelectorByteStream ( )
virtual

Standard Destructor.

Definition at line 72 of file EventSelectorByteStream.cxx.

72 {
73}

Member Function Documentation

◆ createAddress()

StatusCode EventSelectorByteStream::createAddress ( const Context & it,
IOpaqueAddress *& iop ) const
overridevirtual
Parameters
it[IN] current event context.
iop[OUT] pointer to IOpaqueAddress reference of selection context.

Definition at line 985 of file EventSelectorByteStream.cxx.

986 {
987 SG::DataProxy* proxy = eventStore()->proxy(ClassID_traits<DataHeader>::ID(),"ByteStreamDataHeader");
988 if (proxy !=0) {
989 iop = proxy->address();
990 return StatusCode::SUCCESS;
991 } else {
992 iop = 0;
993 return StatusCode::FAILURE;
994 }
995}
StoreGateSvc * eventStore() const
virtual SG::DataProxy * proxy(const void *const pTransient) const override final
get proxy for a given data object address in memory

◆ createContext()

StatusCode EventSelectorByteStream::createContext ( Context *& it) const
overridevirtual

create context

Definition at line 315 of file EventSelectorByteStream.cxx.

315 {
316 it = new EventContextByteStream(this);
317 return StatusCode::SUCCESS;
318}

◆ curEvent()

int EventSelectorByteStream::curEvent ( const Context & it) const
overridevirtual

Return the current event number.

Parameters
it[IN/OUT] current event context.

Definition at line 896 of file EventSelectorByteStream.cxx.

896 {
897 // event counter in IEvtSelectorSeek interface
899 return int(m_NumEvents);
900}
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
std::lock_guard< mutex_t > lock_t

◆ disconnectIfFinished()

bool EventSelectorByteStream::disconnectIfFinished ( const SG::SourceID & fid) const
overrideprotectedvirtual

Definition at line 1041 of file EventSelectorByteStream.cxx.

1042{
1043 return true;
1044}

◆ eventStore()

StoreGateSvc * EventSelectorByteStream::eventStore ( ) const
private

Definition at line 78 of file EventSelectorByteStream.cxx.

78 {
80}
static StoreGateSvc * currentStoreGate()
get current StoreGate

◆ fileTransition()

void EventSelectorByteStream::fileTransition ( lock_t & lock) const
private

EndInputFile for the file begun last and BeginInputFile for the file opened since, if any.

Definition at line 305 of file EventSelectorByteStream.cxx.

305 {
306 if (m_pendingFile) {
307 // EndInputFile for the previous file (if any), then BeginInputFile for this one
309 m_pendingFile->first, m_pendingFile->second,
310 /*endFileName=*/{});
311 m_pendingFile.reset();
312 }
313}
ServiceHandle< IIncidentSvc > m_incidentSvc
static void transition(std::optional< InputFileIncidentGuard > &guard, IIncidentSvc &incSvc, std::string_view source, std::string_view beginFileName, std::string_view guid, std::string_view endFileName={}, std::string_view beginType=IncidentType::BeginInputFile, std::string_view endType=IncidentType::EndInputFile)
Replace the guard in an optional, with strict End-before-Begin ordering.

◆ fillAttributeList()

StatusCode EventSelectorByteStream::fillAttributeList ( coral::AttributeList * attrList,
const std::string & suffix,
bool copySource ) const
overrideprotectedvirtual

Fill AttributeList with specific items from the selector and a suffix.

Definition at line 761 of file EventSelectorByteStream.cxx.

762{
764 return fillAttributeListImpl (attrList, suffix, copySource, lock);
765}
StatusCode fillAttributeListImpl(coral::AttributeList *attrList, const std::string &suffix, bool copySource, lock_t &lock) const

◆ fillAttributeListImpl()

StatusCode EventSelectorByteStream::fillAttributeListImpl ( coral::AttributeList * attrList,
const std::string & suffix,
bool copySource,
lock_t & lock ) const
private

Definition at line 766 of file EventSelectorByteStream.cxx.

768{
769 attrList->extend("RunNumber" + suffix, "unsigned int");
770 attrList->extend("EventNumber" + suffix, "unsigned long long");
771 attrList->extend("LumiBlockN" + suffix, "unsigned int");
772 attrList->extend("BunchId" + suffix, "unsigned int");
773 attrList->extend("EventTime" + suffix, "unsigned int");
774 attrList->extend("EventTimeNanoSec" + suffix, "unsigned int");
775
776 // fill attribute list
777 const RawEvent* event = m_eventSource->currentEvent();
778
779 (*attrList)["RunNumber" + suffix].data<unsigned int>() = event->run_no();
780 if (event->version() < 0x03010000) {
781 (*attrList)["EventNumber" + suffix].data<unsigned long long>() = event->lvl1_id();
782 } else {
783 (*attrList)["EventNumber" + suffix].data<unsigned long long>() = event->global_id();
784 }
785 (*attrList)["LumiBlockN" + suffix].data<unsigned int>() = event->lumi_block();
786 (*attrList)["BunchId" + suffix].data<unsigned int>() = event->bc_id();
787
788 unsigned int bc_time_sec = event->bc_time_seconds();
789 unsigned int bc_time_ns = event->bc_time_nanoseconds();
790 // bc_time_ns should be lt 1e9.
791 if (bc_time_ns > 1000000000) {
792 // round it off to 1e9
793 ATH_MSG_WARNING(" bc_time nanosecond number larger than 1e9, it is " << bc_time_ns << ", reset it to 1 sec");
794 bc_time_ns = 1000000000;
795 }
796 (*attrList)["EventTime" + suffix].data<unsigned int>() = bc_time_sec;
797 (*attrList)["EventTimeNanoSec" + suffix].data<unsigned int>() = bc_time_ns;
798
800
801 event->status(buffer);
802 attrList->extend("TriggerStatus" + suffix, "unsigned int");
803 (*attrList)["TriggerStatus" + suffix].data<unsigned int>() = *buffer;
804
805 attrList->extend("ExtendedL1ID" + suffix, "unsigned int");
806 attrList->extend("L1TriggerType" + suffix, "unsigned int");
807 (*attrList)["ExtendedL1ID" + suffix].data<unsigned int>() = event->lvl1_id();
808 (*attrList)["L1TriggerType" + suffix].data<unsigned int>() = event->lvl1_trigger_type();
809
810 // Grab L1 words
811 event->lvl1_trigger_info(buffer);
812 for (uint32_t iT1 = 0; iT1 < event->nlvl1_trigger_info(); ++iT1) {
813 std::stringstream name;
814 name << "L1TriggerInfo_" << iT1;
815 attrList->extend(name.str() + suffix, "unsigned int");
816 (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
817 ++buffer;
818 }
819
820 // Grab L2 words
821 event->lvl2_trigger_info(buffer);
822 for (uint32_t iT1 = 0; iT1 < event->nlvl2_trigger_info(); ++iT1) {
823 if (*buffer != 0) {
824 std::stringstream name;
825 name << "L2TriggerInfo_" << iT1;
826 attrList->extend(name.str() + suffix, "unsigned int");
827 (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
828 }
829 ++buffer;
830 }
831
832 // Grab EF words
833 event->event_filter_info(buffer);
834 for (uint32_t iT1 = 0; iT1 < event->nevent_filter_info(); ++iT1) {
835 if (*buffer != 0) {
836 std::stringstream name;
837 name << "EFTriggerInfo_" << iT1;
838 attrList->extend(name.str() + suffix, "unsigned int");
839 (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
840 }
841 ++buffer;
842 }
843
844 // Grab stream tags
845 event->stream_tag(buffer);
846 std::vector<eformat::helper::StreamTag> onl_streamTags;
847 eformat::helper::decode(event->nstream_tag(), buffer, onl_streamTags);
848 for (std::vector<eformat::helper::StreamTag>::const_iterator itS = onl_streamTags.begin(),
849 itSE = onl_streamTags.end(); itS != itSE; ++itS) {
850 attrList->extend(itS->name + suffix, stringTypeStr);
851 (*attrList)[itS->name + suffix].data<std::string>() = itS->type;
852 }
853
854 return StatusCode::SUCCESS;
855}
#define ATH_MSG_WARNING(x,...)
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition RawEvent.h:37
SmartIF< IByteStreamInputSvc > m_eventSource

◆ finalize()

StatusCode EventSelectorByteStream::finalize ( )
overridevirtual

Definition at line 226 of file EventSelectorByteStream.cxx.

226 {
227 if (!m_counterTool.empty()) {
228 if (!m_counterTool->preFinalize().isSuccess()) {
229 ATH_MSG_WARNING("Failed to preFinalize() CounterTool");
230 }
231 }
232 for (ToolHandle<IAthenaSelectorTool>& tool : m_helperTools) {
233 if (!tool->preFinalize().isSuccess()) {
234 ATH_MSG_WARNING("Failed to preFinalize() " << tool->name());
235 }
236 }
237 delete m_beginIter; m_beginIter = nullptr;
238 delete m_endIter; m_endIter = nullptr;
239 if (m_eventSource) m_eventSource->release();
240 // Finalize the Service base class.
241 return AthService::finalize();
242}
ToolHandle< IAthenaSelectorTool > m_counterTool
EventContextByteStream * m_endIter
ToolHandleArray< IAthenaSelectorTool > m_helperTools
HelperTools, vector of names of AlgTools that are executed by the EventSelector.
EventContextByteStream * m_beginIter

◆ findEvent()

int EventSelectorByteStream::findEvent ( int evtNum,
lock_t & lock ) const
private

Search for event with number evtNum.

Definition at line 858 of file EventSelectorByteStream.cxx.

858 {
859 // Loop over file event counts
860 for (size_t i = 0; i < m_inputCollectionsProp.value().size(); i++) {
861 if (m_inputCollectionsProp.value().size() != m_numEvt.size()) {
862 ATH_MSG_ERROR("vector size incompatibility");
863 break;
864 }
865 // if file not opened yet, check it
866 if (m_numEvt[i] == -1) {
867 std::string fileName = m_inputCollectionsProp.value()[i];
868 // only to count its events, so not openBlock(): it must not become the current file
869 auto nevguid = m_eventSource->getBlockIterator(fileName);
870 long nev = nevguid.first;
871 // if failure on file open, exit
872 if (nev==-1) {
873 break;
874 }
875 // set initial event counter for that file
876 if (i > 0) {
877 m_firstEvt[i] = m_firstEvt[i - 1] + m_numEvt[i - 1];
878 } else {
879 m_firstEvt[i] = 0;
880 }
881 // log number of events in that file
882 m_numEvt[i] = nev;
883 }
884 // if sought event is in this file, then return the index of that file
885 if (evtNum >= m_firstEvt[i] && evtNum < m_firstEvt[i] + m_numEvt[i]) {
886 ATH_MSG_INFO("found " << evtNum << " in file " << i);
887 return i;
888 }
889 }
890 ATH_MSG_INFO("did not find ev " << evtNum);
891 // return file not found marker
892 return -1;
893}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(x,...)
size_t size() const
Number of registered mappings.

◆ initialize()

StatusCode EventSelectorByteStream::initialize ( )
overridevirtual

Implementation of Service base class methods.

Definition at line 84 of file EventSelectorByteStream.cxx.

84 {
85
86 m_autoRetrieveTools = false;
87 m_checkToolDeps = false;
88
89 if (m_isSecondary.value()) {
90 ATH_MSG_DEBUG("Initializing secondary event selector " << name());
91 } else {
92 ATH_MSG_DEBUG("Initializing " << name());
93 }
94
95 ATH_CHECK(::AthService::initialize());
96
97 // Check for input setting
98 if (m_filebased && m_inputCollectionsProp.value().empty()) {
99 ATH_MSG_FATAL("Unable to retrieve valid input list");
100 return StatusCode::FAILURE;
101 }
102 m_skipEventSequence = m_skipEventSequenceProp.value();
103 std::sort(m_skipEventSequence.begin(), m_skipEventSequence.end());
104
105 // Check ByteStreamCnvSvc
106 m_eventSource = serviceLocator()->service(m_eventSourceName.value());
107 if (!m_eventSource) {
108 ATH_MSG_FATAL("Cannot get ByteStreamInputSvc");
109 return StatusCode::FAILURE;
110 }
111
112 // Get CounterTool (if configured)
113 if (!m_counterTool.empty()) {
114 ATH_CHECK(m_counterTool.retrieve());
115 }
116 // Get HelperTools
117 if (!m_helperTools.empty()) {
118 ATH_CHECK(m_helperTools.retrieve());
119 }
120 // Get SharedMemoryTool (if configured)
121 if (!m_eventStreamingTool.empty()) {
122 ATH_CHECK(m_eventStreamingTool.retrieve());
123 }
124
125 // Register this service for 'I/O' events
126 ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
127 ATH_CHECK(iomgr.retrieve());
128 ATH_CHECK(iomgr->io_register(this));
129
130 // Register the input files with the iomgr
131 bool allGood = true;
132 for (const std::string& input : m_inputCollectionsProp.value()) {
133 if (!iomgr->io_register(this, IIoComponentMgr::IoMode::READ, input).isSuccess()) {
134 ATH_MSG_FATAL("could not register [" << input << "] for output !");
135 allGood = false;
136 } else {
137 ATH_MSG_VERBOSE("io_register[" << this->name() << "](" << input << ") [ok]");
138 }
139 }
140 if (!allGood) {
141 return(StatusCode::FAILURE);
142 }
143
144 // Make sure MetaDataSvc is initialized before the first file is opened
145 ServiceHandle<IAthMetaDataSvc> metaDataSvc("MetaDataSvc", name());
146 ATH_CHECK(metaDataSvc.retrieve());
147
148 // Must happen before trying to open a file
150 StatusCode risc = this->reinit(lock);
151
152 return risc;
153}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_VERBOSE(x,...)
#define ATH_MSG_FATAL(x,...)
Gaudi::Property< bool > m_isSecondary
IsSecondary, know if this is an instance of secondary event selector.
Gaudi::Property< std::string > m_eventSourceName
Gaudi::Property< bool > m_filebased
StatusCode reinit(lock_t &lock)
Reinitialize the service when a fork() occurred/was-issued.
Gaudi::Property< std::vector< long > > m_skipEventSequenceProp
::StatusCode StatusCode
StatusCode definition for legacy code.
bool allGood
Loop over the SDOs & Digits.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ inputCollectionsHandler()

void EventSelectorByteStream::inputCollectionsHandler ( Gaudi::Details::PropertyBase & )
private

Definition at line 63 of file EventSelectorByteStream.cxx.

63 {
65 if (this->FSMState() != Gaudi::StateMachine::OFFLINE) {
66 this->reinit(lock).ignore();
67 }
68}

◆ io_reinit()

StatusCode EventSelectorByteStream::io_reinit ( )
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.

1004 {
1006 ATH_MSG_INFO("I/O reinitialization...");
1007 ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
1008 ATH_CHECK(iomgr.retrieve());
1009 if (!iomgr->io_hasitem(this)) {
1010 ATH_MSG_FATAL("IoComponentMgr does not know about myself !");
1011 return StatusCode::FAILURE;
1012 }
1013 std::vector<std::string> inputCollections = m_inputCollectionsProp.value();
1014 for (std::size_t i = 0, imax = inputCollections.size(); i != imax; ++i) {
1015 ATH_MSG_INFO("I/O reinitialization, file = " << inputCollections[i]);
1016 std::string &fname = inputCollections[i];
1017 if (!iomgr->io_contains(this, fname)) {
1018 ATH_MSG_ERROR("IoComponentMgr does not know about [" << fname << "] !");
1019 return StatusCode::FAILURE;
1020 }
1021 ATH_CHECK(iomgr->io_retrieve(this, fname));
1022 }
1023 // all good... copy over.
1024 m_inputFileGuard.reset();
1025 m_pendingFile.reset();
1026
1027 // Set m_inputCollectionsProp. But we _dont_ want to run the update
1028 // handler --- that calls reinit(), which will deadlock since
1029 // we're holding the lock. Instead, we'll call reinit() ourselves.
1030 auto old_cb = m_inputCollectionsProp.updateCallBack();
1031 m_inputCollectionsProp.declareUpdateHandler(
1032 [] (Gaudi::Details::PropertyBase&) {}
1033 );
1035 m_inputCollectionsProp.declareUpdateHandler (std::move(old_cb));
1036
1037 return this->reinit(lock);
1038}
int imax(int i, int j)

◆ last()

StatusCode EventSelectorByteStream::last ( Context & it) const
overridevirtual
Parameters
it[IN/OUT] current event context is iterated to last event.

Definition at line 660 of file EventSelectorByteStream.cxx.

660 {
661 if (it.identifier() == m_endIter->identifier()) {
662 ATH_MSG_DEBUG("last(): Last event in InputStream.");
663 return StatusCode::SUCCESS;
664 }
665 return StatusCode::FAILURE;
666}

◆ makeClient()

StatusCode EventSelectorByteStream::makeClient ( int num)
overridevirtual

Make this a client.

Definition at line 917 of file EventSelectorByteStream.cxx.

917 {
919 if (m_eventStreamingTool.empty()) {
920 return StatusCode::FAILURE;
921 }
922 std::string dummyStr;
923 return m_eventStreamingTool->makeClient(0, dummyStr);
924}

◆ makeServer()

StatusCode EventSelectorByteStream::makeServer ( int num)
overridevirtual

Make this a server.

Definition at line 908 of file EventSelectorByteStream.cxx.

908 {
910 if (m_eventStreamingTool.empty()) {
911 return StatusCode::FAILURE;
912 }
913 return m_eventStreamingTool->makeServer(1, "");
914}

◆ next() [1/2]

virtual StatusCode EventSelectorByteStream::next ( Context & it) const
overridevirtual
Parameters
it[IN/OUT] current event context is iterated to next event.

◆ next() [2/2]

virtual StatusCode EventSelectorByteStream::next ( Context & it,
int jump ) const
overridevirtual
Parameters
it[IN/OUT] current event context is iterated to next event.
jump[IN] number of events to jump (currently not supported).

◆ nextFile()

void EventSelectorByteStream::nextFile ( lock_t & lock) const
private

Definition at line 244 of file EventSelectorByteStream.cxx.

244 {
245 // EndInputFile as soon as the file is done, also the last one: AthenaMP's event counter
246 // queues the last partial chunk on it, before it marks the end of the queue
247 m_inputFileGuard.reset();
248 m_pendingFile.reset();
249 ++m_inputCollectionsIterator;
250 ++m_fileCount;
251}

◆ nextHandleFileTransition()

StatusCode EventSelectorByteStream::nextHandleFileTransition ( IEvtSelector::Context & ctxt) const
overrideprotectedvirtual

Handle file transition at the next iteration.

Definition at line 481 of file EventSelectorByteStream.cxx.

482{
484 return nextHandleFileTransitionImpl (ctxt, lock);
485}
StatusCode nextHandleFileTransitionImpl(IEvtSelector::Context &ctxt, lock_t &lock) const

◆ nextHandleFileTransitionImpl()

StatusCode EventSelectorByteStream::nextHandleFileTransitionImpl ( IEvtSelector::Context & ctxt,
lock_t & lock ) const
private

Definition at line 486 of file EventSelectorByteStream.cxx.

488{
489 const RawEvent* pre{};
490 bool badEvent{};
491 // if event source not ready from init, try next file
492 if (m_filebased && !m_eventSource->ready()) {
493 // next file
494 this->nextFile(lock);
495 if (this->openNewRun(lock).isFailure()) {
496 ATH_MSG_DEBUG("Event source found no more valid files left in input list");
497 m_NumEvents = -1;
498 return StatusCode::FAILURE;
499 }
500 }
501 try {
502 pre = m_eventSource->nextEvent();
503 }
504 catch (const ByteStreamExceptions::readError&) {
505 ATH_MSG_FATAL("Caught ByteStreamExceptions::readError");
506 return StatusCode::FAILURE;
507 }
508 catch (const ByteStreamExceptions::badFragment&) {
509 ATH_MSG_ERROR("badFragment encountered");
510 badEvent = true;
511 }
512 catch (const ByteStreamExceptions::badFragmentData&) {
513 ATH_MSG_ERROR("badFragment data encountered");
514 badEvent = true;
515 }
516 // Check whether a RawEvent has actually been provided
517 if (pre == nullptr) {
518 ctxt = *m_endIter;
519 return StatusCode::FAILURE;
520 }
521 // Input file incidents on the first event read from a newly opened file, so that the files
522 // seek() goes over (or opens without reading from) are not announced
524
525 // If not secondary just return the status code based on if the event is bas
526 if (!m_isSecondary.value()) {
527 // check bad event flag and handle as configured
528 return badEvent ? StatusCode::RECOVERABLE : StatusCode::SUCCESS;
529 }
530
531 // Build a DH for use by other components
532 StatusCode rec_sg = m_eventSource->generateDataHeader();
533 if (rec_sg != StatusCode::SUCCESS) {
534 ATH_MSG_ERROR("Fail to record BS DataHeader in StoreGate. Skipping events?! " << rec_sg);
535 }
536
537 return StatusCode::SUCCESS;
538}
void fileTransition(lock_t &lock) const
EndInputFile for the file begun last and BeginInputFile for the file opened since,...
void nextFile(lock_t &lock) const
StatusCode openNewRun(lock_t &lock) const

◆ nextImpl() [1/2]

StatusCode EventSelectorByteStream::nextImpl ( Context & it,
int jump,
lock_t & lock ) const
private

◆ nextImpl() [2/2]

StatusCode EventSelectorByteStream::nextImpl ( Context & it,
lock_t & lock ) const
private

◆ nextWithSkip()

StatusCode EventSelectorByteStream::nextWithSkip ( IEvtSelector::Context & ctxt) const
overrideprotectedvirtual

Go to next event and skip if necessary.

Definition at line 540 of file EventSelectorByteStream.cxx.

541{
543 return nextWithSkipImpl (ctxt, lock);
544}
StatusCode nextWithSkipImpl(IEvtSelector::Context &ctxt, lock_t &lock) const

◆ nextWithSkipImpl()

StatusCode EventSelectorByteStream::nextWithSkipImpl ( IEvtSelector::Context & ctxt,
lock_t & lock ) const
private

Definition at line 545 of file EventSelectorByteStream.cxx.

546 {
547 ATH_MSG_DEBUG("EventSelectorByteStream::nextWithSkip");
548
549 for (;;) {
550 // Check if we're at the end of file
552 if (sc.isRecoverable()) {
553 continue; // handles empty files
554 }
555 if (sc.isFailure()) {
556 return StatusCode::FAILURE;
557 }
558
559 // Increase event count
560 ++m_NumEvents;
561
562 if (!m_counterTool.empty() && !m_counterTool->preNext().isSuccess()) {
563 ATH_MSG_WARNING("Failed to preNext() CounterTool.");
564 }
565 if ( m_NumEvents > m_skipEvents.value() &&
566 (m_skipEventSequence.empty() || m_NumEvents != m_skipEventSequence.front()) ) {
567 return StatusCode::SUCCESS;
568 } else {
569 if (!m_skipEventSequence.empty() && m_NumEvents == m_skipEventSequence.front()) {
570 m_skipEventSequence.erase(m_skipEventSequence.begin());
571 }
572 if (m_isSecondary.value()) {
573 ATH_MSG_INFO("skipping secondary event " << m_NumEvents);
574 } else {
575 ATH_MSG_INFO("skipping event " << m_NumEvents);
576 }
577 }
578 }
579
580 return StatusCode::SUCCESS;
581}
static Double_t sc
Gaudi::Property< long > m_skipEvents

◆ openBlock()

long EventSelectorByteStream::openBlock ( const std::string & fileName,
lock_t & lock ) const
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.

297 {
298 auto nevguid = m_eventSource->getBlockIterator(fileName);
299 if (nevguid.first != -1) {
300 m_pendingFile.emplace("BSF:" + fileName, nevguid.second);
301 }
302 return nevguid.first;
303}

◆ openNewRun()

StatusCode EventSelectorByteStream::openNewRun ( lock_t & lock) const
private

Definition at line 253 of file EventSelectorByteStream.cxx.

253 {
254 // Should be protected upstream, but this is further protection
255 if (!m_filebased) {
256 ATH_MSG_ERROR("cannot open new run for non-filebased inputs");
257 return StatusCode::FAILURE;
258 }
259 // Check for end of file list
260 if (m_inputCollectionsIterator == m_inputCollectionsProp.value().end()) {
261 ATH_MSG_INFO("End of input file list reached");
262 return StatusCode::FAILURE;
263 }
264 std::string blockname = *m_inputCollectionsIterator;
265 // try to open a file
266 long nev = openBlock(blockname, lock);
267 if (nev == -1) {
268 ATH_MSG_FATAL("Unable to access file " << *m_inputCollectionsIterator << ", stopping here");
269 throw ByteStreamExceptions::fileAccessError();
270 }
271
272 // check if file is empty
273 if (nev == 0) {
274 ATH_MSG_WARNING("no events in file " << blockname << " try next");
276 if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
277 this->nextFile(lock);
278 return openNewRun(lock);
279 // check if skipping all events in that file (minus events already skipped)
280 } else if (m_skipEvents.value() - m_NumEvents > nev) {
281 ATH_MSG_WARNING("skipping more events " << m_skipEvents.value() - m_NumEvents << "(" << nev <<") than in file " << *m_inputCollectionsIterator << ", try next");
282 m_NumEvents += nev;
283 m_numEvt[m_fileCount] = nev;
285 if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
286 this->nextFile(lock);
287 return openNewRun(lock);
288 }
289
290 ATH_MSG_DEBUG("Opened block/file " << blockname);
291 m_firstEvt[m_fileCount] = m_NumEvents;
292 m_numEvt[m_fileCount] = nev;
293
294 return StatusCode::SUCCESS;
295}
long openBlock(const std::string &fileName, lock_t &lock) const
Open fileName as the current file, without input file incidents (see fileTransition()).

◆ previous() [1/2]

virtual StatusCode EventSelectorByteStream::previous ( Context & it) const
overridevirtual
Parameters
it[IN/OUT] current event context is iterated to previous event.

◆ previous() [2/2]

virtual StatusCode EventSelectorByteStream::previous ( Context & it,
int jump ) const
overridevirtual
Parameters
it[IN/OUT] current event context is iterated to previous event.
jump[IN] number of events to jump (currently not supported).

◆ previousImpl() [1/2]

StatusCode EventSelectorByteStream::previousImpl ( Context & it,
int jump,
lock_t & lock ) const
private

◆ previousImpl() [2/2]

StatusCode EventSelectorByteStream::previousImpl ( Context & it,
lock_t & lock ) const
private

◆ readEvent()

StatusCode EventSelectorByteStream::readEvent ( int maxevt)
overridevirtual

Read the next maxevt events.

Parameters
evtnum[IN] The number of events to read.

Definition at line 944 of file EventSelectorByteStream.cxx.

944 {
946 if (m_eventStreamingTool.empty()) {
947 ATH_MSG_ERROR("No AthenaSharedMemoryTool configured for readEvent()");
948 return StatusCode::FAILURE;
949 }
950 ATH_MSG_VERBOSE("Called read Event " << maxevt);
951 for (int i = 0; i < maxevt || maxevt == -1; ++i) {
952 const RawEvent* pre = nullptr;
953 if (this->nextImpl(*m_beginIter, lock).isSuccess()) {
954 pre = m_eventSource->currentEvent();
955 } else {
956 if (m_NumEvents == -1) {
957 ATH_MSG_VERBOSE("Called read Event and read last event from input: " << i);
958 break;
959 }
960 ATH_MSG_ERROR("Unable to retrieve next event for " << i << "/" << maxevt);
961 return StatusCode::FAILURE;
962 }
963 if (m_eventStreamingTool->isServer()) {
965 while ( (sc = putEvent_ST(*m_eventStreamingTool,
966 m_NumEvents - 1,
967 pre->start(),
968 pre->fragment_size_word() * sizeof(uint32_t),
969 m_eventSource->currentEventStatus())).isRecoverable() ) {
970 usleep(1000);
971 }
972 ATH_CHECK(sc);
973 }
974 }
975 // End of file, wait for last event to be taken
977 while ( (sc = putEvent_ST(*m_eventStreamingTool, 0, 0, 0, 0)).isRecoverable() ) {
978 usleep(1000);
979 }
980 ATH_CHECK(sc);
981 return StatusCode::SUCCESS;
982}
StatusCode nextImpl(Context &it, lock_t &lock) const

◆ recordAttributeList()

StatusCode EventSelectorByteStream::recordAttributeList ( ) const
overrideprotectedvirtual

Record AttributeList in StoreGate.

Definition at line 734 of file EventSelectorByteStream.cxx.

735{
738}
StatusCode recordAttributeListImpl(lock_t &lock) const

◆ recordAttributeListImpl()

StatusCode EventSelectorByteStream::recordAttributeListImpl ( lock_t & lock) const
private

Definition at line 739 of file EventSelectorByteStream.cxx.

740{
741 std::string listName("EventInfoAtts");
742
743 if (eventStore()->contains<AthenaAttributeList>(listName)) {
744 const AthenaAttributeList* oldAttrList = nullptr;
745 ATH_CHECK(eventStore()->retrieve(oldAttrList, listName));
746 ATH_CHECK(eventStore()->removeDataAndProxy(oldAttrList));
747 }
748
749 // build the new attr list
750 auto attrList = std::make_unique<AthenaAttributeList>();
751
752 // fill the attr list
753 ATH_CHECK(fillAttributeListImpl(attrList.get(), "", false, lock));
754
755 // put result in event store
756 ATH_CHECK(eventStore()->record(std::move(attrList), listName));
757
758 return StatusCode::SUCCESS;
759}
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:116

◆ reinit()

StatusCode EventSelectorByteStream::reinit ( lock_t & lock)
private

Reinitialize the service when a fork() occurred/was-issued.

Definition at line 155 of file EventSelectorByteStream.cxx.

155 {
156 ATH_MSG_INFO("reinitialization...");
157 // reset markers
158 if (m_inputCollectionsProp.value().size()>0) {
159 m_numEvt.resize(m_inputCollectionsProp.value().size(), -1);
160 m_firstEvt.resize(m_inputCollectionsProp.value().size(), -1);
161 }
162 else {
163 m_numEvt.resize(1);
164 m_firstEvt.resize(1);
165 }
166
167 // Initialize InputCollectionsIterator
168 m_inputCollectionsIterator = m_inputCollectionsProp.value().begin();
169 m_NumEvents = 0;
170 bool retError = false;
171 if (!m_helperTools.empty()) {
172 for (ToolHandle<IAthenaSelectorTool>& tool : m_helperTools) {
173 if (!tool->postInitialize().isSuccess()) {
174 ATH_MSG_FATAL("Failed to postInitialize() " << tool->name());
175 retError = true;
176 }
177 }
178 }
179 if (retError) {
180 ATH_MSG_FATAL("Failed to postInitialize() helperTools");
181 return(StatusCode::FAILURE);
182 }
183
184 // If file based input then fire appropriate incidents
185 if (m_filebased) {
186 if (!m_firstFileFired) {
187 FileIncident firstInputFileIncident(name(), "FirstInputFile", "BSF:" + *m_inputCollectionsIterator);
188 m_incidentSvc->fireIncident(firstInputFileIncident);
189 m_firstFileFired = true;
190 }
191
192 // try to open a file
193 ATH_CHECK(this->openNewRun(lock));
194 }
195
196 return StatusCode::SUCCESS;
197}

◆ releaseContext()

StatusCode EventSelectorByteStream::releaseContext ( Context *& it) const
overridevirtual
Parameters
it[IN] current event context is released.

Definition at line 999 of file EventSelectorByteStream.cxx.

999 {
1000 return StatusCode::SUCCESS;
1001}

◆ resetCriteria()

StatusCode EventSelectorByteStream::resetCriteria ( const std::string & criteria,
Context & context ) const
overridevirtual

Set a selection criteria.

Parameters
criteriafilter predicate (SQL-style WHERE clause)
context[IN] current event context.

Definition at line 674 of file EventSelectorByteStream.cxx.

674 {
675 return StatusCode::SUCCESS;
676}

◆ rewind()

StatusCode EventSelectorByteStream::rewind ( Context & it) const
overridevirtual
Parameters
it[IN/OUT] current event context is rewound to first event.

Definition at line 668 of file EventSelectorByteStream.cxx.

668 {
669 ATH_MSG_ERROR("rewind() not implemented");
670 return StatusCode::FAILURE;
671}

◆ seek()

StatusCode EventSelectorByteStream::seek ( Context & ,
int evtnum ) const
overridevirtual

Seek to a given event number.

Parameters
it[IN/OUT] current event context.
evtnum[IN] The event number to which to seek.

Definition at line 679 of file EventSelectorByteStream.cxx.

679 {
681 // Check that input is seekable
682 if (!m_filebased) {
683 ATH_MSG_ERROR("Input not seekable, choose different input svc");
684 return StatusCode::FAILURE;
685 }
686 // find the file index with that event
687 long fileNum = findEvent(evtNum, lock);
688 if (fileNum == -1 && evtNum >= m_firstEvt[m_fileCount] && evtNum < m_NumEvents) {
689 fileNum = m_fileCount;
690 }
691 // if unable to locate file, exit
692 if (fileNum == -1) {
693 ATH_MSG_INFO("seek: Reached end of Input.");
694 return StatusCode::RECOVERABLE;
695 }
696 // check if it is the current file
697 if (fileNum != m_fileCount) { // event in different file
698 // Close input file if open
699 if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
700 ATH_MSG_DEBUG("Seek to item: \"" << m_inputCollectionsProp.value()[fileNum] << "\" from the explicit file list.");
701 std::string fileName = m_inputCollectionsProp.value()[fileNum];
702 m_fileCount = fileNum;
703 m_inputCollectionsIterator = m_inputCollectionsProp.value().begin() + fileNum;
704 // Open the correct file; next() fires its input file incidents when it reads from it
705 if (openBlock(fileName, lock) == -1) {
706 ATH_MSG_FATAL("Unable to open file with seeked event " << evtNum << " file " << fileName);
707 return StatusCode::FAILURE;
708 }
709 int delta = evtNum - m_firstEvt[m_fileCount];
710 if (delta > 0) {
711 EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter;
712 ATH_CHECK(nextImpl(*beginIter,delta, lock));
713 }
714 }
715 // event in current file
716 {
717 int delta = (evtNum - m_firstEvt[m_fileCount] + 1) - m_eventSource->positionInBlock();
718 ATH_MSG_DEBUG("Seeking event " << evtNum << " in current file with delta " << delta);
719 if ( delta == 0 ) { // current event
720 // nothing to do
721 }
722 else if ( delta > 0 ) { // forward
723 EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter;
724 ATH_CHECK(this->nextImpl(*beginIter, delta, lock));
725 }
726 else if ( delta < 0 ) { // backward
727 EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter;
728 ATH_CHECK(this->previousImpl(*beginIter, -1*delta, lock));
729 }
730 }
731 return StatusCode::SUCCESS;
732}
int findEvent(int evtNum, lock_t &lock) const
Search for event with number evtNum.
StatusCode previousImpl(Context &it, lock_t &lock) const
int m_fileCount ATLAS_THREAD_SAFE
number of files to process.

◆ share()

StatusCode EventSelectorByteStream::share ( int evtnum)
overridevirtual

Request to share a given event number.

Parameters
evtnum[IN] The event number to share.

Definition at line 927 of file EventSelectorByteStream.cxx.

927 {
929 if (m_eventStreamingTool.empty()) {
930 return StatusCode::FAILURE;
931 }
932 if (m_eventStreamingTool->isClient()) {
933 StatusCode sc = m_eventStreamingTool->lockEvent(evtNum);
934 while (sc.isRecoverable()) {
935 usleep(1000);
936 sc = m_eventStreamingTool->lockEvent(evtNum);
937 }
938 return sc;
939 }
940 return StatusCode::FAILURE;
941}

◆ size()

int EventSelectorByteStream::size ( Context & it) const
overridevirtual

Always returns -1.

Parameters
it[IN/OUT] current event context.

Definition at line 903 of file EventSelectorByteStream.cxx.

903 {
904 return -1;
905}

◆ start()

StatusCode EventSelectorByteStream::start ( )
overridevirtual

Definition at line 200 of file EventSelectorByteStream.cxx.

200 {
201 ATH_MSG_DEBUG("Calling EventSelectorByteStream::start()");
203 // Create the begin and end iterator's for this selector.
204 m_beginIter = new EventContextByteStream(this);
205 // Increment to get the new event in.
206 m_endIter = new EventContextByteStream(0);
207
208 return StatusCode::SUCCESS;
209}

◆ stop()

StatusCode EventSelectorByteStream::stop ( )
overridevirtual

Definition at line 212 of file EventSelectorByteStream.cxx.

212 {
213 ATH_MSG_DEBUG("Calling EventSelectorByteStream::stop()");
214 if (m_filebased) {
215 // Fire EndInputFile for any file still open
216 m_inputFileGuard.reset();
217 m_pendingFile.reset();
218 if (m_eventSource->ready()) {
219 m_eventSource->closeBlockIterator(false);
220 }
221 }
222 return StatusCode::SUCCESS;
223}

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/9]

std::optional<std::pair<std::string, std::string> > m_pendingFile EventSelectorByteStream::ATLAS_THREAD_SAFE
mutableprivate

Name and GUID of the file opened last, until fileTransition() fires its BeginInputFile.

Definition at line 208 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [2/9]

std::optional<InputFileIncidentGuard> m_inputFileGuard EventSelectorByteStream::ATLAS_THREAD_SAFE
mutableprivate

RAII guard: guarantees a matching EndInputFile for every BeginInputFile.

Definition at line 206 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [3/9]

ToolHandle<IAthenaIPCTool> m_eventStreamingTool EventSelectorByteStream::ATLAS_THREAD_SAFE {this, "SharedMemoryTool", "", ""}
mutableprivate

Definition at line 185 of file EventSelectorByteStream.h.

185{this, "SharedMemoryTool", "", ""};

◆ ATLAS_THREAD_SAFE [4/9]

long m_NumEvents EventSelectorByteStream::ATLAS_THREAD_SAFE = 0
mutableprivate

Definition at line 184 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [5/9]

std::vector<long> m_skipEventSequence EventSelectorByteStream::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 183 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [6/9]

std::vector<std::string>::const_iterator m_inputCollectionsIterator EventSelectorByteStream::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 182 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [7/9]

std::vector<int> m_firstEvt EventSelectorByteStream::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 181 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [8/9]

std::vector<int> m_numEvt EventSelectorByteStream::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 180 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [9/9]

int m_fileCount EventSelectorByteStream::ATLAS_THREAD_SAFE = 0
mutableprivate

number of files to process.

Definition at line 179 of file EventSelectorByteStream.h.

◆ m_beginIter

EventContextByteStream* EventSelectorByteStream::m_beginIter {}
private

Definition at line 194 of file EventSelectorByteStream.h.

194{};

◆ m_counterTool

ToolHandle<IAthenaSelectorTool> EventSelectorByteStream::m_counterTool {this, "CounterTool", "", ""}
private

Definition at line 212 of file EventSelectorByteStream.h.

212{this, "CounterTool", "", ""};

◆ m_endIter

EventContextByteStream* EventSelectorByteStream::m_endIter {}
private

Definition at line 195 of file EventSelectorByteStream.h.

195{};

◆ m_eventSource

SmartIF<IByteStreamInputSvc> EventSelectorByteStream::m_eventSource
private

Definition at line 196 of file EventSelectorByteStream.h.

◆ m_eventSourceName

Gaudi::Property<std::string> EventSelectorByteStream::m_eventSourceName {this, "ByteStreamInputSvc", "", ""}
private

Definition at line 190 of file EventSelectorByteStream.h.

190{this, "ByteStreamInputSvc", "", ""};

◆ m_eventsPerLB

Gaudi::CheckedProperty<uint32_t> EventSelectorByteStream::m_eventsPerLB {this, "EventsPerLB", 1000, ""}
private

Definition at line 224 of file EventSelectorByteStream.h.

224{this, "EventsPerLB", 1000, ""};

◆ m_eventsPerRun

Gaudi::CheckedProperty<uint64_t> EventSelectorByteStream::m_eventsPerRun {this, "EventsPerRun", 1000000, ""}
private

Definition at line 222 of file EventSelectorByteStream.h.

222{this, "EventsPerRun", 1000000, ""};

◆ m_filebased

Gaudi::Property<bool> EventSelectorByteStream::m_filebased {this, "FileBased", true, ""}
private

Definition at line 218 of file EventSelectorByteStream.h.

218{this, "FileBased", true, ""};

◆ m_firstEventNo

Gaudi::CheckedProperty<uint64_t> EventSelectorByteStream::m_firstEventNo {this, "FirstEvent", 1, ""}
private

Definition at line 221 of file EventSelectorByteStream.h.

221{this, "FirstEvent", 1, ""};

◆ m_firstFileFired

bool EventSelectorByteStream::m_firstFileFired {}
private

Definition at line 204 of file EventSelectorByteStream.h.

204{};

◆ m_firstLBNo

Gaudi::CheckedProperty<uint32_t> EventSelectorByteStream::m_firstLBNo {this, "FirstLB", 0, ""}
private

Definition at line 223 of file EventSelectorByteStream.h.

223{this, "FirstLB", 0, ""};

◆ m_helperTools

ToolHandleArray<IAthenaSelectorTool> EventSelectorByteStream::m_helperTools {this, "HelperTools", {}, "Helper tools executed by EventSelector"}
private

HelperTools, vector of names of AlgTools that are executed by the EventSelector.

Definition at line 211 of file EventSelectorByteStream.h.

211{this, "HelperTools", {}, "Helper tools executed by EventSelector"};

◆ m_incidentSvc

ServiceHandle<IIncidentSvc> EventSelectorByteStream::m_incidentSvc {this, "IncidentSvc", "IncidentSvc", ""}
private

Definition at line 199 of file EventSelectorByteStream.h.

199{this, "IncidentSvc", "IncidentSvc", ""};

◆ m_initTimeStamp

Gaudi::CheckedProperty<uint32_t> EventSelectorByteStream::m_initTimeStamp {this, "InitialTimeStamp", 0, ""}
private

Definition at line 225 of file EventSelectorByteStream.h.

225{this, "InitialTimeStamp", 0, ""};

◆ m_inputCollectionsProp

Gaudi::Property<std::vector<std::string> > EventSelectorByteStream::m_inputCollectionsProp {this, "Input", {}, ""}
private

Definition at line 197 of file EventSelectorByteStream.h.

197{this, "Input", {}, ""};

◆ m_isSecondary

Gaudi::Property<bool> EventSelectorByteStream::m_isSecondary {this, "IsSecondary", false, ""}
private

IsSecondary, know if this is an instance of secondary event selector.

Definition at line 188 of file EventSelectorByteStream.h.

188{this, "IsSecondary", false, ""};

◆ m_maxBadEvts

Gaudi::Property<int> EventSelectorByteStream::m_maxBadEvts {this, "MaxBadEvents", -1, ""}
private

number of bad events allowed before quitting.

Definition at line 192 of file EventSelectorByteStream.h.

192{this, "MaxBadEvents", -1, ""};

◆ m_mutex

mutex_t EventSelectorByteStream::m_mutex
mutableprivate

Definition at line 178 of file EventSelectorByteStream.h.

◆ m_overrideRunNumber

Gaudi::Property<bool> EventSelectorByteStream::m_overrideRunNumber {this, "OverrideRunNumber", false, ""}
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.

217{this, "OverrideRunNumber", false, ""};

◆ m_procBadEvent

Gaudi::Property<bool> EventSelectorByteStream::m_procBadEvent {this, "ProcessBadEvent", false, ""}
private

process bad events, which fail check_tree().

Definition at line 191 of file EventSelectorByteStream.h.

191{this, "ProcessBadEvent", false, ""};

◆ m_runNo

Gaudi::CheckedProperty<uint32_t> EventSelectorByteStream::m_runNo {this, "RunNumber", 0, ""}
private

Definition at line 220 of file EventSelectorByteStream.h.

220{this, "RunNumber", 0, ""};

◆ m_skipEvents

Gaudi::Property<long> EventSelectorByteStream::m_skipEvents {this, "SkipEvents", 0, ""}
private

Definition at line 201 of file EventSelectorByteStream.h.

201{this, "SkipEvents", 0, ""}; // Number of events to skip at the beginning

◆ m_skipEventSequenceProp

Gaudi::Property<std::vector<long> > EventSelectorByteStream::m_skipEventSequenceProp {this, "SkipEventSequence", {}, ""}
private

Definition at line 202 of file EventSelectorByteStream.h.

202{this, "SkipEventSequence", {}, ""};

◆ m_timeStampInterval

Gaudi::Property<uint32_t> EventSelectorByteStream::m_timeStampInterval {this, "TimeStampInterval", 0, ""}
private

Definition at line 226 of file EventSelectorByteStream.h.

226{this, "TimeStampInterval", 0, ""};

The documentation for this class was generated from the following files: