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
void nextFile (lock_t &lock) const
int findEvent (int evtNum, lock_t &lock) const
 Search for event with number evtNum.
StoreGateSvceventStore () 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.
EventContextByteStreamm_beginIter {}
EventContextByteStreamm_endIter {}
SmartIF< IByteStreamInputSvcm_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 {}
bool m_beginFileFired {}
ToolHandleArray< IAthenaSelectorToolm_helperTools {this, "HelperTools", {}, "Helper tools executed by EventSelector"}
 HelperTools, vector of names of AlgTools that are executed by the EventSelector.
ToolHandle< IAthenaSelectorToolm_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 42 of file EventSelectorByteStream.h.

Member Typedef Documentation

◆ lock_t

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

Definition at line 127 of file EventSelectorByteStream.h.

◆ mutex_t

using EventSelectorByteStream::mutex_t = std::recursive_mutex
protected

Definition at line 126 of file EventSelectorByteStream.h.

Constructor & Destructor Documentation

◆ EventSelectorByteStream()

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

Standard Constructor.

Definition at line 41 of file EventSelectorByteStream.cxx.

43 : base_class(name, svcloc) {
44 // RunNumber, OldRunNumber and OverrideRunNumberFromInput are used
45 // to override the run number coming in on the input stream
46 m_runNo.verifier().setLower(0);
47 // The following properties are only for compatibility with
48 // McEventSelector and are not really used anywhere
49 // TODO(berghaus): validate if those are even used
50 m_eventsPerRun.verifier().setLower(0);
51 m_firstEventNo.verifier().setLower(1);
52 m_firstLBNo.verifier().setLower(0);
53 m_eventsPerLB.verifier().setLower(0);
54 m_initTimeStamp.verifier().setLower(0);
55
56 m_inputCollectionsProp.declareUpdateHandler(
58}
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 70 of file EventSelectorByteStream.cxx.

70 {
71}

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 968 of file EventSelectorByteStream.cxx.

969 {
970 SG::DataProxy* proxy = eventStore()->proxy(ClassID_traits<DataHeader>::ID(),"ByteStreamDataHeader");
971 if (proxy !=0) {
972 iop = proxy->address();
973 return StatusCode::SUCCESS;
974 } else {
975 iop = 0;
976 return StatusCode::FAILURE;
977 }
978}
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 301 of file EventSelectorByteStream.cxx.

301 {
302 it = new EventContextByteStream(this);
303 return StatusCode::SUCCESS;
304}

◆ curEvent()

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

Return the current event number.

Parameters
it[IN/OUT] current event context.

Definition at line 879 of file EventSelectorByteStream.cxx.

879 {
880 // event counter in IEvtSelectorSeek interface
881 lock_t lock (m_mutex);
882 return int(m_NumEvents);
883}
std::lock_guard< mutex_t > lock_t

◆ disconnectIfFinished()

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

Definition at line 1023 of file EventSelectorByteStream.cxx.

1024{
1025 return true;
1026}

◆ eventStore()

StoreGateSvc * EventSelectorByteStream::eventStore ( ) const
private

Definition at line 76 of file EventSelectorByteStream.cxx.

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

◆ 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 745 of file EventSelectorByteStream.cxx.

746{
747 lock_t lock (m_mutex);
748 return fillAttributeListImpl (attrList, suffix, copySource, lock);
749}
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 750 of file EventSelectorByteStream.cxx.

752{
753 attrList->extend("RunNumber" + suffix, "unsigned int");
754 attrList->extend("EventNumber" + suffix, "unsigned long long");
755 attrList->extend("LumiBlockN" + suffix, "unsigned int");
756 attrList->extend("BunchId" + suffix, "unsigned int");
757 attrList->extend("EventTime" + suffix, "unsigned int");
758 attrList->extend("EventTimeNanoSec" + suffix, "unsigned int");
759
760 // fill attribute list
761 const RawEvent* event = m_eventSource->currentEvent();
762
763 (*attrList)["RunNumber" + suffix].data<unsigned int>() = event->run_no();
764 if (event->version() < 0x03010000) {
765 (*attrList)["EventNumber" + suffix].data<unsigned long long>() = event->lvl1_id();
766 } else {
767 (*attrList)["EventNumber" + suffix].data<unsigned long long>() = event->global_id();
768 }
769 (*attrList)["LumiBlockN" + suffix].data<unsigned int>() = event->lumi_block();
770 (*attrList)["BunchId" + suffix].data<unsigned int>() = event->bc_id();
771
772 unsigned int bc_time_sec = event->bc_time_seconds();
773 unsigned int bc_time_ns = event->bc_time_nanoseconds();
774 // bc_time_ns should be lt 1e9.
775 if (bc_time_ns > 1000000000) {
776 // round it off to 1e9
777 ATH_MSG_WARNING(" bc_time nanosecond number larger than 1e9, it is " << bc_time_ns << ", reset it to 1 sec");
778 bc_time_ns = 1000000000;
779 }
780 (*attrList)["EventTime" + suffix].data<unsigned int>() = bc_time_sec;
781 (*attrList)["EventTimeNanoSec" + suffix].data<unsigned int>() = bc_time_ns;
782
784
785 event->status(buffer);
786 attrList->extend("TriggerStatus" + suffix, "unsigned int");
787 (*attrList)["TriggerStatus" + suffix].data<unsigned int>() = *buffer;
788
789 attrList->extend("ExtendedL1ID" + suffix, "unsigned int");
790 attrList->extend("L1TriggerType" + suffix, "unsigned int");
791 (*attrList)["ExtendedL1ID" + suffix].data<unsigned int>() = event->lvl1_id();
792 (*attrList)["L1TriggerType" + suffix].data<unsigned int>() = event->lvl1_trigger_type();
793
794 // Grab L1 words
795 event->lvl1_trigger_info(buffer);
796 for (uint32_t iT1 = 0; iT1 < event->nlvl1_trigger_info(); ++iT1) {
797 std::stringstream name;
798 name << "L1TriggerInfo_" << iT1;
799 attrList->extend(name.str() + suffix, "unsigned int");
800 (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
801 ++buffer;
802 }
803
804 // Grab L2 words
805 event->lvl2_trigger_info(buffer);
806 for (uint32_t iT1 = 0; iT1 < event->nlvl2_trigger_info(); ++iT1) {
807 if (*buffer != 0) {
808 std::stringstream name;
809 name << "L2TriggerInfo_" << iT1;
810 attrList->extend(name.str() + suffix, "unsigned int");
811 (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
812 }
813 ++buffer;
814 }
815
816 // Grab EF words
817 event->event_filter_info(buffer);
818 for (uint32_t iT1 = 0; iT1 < event->nevent_filter_info(); ++iT1) {
819 if (*buffer != 0) {
820 std::stringstream name;
821 name << "EFTriggerInfo_" << iT1;
822 attrList->extend(name.str() + suffix, "unsigned int");
823 (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
824 }
825 ++buffer;
826 }
827
828 // Grab stream tags
829 event->stream_tag(buffer);
830 std::vector<eformat::helper::StreamTag> onl_streamTags;
831 eformat::helper::decode(event->nstream_tag(), buffer, onl_streamTags);
832 for (std::vector<eformat::helper::StreamTag>::const_iterator itS = onl_streamTags.begin(),
833 itSE = onl_streamTags.end(); itS != itSE; ++itS) {
834 attrList->extend(itS->name + suffix, "string");
835 (*attrList)[itS->name + suffix].data<std::string>() = itS->type;
836 }
837
838 return StatusCode::SUCCESS;
839}
#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 227 of file EventSelectorByteStream.cxx.

227 {
228 if (!m_counterTool.empty()) {
229 if (!m_counterTool->preFinalize().isSuccess()) {
230 ATH_MSG_WARNING("Failed to preFinalize() CounterTool");
231 }
232 }
233 for (ToolHandle<IAthenaSelectorTool>& tool : m_helperTools) {
234 if (!tool->preFinalize().isSuccess()) {
235 ATH_MSG_WARNING("Failed to preFinalize() " << tool->name());
236 }
237 }
238 delete m_beginIter; m_beginIter = nullptr;
239 delete m_endIter; m_endIter = nullptr;
240 if (m_eventSource) m_eventSource->release();
241 // Finalize the Service base class.
242 return AthService::finalize();
243}
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 842 of file EventSelectorByteStream.cxx.

842 {
843 // Loop over file event counts
844 for (size_t i = 0; i < m_inputCollectionsProp.value().size(); i++) {
845 if (m_inputCollectionsProp.value().size() != m_numEvt.size()) {
846 ATH_MSG_ERROR("vector size incompatibility");
847 break;
848 }
849 // if file not opened yet, check it
850 if (m_numEvt[i] == -1) {
851 std::string fileName = m_inputCollectionsProp.value()[i];
852 auto nevguid = m_eventSource->getBlockIterator(fileName);
853 long nev = nevguid.first;
854 // if failure on file open, exit
855 if (nev==-1) {
856 break;
857 }
858 // set initial event counter for that file
859 if (i > 0) {
860 m_firstEvt[i] = m_firstEvt[i - 1] + m_numEvt[i - 1];
861 } else {
862 m_firstEvt[i] = 0;
863 }
864 // log number of events in that file
865 m_numEvt[i] = nev;
866 }
867 // if sought event is in this file, then return the index of that file
868 if (evtNum >= m_firstEvt[i] && evtNum < m_firstEvt[i] + m_numEvt[i]) {
869 ATH_MSG_INFO("found " << evtNum << " in file " << i);
870 return i;
871 }
872 }
873 ATH_MSG_INFO("did not find ev " << evtNum);
874 // return file not found marker
875 return -1;
876}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
virtual int size(Context &it) const override
Always returns -1.

◆ initialize()

StatusCode EventSelectorByteStream::initialize ( )
overridevirtual

Implementation of Service base class methods.

Definition at line 82 of file EventSelectorByteStream.cxx.

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

61 {
62 lock_t lock (m_mutex);
63 if (this->FSMState() != Gaudi::StateMachine::OFFLINE) {
64 this->reinit(lock).ignore();
65 }
66}

◆ 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 987 of file EventSelectorByteStream.cxx.

987 {
988 lock_t lock (m_mutex);
989 ATH_MSG_INFO("I/O reinitialization...");
990 ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
991 ATH_CHECK(iomgr.retrieve());
992 if (!iomgr->io_hasitem(this)) {
993 ATH_MSG_FATAL("IoComponentMgr does not know about myself !");
994 return StatusCode::FAILURE;
995 }
996 std::vector<std::string> inputCollections = m_inputCollectionsProp.value();
997 for (std::size_t i = 0, imax = inputCollections.size(); i != imax; ++i) {
998 ATH_MSG_INFO("I/O reinitialization, file = " << inputCollections[i]);
999 std::string &fname = inputCollections[i];
1000 if (!iomgr->io_contains(this, fname)) {
1001 ATH_MSG_ERROR("IoComponentMgr does not know about [" << fname << "] !");
1002 return StatusCode::FAILURE;
1003 }
1004 ATH_CHECK(iomgr->io_retrieve(this, fname));
1005 }
1006 // all good... copy over.
1007 m_beginFileFired = false;
1008
1009 // Set m_inputCollectionsProp. But we _dont_ want to run the update
1010 // handler --- that calls reinit(), which will deadlock since
1011 // we're holding the lock. Instead, we'll call reinit() ourselves.
1012 auto old_cb = m_inputCollectionsProp.updateCallBack();
1013 m_inputCollectionsProp.declareUpdateHandler(
1014 [] (Gaudi::Details::PropertyBase&) {}
1015 );
1017 m_inputCollectionsProp.declareUpdateHandler (std::move(old_cb));
1018
1019 return this->reinit(lock);
1020}
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 643 of file EventSelectorByteStream.cxx.

643 {
644 if (it.identifier() == m_endIter->identifier()) {
645 ATH_MSG_DEBUG("last(): Last event in InputStream.");
646 return StatusCode::SUCCESS;
647 }
648 return StatusCode::FAILURE;
649}

◆ makeClient()

StatusCode EventSelectorByteStream::makeClient ( int num)
overridevirtual

Make this a client.

Definition at line 900 of file EventSelectorByteStream.cxx.

900 {
901 lock_t lock (m_mutex);
902 if (m_eventStreamingTool.empty()) {
903 return StatusCode::FAILURE;
904 }
905 std::string dummyStr;
906 return m_eventStreamingTool->makeClient(0, dummyStr);
907}

◆ makeServer()

StatusCode EventSelectorByteStream::makeServer ( int num)
overridevirtual

Make this a server.

Definition at line 891 of file EventSelectorByteStream.cxx.

891 {
892 lock_t lock (m_mutex);
893 if (m_eventStreamingTool.empty()) {
894 return StatusCode::FAILURE;
895 }
896 return m_eventStreamingTool->makeServer(1, "");
897}

◆ 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 245 of file EventSelectorByteStream.cxx.

245 {
246 FileIncident endInputFileIncident(name(), "EndInputFile", "BSF:" + *m_inputCollectionsIterator);
247 m_incidentSvc->fireIncident(endInputFileIncident);
248 ++m_inputCollectionsIterator;
249 ++m_fileCount;
250}
ServiceHandle< IIncidentSvc > m_incidentSvc

◆ nextHandleFileTransition()

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

Handle file transition at the next iteration.

Definition at line 467 of file EventSelectorByteStream.cxx.

468{
469 lock_t lock (m_mutex);
470 return nextHandleFileTransitionImpl (ctxt, lock);
471}
StatusCode nextHandleFileTransitionImpl(IEvtSelector::Context &ctxt, lock_t &lock) const

◆ nextHandleFileTransitionImpl()

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

Definition at line 472 of file EventSelectorByteStream.cxx.

474{
475 const RawEvent* pre{};
476 bool badEvent{};
477 // if event source not ready from init, try next file
478 if (m_filebased && !m_eventSource->ready()) {
479 // next file
480 this->nextFile(lock);
481 if (this->openNewRun(lock).isFailure()) {
482 ATH_MSG_DEBUG("Event source found no more valid files left in input list");
483 m_NumEvents = -1;
484 return StatusCode::FAILURE;
485 }
486 }
487 try {
488 pre = m_eventSource->nextEvent();
489 }
490 catch (const ByteStreamExceptions::readError&) {
491 ATH_MSG_FATAL("Caught ByteStreamExceptions::readError");
492 return StatusCode::FAILURE;
493 }
494 catch (const ByteStreamExceptions::badFragment&) {
495 ATH_MSG_ERROR("badFragment encountered");
496 badEvent = true;
497 }
498 catch (const ByteStreamExceptions::badFragmentData&) {
499 ATH_MSG_ERROR("badFragment data encountered");
500 badEvent = true;
501 }
502 // Check whether a RawEvent has actually been provided
503 if (pre == nullptr) {
504 ctxt = *m_endIter;
505 return StatusCode::FAILURE;
506 }
507
508 // If not secondary just return the status code based on if the event is bas
509 if (!m_isSecondary.value()) {
510 // check bad event flag and handle as configured
511 return badEvent ? StatusCode::RECOVERABLE : StatusCode::SUCCESS;
512 }
513
514 // Build a DH for use by other components
515 StatusCode rec_sg = m_eventSource->generateDataHeader();
516 if (rec_sg != StatusCode::SUCCESS) {
517 ATH_MSG_ERROR("Fail to record BS DataHeader in StoreGate. Skipping events?! " << rec_sg);
518 }
519
520 return StatusCode::SUCCESS;
521}
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 523 of file EventSelectorByteStream.cxx.

524{
525 lock_t lock (m_mutex);
526 return nextWithSkipImpl (ctxt, lock);
527}
StatusCode nextWithSkipImpl(IEvtSelector::Context &ctxt, lock_t &lock) const

◆ nextWithSkipImpl()

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

Definition at line 528 of file EventSelectorByteStream.cxx.

529 {
530 ATH_MSG_DEBUG("EventSelectorByteStream::nextWithSkip");
531
532 for (;;) {
533 // Check if we're at the end of file
535 if (sc.isRecoverable()) {
536 continue; // handles empty files
537 }
538 if (sc.isFailure()) {
539 return StatusCode::FAILURE;
540 }
541
542 // Increase event count
543 ++m_NumEvents;
544
545 if (!m_counterTool.empty() && !m_counterTool->preNext().isSuccess()) {
546 ATH_MSG_WARNING("Failed to preNext() CounterTool.");
547 }
548 if ( m_NumEvents > m_skipEvents.value() &&
549 (m_skipEventSequence.empty() || m_NumEvents != m_skipEventSequence.front()) ) {
550 return StatusCode::SUCCESS;
551 } else {
552 if (!m_skipEventSequence.empty() && m_NumEvents == m_skipEventSequence.front()) {
553 m_skipEventSequence.erase(m_skipEventSequence.begin());
554 }
555 if (m_isSecondary.value()) {
556 ATH_MSG_INFO("skipping secondary event " << m_NumEvents);
557 } else {
558 ATH_MSG_INFO("skipping event " << m_NumEvents);
559 }
560 }
561 }
562
563 return StatusCode::SUCCESS;
564}
static Double_t sc
Gaudi::Property< long > m_skipEvents

◆ openNewRun()

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

Definition at line 252 of file EventSelectorByteStream.cxx.

252 {
253 // Should be protected upstream, but this is further protection
254 if (!m_filebased) {
255 ATH_MSG_ERROR("cannot open new run for non-filebased inputs");
256 return StatusCode::FAILURE;
257 }
258 // Check for end of file list
259 if (m_inputCollectionsIterator == m_inputCollectionsProp.value().end()) {
260 ATH_MSG_INFO("End of input file list reached");
261 return StatusCode::FAILURE;
262 }
263 std::string blockname = *m_inputCollectionsIterator;
264 // try to open a file
265 auto nevguid = m_eventSource->getBlockIterator(blockname);
266 long nev = nevguid.first;
267 if (nev == -1) {
268 ATH_MSG_FATAL("Unable to access file " << *m_inputCollectionsIterator << ", stopping here");
269 throw ByteStreamExceptions::fileAccessError();
270 }
271 // Fire the incident
272 if (!m_beginFileFired) {
273 FileIncident beginInputFileIncident(name(), "BeginInputFile", "BSF:" + *m_inputCollectionsIterator,nevguid.second);
274 m_incidentSvc->fireIncident(beginInputFileIncident);
275 //m_beginFileFired = true; // Should go here, but can't because IEvtSelector next is const
276 }
277
278 // check if file is empty
279 if (nev == 0) {
280 ATH_MSG_WARNING("no events in file " << blockname << " try next");
281 if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
282 this->nextFile(lock);
283 return openNewRun(lock);
284 // check if skipping all events in that file (minus events already skipped)
285 } else if (m_skipEvents.value() - m_NumEvents > nev) {
286 ATH_MSG_WARNING("skipping more events " << m_skipEvents.value() - m_NumEvents << "(" << nev <<") than in file " << *m_inputCollectionsIterator << ", try next");
287 m_NumEvents += nev;
288 m_numEvt[m_fileCount] = nev;
289 if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
290 this->nextFile(lock);
291 return openNewRun(lock);
292 }
293
294 ATH_MSG_DEBUG("Opened block/file " << blockname);
295 m_firstEvt[m_fileCount] = m_NumEvents;
296 m_numEvt[m_fileCount] = nev;
297
298 return StatusCode::SUCCESS;
299}

◆ 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 927 of file EventSelectorByteStream.cxx.

927 {
928 lock_t lock (m_mutex);
929 if (m_eventStreamingTool.empty()) {
930 ATH_MSG_ERROR("No AthenaSharedMemoryTool configured for readEvent()");
931 return StatusCode::FAILURE;
932 }
933 ATH_MSG_VERBOSE("Called read Event " << maxevt);
934 for (int i = 0; i < maxevt || maxevt == -1; ++i) {
935 const RawEvent* pre = nullptr;
936 if (this->nextImpl(*m_beginIter, lock).isSuccess()) {
937 pre = m_eventSource->currentEvent();
938 } else {
939 if (m_NumEvents == -1) {
940 ATH_MSG_VERBOSE("Called read Event and read last event from input: " << i);
941 break;
942 }
943 ATH_MSG_ERROR("Unable to retrieve next event for " << i << "/" << maxevt);
944 return StatusCode::FAILURE;
945 }
946 if (m_eventStreamingTool->isServer()) {
948 while ( (sc = putEvent_ST(*m_eventStreamingTool,
949 m_NumEvents - 1,
950 pre->start(),
951 pre->fragment_size_word() * sizeof(uint32_t),
952 m_eventSource->currentEventStatus())).isRecoverable() ) {
953 usleep(1000);
954 }
955 ATH_CHECK(sc);
956 }
957 }
958 // End of file, wait for last event to be taken
960 while ( (sc = putEvent_ST(*m_eventStreamingTool, 0, 0, 0, 0)).isRecoverable() ) {
961 usleep(1000);
962 }
963 ATH_CHECK(sc);
964 return StatusCode::SUCCESS;
965}
StatusCode nextImpl(Context &it, lock_t &lock) const

◆ recordAttributeList()

StatusCode EventSelectorByteStream::recordAttributeList ( ) const
overrideprotectedvirtual

Record AttributeList in StoreGate.

Definition at line 718 of file EventSelectorByteStream.cxx.

719{
720 lock_t lock (m_mutex);
721 return recordAttributeListImpl (lock);
722}
StatusCode recordAttributeListImpl(lock_t &lock) const

◆ recordAttributeListImpl()

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

Definition at line 723 of file EventSelectorByteStream.cxx.

724{
725 std::string listName("EventInfoAtts");
726
727 if (eventStore()->contains<AthenaAttributeList>(listName)) {
728 const AthenaAttributeList* oldAttrList = nullptr;
729 ATH_CHECK(eventStore()->retrieve(oldAttrList, listName));
730 ATH_CHECK(eventStore()->removeDataAndProxy(oldAttrList));
731 }
732
733 // build the new attr list
734 auto attrList = std::make_unique<AthenaAttributeList>();
735
736 // fill the attr list
737 ATH_CHECK(fillAttributeListImpl(attrList.get(), "", false, lock));
738
739 // put result in event store
740 ATH_CHECK(eventStore()->record(std::move(attrList), listName));
741
742 return StatusCode::SUCCESS;
743}
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ reinit()

StatusCode EventSelectorByteStream::reinit ( lock_t & lock)
private

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

Definition at line 153 of file EventSelectorByteStream.cxx.

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

982 {
983 return StatusCode::SUCCESS;
984}

◆ 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 657 of file EventSelectorByteStream.cxx.

657 {
658 return StatusCode::SUCCESS;
659}

◆ rewind()

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

Definition at line 651 of file EventSelectorByteStream.cxx.

651 {
652 ATH_MSG_ERROR("rewind() not implemented");
653 return StatusCode::FAILURE;
654}

◆ 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 662 of file EventSelectorByteStream.cxx.

662 {
663 lock_t lock (m_mutex);
664 // Check that input is seekable
665 if (!m_filebased) {
666 ATH_MSG_ERROR("Input not seekable, choose different input svc");
667 return StatusCode::FAILURE;
668 }
669 // find the file index with that event
670 long fileNum = findEvent(evtNum, lock);
671 if (fileNum == -1 && evtNum >= m_firstEvt[m_fileCount] && evtNum < m_NumEvents) {
672 fileNum = m_fileCount;
673 }
674 // if unable to locate file, exit
675 if (fileNum == -1) {
676 ATH_MSG_INFO("seek: Reached end of Input.");
677 return StatusCode::RECOVERABLE;
678 }
679 // check if it is the current file
680 if (fileNum != m_fileCount) { // event in different file
681 // Close input file if open
682 if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
683 ATH_MSG_DEBUG("Seek to item: \"" << m_inputCollectionsProp.value()[fileNum] << "\" from the explicit file list.");
684 std::string fileName = m_inputCollectionsProp.value()[fileNum];
685 m_fileCount = fileNum;
686 // Open the correct file
687 auto nevguid = m_eventSource->getBlockIterator(fileName);
688 long nev = nevguid.first;
689 if (nev == -1) {
690 ATH_MSG_FATAL("Unable to open file with seeked event " << evtNum << " file " << fileName);
691 return StatusCode::FAILURE;
692 }
693 int delta = evtNum - m_firstEvt[m_fileCount];
694 if (delta > 0) {
695 EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter;
696 ATH_CHECK(nextImpl(*beginIter,delta, lock));
697 }
698 }
699 // event in current file
700 {
701 int delta = (evtNum - m_firstEvt[m_fileCount] + 1) - m_eventSource->positionInBlock();
702 ATH_MSG_DEBUG("Seeking event " << evtNum << " in current file with delta " << delta);
703 if ( delta == 0 ) { // current event
704 // nothing to do
705 }
706 else if ( delta > 0 ) { // forward
707 EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter;
708 ATH_CHECK(this->nextImpl(*beginIter, delta, lock));
709 }
710 else if ( delta < 0 ) { // backward
711 EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter;
712 ATH_CHECK(this->previousImpl(*beginIter, -1*delta, lock));
713 }
714 }
715 return StatusCode::SUCCESS;
716}
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 910 of file EventSelectorByteStream.cxx.

910 {
911 lock_t lock (m_mutex);
912 if (m_eventStreamingTool.empty()) {
913 return StatusCode::FAILURE;
914 }
915 if (m_eventStreamingTool->isClient()) {
916 StatusCode sc = m_eventStreamingTool->lockEvent(evtNum);
917 while (sc.isRecoverable()) {
918 usleep(1000);
919 sc = m_eventStreamingTool->lockEvent(evtNum);
920 }
921 return sc;
922 }
923 return StatusCode::FAILURE;
924}

◆ size()

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

Always returns -1.

Parameters
it[IN/OUT] current event context.

Definition at line 886 of file EventSelectorByteStream.cxx.

886 {
887 return -1;
888}

◆ start()

StatusCode EventSelectorByteStream::start ( )
overridevirtual

Definition at line 200 of file EventSelectorByteStream.cxx.

200 {
201 ATH_MSG_DEBUG("Calling EventSelectorByteStream::start()");
202 lock_t lock (m_mutex);
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 // Handle open files
215 if (m_filebased) {
216 // Close the file
217 if (m_eventSource->ready()) {
218 m_eventSource->closeBlockIterator(false);
219 FileIncident endInputFileIncident(name(), "EndInputFile", "stop");
220 m_incidentSvc->fireIncident(endInputFileIncident);
221 }
222 }
223 return StatusCode::SUCCESS;
224}

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/7]

int m_fileCount EventSelectorByteStream::ATLAS_THREAD_SAFE = 0
mutableprivate

number of files to process.

Definition at line 171 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [2/7]

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

Definition at line 172 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [3/7]

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

Definition at line 173 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [4/7]

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

Definition at line 174 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [5/7]

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

Definition at line 175 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [6/7]

long m_NumEvents EventSelectorByteStream::ATLAS_THREAD_SAFE = 0
mutableprivate

Definition at line 176 of file EventSelectorByteStream.h.

◆ ATLAS_THREAD_SAFE [7/7]

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

Definition at line 177 of file EventSelectorByteStream.h.

177{this, "SharedMemoryTool", "", ""};

◆ m_beginFileFired

bool EventSelectorByteStream::m_beginFileFired {}
private

Definition at line 197 of file EventSelectorByteStream.h.

197{};

◆ m_beginIter

EventContextByteStream* EventSelectorByteStream::m_beginIter {}
private

Definition at line 186 of file EventSelectorByteStream.h.

186{};

◆ m_counterTool

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

Definition at line 201 of file EventSelectorByteStream.h.

201{this, "CounterTool", "", ""};

◆ m_endIter

EventContextByteStream* EventSelectorByteStream::m_endIter {}
private

Definition at line 187 of file EventSelectorByteStream.h.

187{};

◆ m_eventSource

SmartIF<IByteStreamInputSvc> EventSelectorByteStream::m_eventSource
private

Definition at line 188 of file EventSelectorByteStream.h.

◆ m_eventSourceName

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

Definition at line 182 of file EventSelectorByteStream.h.

182{this, "ByteStreamInputSvc", "", ""};

◆ m_eventsPerLB

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

Definition at line 213 of file EventSelectorByteStream.h.

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

◆ m_eventsPerRun

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

Definition at line 211 of file EventSelectorByteStream.h.

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

◆ m_filebased

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

Definition at line 207 of file EventSelectorByteStream.h.

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

◆ m_firstEventNo

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

Definition at line 210 of file EventSelectorByteStream.h.

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

◆ m_firstFileFired

bool EventSelectorByteStream::m_firstFileFired {}
private

Definition at line 196 of file EventSelectorByteStream.h.

196{};

◆ m_firstLBNo

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

Definition at line 212 of file EventSelectorByteStream.h.

212{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 200 of file EventSelectorByteStream.h.

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

◆ m_incidentSvc

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

Definition at line 191 of file EventSelectorByteStream.h.

191{this, "IncidentSvc", "IncidentSvc", ""};

◆ m_initTimeStamp

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

Definition at line 214 of file EventSelectorByteStream.h.

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

◆ m_inputCollectionsProp

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

Definition at line 189 of file EventSelectorByteStream.h.

189{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 180 of file EventSelectorByteStream.h.

180{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 184 of file EventSelectorByteStream.h.

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

◆ m_mutex

mutex_t EventSelectorByteStream::m_mutex
mutableprivate

Definition at line 170 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 206 of file EventSelectorByteStream.h.

206{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 183 of file EventSelectorByteStream.h.

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

◆ m_runNo

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

Definition at line 209 of file EventSelectorByteStream.h.

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

◆ m_skipEvents

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

Definition at line 193 of file EventSelectorByteStream.h.

193{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 194 of file EventSelectorByteStream.h.

194{this, "SkipEventSequence", {}, ""};

◆ m_timeStampInterval

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

Definition at line 215 of file EventSelectorByteStream.h.

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

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