ATLAS Offline Software
Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
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. More...
 
virtual ~EventSelectorByteStream ()
 Standard Destructor. More...
 
virtual StatusCode initialize () override
 Implementation of Service base class methods. More...
 
virtual StatusCode start () override
 
virtual StatusCode stop () override
 
virtual StatusCode finalize () override
 
virtual StatusCode createContext (Context *&it) const override
 create context More...
 
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. More...
 
virtual StatusCode seek (Context &, int evtnum) const override
 Seek to a given event number. More...
 
virtual int curEvent (const Context &it) const override
 Return the current event number. More...
 
virtual int size (Context &it) const override
 Always returns -1. More...
 
virtual StatusCode makeServer (int num) override
 Make this a server. More...
 
virtual StatusCode makeClient (int num) override
 Make this a client. More...
 
virtual StatusCode share (int evtnum) override
 Request to share a given event number. More...
 
virtual StatusCode readEvent (int maxevt) override
 Read the next maxevt events. More...
 
virtual StatusCode io_reinit () override
 Callback method to reinitialize the internal state of the component for I/O purposes (e.g. upon fork(2)) More...
 

Protected Types

typedef std::recursive_mutex mutex_t
 
typedef std::lock_guard< mutex_tlock_t
 

Protected Member Functions

virtual StatusCode nextHandleFileTransition (IEvtSelector::Context &ctxt) const override
 Handle file transition at the next iteration. More...
 
virtual StatusCode nextWithSkip (IEvtSelector::Context &ctxt) const override
 Go to next event and skip if necessary. More...
 
virtual StatusCode recordAttributeList () const override
 Record AttributeList in StoreGate. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
Gaudi::Property< std::string > m_eventSourceName {this, "ByteStreamInputSvc", "", ""}
 
Gaudi::Property< bool > m_procBadEvent {this, "ProcessBadEvent", false, ""}
 process bad events, which fail check_tree(). More...
 
Gaudi::Property< int > m_maxBadEvts {this, "MaxBadEvents", -1, ""}
 number of bad events allowed before quitting. More...
 
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, vector of names of AlgTools that are executed by the EventSelector. More...
 
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. More...
 
Gaudi::Property< bool > m_filebased {this, "FileBased", true, ""}
 
Gaudi::CheckedProperty< int > m_runNo {this, "RunNumber", 0, ""}
 
Gaudi::CheckedProperty< int > m_firstEventNo {this, "FirstEvent", 1, ""}
 
Gaudi::CheckedProperty< int > m_eventsPerRun {this, "EventsPerRun", 1000000, ""}
 
Gaudi::CheckedProperty< int > m_firstLBNo {this, "FirstLB", 0, ""}
 
Gaudi::CheckedProperty< int > m_eventsPerLB {this, "EventsPerLB", 1000, ""}
 
Gaudi::CheckedProperty< int > m_initTimeStamp {this, "InitialTimeStamp", 0, ""}
 
Gaudi::Property< int > 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

typedef std::lock_guard<mutex_t> EventSelectorByteStream::lock_t
protected

Definition at line 127 of file EventSelectorByteStream.h.

◆ mutex_t

typedef std::recursive_mutex EventSelectorByteStream::mutex_t
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  declareProperty("HelperTools", m_helperTools);
45 
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 }

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

1039  {
1040  SG::DataProxy* proxy = eventStore()->proxy(ClassID_traits<DataHeader>::ID(),"ByteStreamDataHeader");
1041  if (proxy !=0) {
1042  iop = proxy->address();
1043  return(StatusCode::SUCCESS);
1044  } else {
1045  iop = 0;
1046  return(StatusCode::FAILURE);
1047  }
1048 }

◆ createContext()

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

create context

Definition at line 338 of file EventSelectorByteStream.cxx.

338  {
339  it = new EventContextByteStream(this);
340  return(StatusCode::SUCCESS);
341 }

◆ curEvent()

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

Return the current event number.

Parameters
it[IN/OUT] current event context.

Definition at line 943 of file EventSelectorByteStream.cxx.

943  {
944  // event counter in IEvtSelectorSeek interface
945  lock_t lock (m_mutex);
946  return int(m_NumEvents);
947 }

◆ disconnectIfFinished()

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

Definition at line 1099 of file EventSelectorByteStream.cxx.

1100 {
1101  return true;
1102 }

◆ eventStore()

StoreGateSvc * EventSelectorByteStream::eventStore ( ) const
private

Definition at line 78 of file EventSelectorByteStream.cxx.

78  {
80 }

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

809 {
810  lock_t lock (m_mutex);
811  return fillAttributeListImpl (attrList, suffix, copySource, lock);
812 }

◆ fillAttributeListImpl()

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

Definition at line 813 of file EventSelectorByteStream.cxx.

815 {
816  attrList->extend("RunNumber" + suffix, "unsigned int");
817  attrList->extend("EventNumber" + suffix, "unsigned long long");
818  attrList->extend("LumiBlockN" + suffix, "unsigned int");
819  attrList->extend("BunchId" + suffix, "unsigned int");
820  attrList->extend("EventTime" + suffix, "unsigned int");
821  attrList->extend("EventTimeNanoSec" + suffix, "unsigned int");
822 
823  // fill attribute list
824  const RawEvent* event = m_eventSource->currentEvent();
825 
826  (*attrList)["RunNumber" + suffix].data<unsigned int>() = event->run_no();
827  if (event->version() < 0x03010000) {
828  (*attrList)["EventNumber" + suffix].data<unsigned long long>() = event->lvl1_id();
829  } else {
830  (*attrList)["EventNumber" + suffix].data<unsigned long long>() = event->global_id();
831  }
832  (*attrList)["LumiBlockN" + suffix].data<unsigned int>() = event->lumi_block();
833  (*attrList)["BunchId" + suffix].data<unsigned int>() = event->bc_id();
834 
835  unsigned int bc_time_sec = event->bc_time_seconds();
836  unsigned int bc_time_ns = event->bc_time_nanoseconds();
837  // bc_time_ns should be lt 1e9.
838  if (bc_time_ns > 1000000000) {
839  // round it off to 1e9
840  ATH_MSG_WARNING(" bc_time nanosecond number larger than 1e9, it is " << bc_time_ns << ", reset it to 1 sec");
841  bc_time_ns = 1000000000;
842  }
843  (*attrList)["EventTime" + suffix].data<unsigned int>() = bc_time_sec;
844  (*attrList)["EventTimeNanoSec" + suffix].data<unsigned int>() = bc_time_ns;
845 
847 
848  event->status(buffer);
849  attrList->extend("TriggerStatus" + suffix, "unsigned int");
850  (*attrList)["TriggerStatus" + suffix].data<unsigned int>() = *buffer;
851 
852  attrList->extend("ExtendedL1ID" + suffix, "unsigned int");
853  attrList->extend("L1TriggerType" + suffix, "unsigned int");
854  (*attrList)["ExtendedL1ID" + suffix].data<unsigned int>() = event->lvl1_id();
855  (*attrList)["L1TriggerType" + suffix].data<unsigned int>() = event->lvl1_trigger_type();
856 
857  // Grab L1 words
858  event->lvl1_trigger_info(buffer);
859  for (uint32_t iT1 = 0; iT1 < event->nlvl1_trigger_info(); ++iT1) {
860  std::stringstream name;
861  name << "L1TriggerInfo_" << iT1;
862  attrList->extend(name.str() + suffix, "unsigned int");
863  (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
864  ++buffer;
865  }
866 
867  // Grab L2 words
868  event->lvl2_trigger_info(buffer);
869  for (uint32_t iT1 = 0; iT1 < event->nlvl2_trigger_info(); ++iT1) {
870  if (*buffer != 0) {
871  std::stringstream name;
872  name << "L2TriggerInfo_" << iT1;
873  attrList->extend(name.str() + suffix, "unsigned int");
874  (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
875  }
876  ++buffer;
877  }
878 
879  // Grab EF words
880  event->event_filter_info(buffer);
881  for (uint32_t iT1 = 0; iT1 < event->nevent_filter_info(); ++iT1) {
882  if (*buffer != 0) {
883  std::stringstream name;
884  name << "EFTriggerInfo_" << iT1;
885  attrList->extend(name.str() + suffix, "unsigned int");
886  (*attrList)[name.str() + suffix].data<unsigned int>() = *buffer;
887  }
888  ++buffer;
889  }
890 
891  // Grab stream tags
892  event->stream_tag(buffer);
893  std::vector<eformat::helper::StreamTag> onl_streamTags;
894  eformat::helper::decode(event->nstream_tag(), buffer, onl_streamTags);
895  for (std::vector<eformat::helper::StreamTag>::const_iterator itS = onl_streamTags.begin(),
896  itSE = onl_streamTags.end(); itS != itSE; ++itS) {
897  attrList->extend(itS->name + suffix, "string");
898  (*attrList)[itS->name + suffix].data<std::string>() = itS->type;
899  }
900 
901  return StatusCode::SUCCESS;
902 }

◆ finalize()

StatusCode EventSelectorByteStream::finalize ( )
overridevirtual

Definition at line 249 of file EventSelectorByteStream.cxx.

249  {
250  if (!m_counterTool.empty()) {
251  if (!m_counterTool->preFinalize().isSuccess()) {
252  ATH_MSG_WARNING("Failed to preFinalize() CounterTool");
253  }
254  }
255  for (ToolHandle<IAthenaSelectorTool>& tool : m_helperTools) {
256  if (!tool->preFinalize().isSuccess()) {
257  ATH_MSG_WARNING("Failed to preFinalize() " << tool->name());
258  }
259  }
260  delete m_beginIter; m_beginIter = 0;
261  delete m_endIter; m_endIter = 0;
262  // Release AthenaSharedMemoryTool
263  if (!m_eventStreamingTool.empty() && !m_eventStreamingTool.release().isSuccess()) {
264  ATH_MSG_WARNING("Cannot release AthenaSharedMemoryTool");
265  }
266  // Release CounterTool
267  if (!m_counterTool.empty()) {
268  if (!m_counterTool.release().isSuccess()) {
269  ATH_MSG_WARNING("Cannot release CounterTool.");
270  }
271  }
272  // Release HelperTools
273  if (!m_helperTools.release().isSuccess()) {
274  ATH_MSG_WARNING("Cannot release " << m_helperTools);
275  }
276  if (m_eventSource) m_eventSource->release();
277  // Finalize the Service base class.
278  return(AthService::finalize());
279 }

◆ findEvent()

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

Search for event with number evtNum.

Definition at line 905 of file EventSelectorByteStream.cxx.

905  {
906  // Loop over file event counts
907  //ATH_MSG_INFO("try to find evnum = " << evtNum << " in " << m_numEvt.size() << " files");
908  for (size_t i = 0; i < m_inputCollectionsProp.value().size(); i++) {
909  if (m_inputCollectionsProp.value().size() != m_numEvt.size()) {
910  ATH_MSG_ERROR("vector size incompatibility");
911  break;
912  }
913  // if file not opened yet, check it
914  if (m_numEvt[i] == -1) {
915  std::string fileName = m_inputCollectionsProp.value()[i];
916  auto nevguid = m_eventSource->getBlockIterator(fileName);
917  long nev = nevguid.first;
918  // if failure on file open, exit
919  if (nev==-1) {
920  break;
921  }
922  // set initial event counter for that file
923  if (i > 0) {
924  m_firstEvt[i] = m_firstEvt[i - 1] + m_numEvt[i - 1];
925  } else {
926  m_firstEvt[i] = 0;
927  }
928  // log number of events in that file
929  m_numEvt[i] = nev;
930  }
931  // if sought event is in this file, then return the index of that file
932  if (evtNum >= m_firstEvt[i] && evtNum < m_firstEvt[i] + m_numEvt[i]) {
933  ATH_MSG_INFO("found " << evtNum << " in file " << i);
934  return(i);
935  }
936  }
937  ATH_MSG_INFO("did not find ev " << evtNum);
938  // return file not found marker
939  return(-1);
940 }

◆ 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  if (!::AthService::initialize().isSuccess()) {
96  ATH_MSG_FATAL("Cannot initialize AthService base class.");
97  return(StatusCode::FAILURE);
98  }
99 
100  // Check for input setting
101  if (m_filebased && m_inputCollectionsProp.value().empty()) {
102  ATH_MSG_FATAL("Unable to retrieve valid input list");
103  return(StatusCode::FAILURE);
104  }
105  m_skipEventSequence = m_skipEventSequenceProp.value();
106  std::sort(m_skipEventSequence.begin(), m_skipEventSequence.end());
107 
108  // Check ByteStreamCnvSvc
109  m_eventSource = serviceLocator()->service(m_eventSourceName.value());
110  if (!m_eventSource) {
111  ATH_MSG_FATAL("Cannot get ByteStreamInputSvc");
112  return(StatusCode::FAILURE);
113  }
114 
115  // Get CounterTool (if configured)
116  if (!m_counterTool.empty()) {
117  if (!m_counterTool.retrieve().isSuccess()) {
118  ATH_MSG_FATAL("Cannot get CounterTool.");
119  return(StatusCode::FAILURE);
120  }
121  }
122  // Get HelperTools
123  if (!m_helperTools.empty()) {
124  if (!m_helperTools.retrieve().isSuccess()) {
125  ATH_MSG_FATAL("Cannot get " << m_helperTools);
126  return(StatusCode::FAILURE);
127  }
128  }
129  // Get SharedMemoryTool (if configured)
130  if (!m_eventStreamingTool.empty() && !m_eventStreamingTool.retrieve().isSuccess()) {
131  ATH_MSG_FATAL("Cannot get AthenaSharedMemoryTool");
132  return(StatusCode::FAILURE);
133  }
134 
135  // Register this service for 'I/O' events
136  ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
137  if (!iomgr.retrieve().isSuccess()) {
138  ATH_MSG_FATAL("Cannot retrieve IoComponentMgr.");
139  return(StatusCode::FAILURE);
140  }
141  if (!iomgr->io_register(this).isSuccess()) {
142  ATH_MSG_FATAL("Cannot register myself with the IoComponentMgr.");
143  return(StatusCode::FAILURE);
144  }
145 
146  // Register the input files with the iomgr
147  bool allGood = true;
148  const std::vector<std::string>& incol = m_inputCollectionsProp.value();
149  for (std::size_t icol = 0, imax = incol.size(); icol != imax; ++icol) {
150  if (!iomgr->io_register(this, IIoComponentMgr::IoMode::READ, incol[icol]).isSuccess()) {
151  ATH_MSG_FATAL("could not register [" << incol[icol] << "] for output !");
152  allGood = false;
153  } else {
154  ATH_MSG_VERBOSE("io_register[" << this->name() << "](" << incol[icol] << ") [ok]");
155  }
156  }
157  if (!allGood) {
158  return(StatusCode::FAILURE);
159  }
160 
161  // Make sure MetaDataSvc is initialized before the first file is opened
162  ServiceHandle<IAthMetaDataSvc> metaDataSvc("MetaDataSvc", name());
163  ATH_CHECK(metaDataSvc.retrieve());
164 
165  // Must happen before trying to open a file
166  lock_t lock (m_mutex);
167  StatusCode risc = this->reinit(lock);
168 
169  return risc;
170 }

◆ inputCollectionsHandler()

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

Definition at line 63 of file EventSelectorByteStream.cxx.

63  {
64  lock_t lock (m_mutex);
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 1057 of file EventSelectorByteStream.cxx.

1057  {
1058  lock_t lock (m_mutex);
1059  ATH_MSG_INFO("I/O reinitialization...");
1060  ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
1061  if (!iomgr.retrieve().isSuccess()) {
1062  ATH_MSG_FATAL("Could not retrieve IoComponentMgr !");
1063  return(StatusCode::FAILURE);
1064  }
1065  if (!iomgr->io_hasitem(this)) {
1066  ATH_MSG_FATAL("IoComponentMgr does not know about myself !");
1067  return(StatusCode::FAILURE);
1068  }
1069  std::vector<std::string> inputCollections = m_inputCollectionsProp.value();
1070  for (std::size_t i = 0, imax = inputCollections.size(); i != imax; ++i) {
1071  ATH_MSG_INFO("I/O reinitialization, file = " << inputCollections[i]);
1072  std::string &fname = inputCollections[i];
1073  if (!iomgr->io_contains(this, fname)) {
1074  ATH_MSG_ERROR("IoComponentMgr does not know about [" << fname << "] !");
1075  return(StatusCode::FAILURE);
1076  }
1077  if (!iomgr->io_retrieve(this, fname).isSuccess()) {
1078  ATH_MSG_FATAL("Could not retrieve new value for [" << fname << "] !");
1079  return(StatusCode::FAILURE);
1080  }
1081  }
1082  // all good... copy over.
1083  m_beginFileFired = false;
1084 
1085  // Set m_inputCollectionsProp. But we _dont_ want to run the update
1086  // handler --- that calls reinit(), which will deadlock since
1087  // we're holding the lock. Instead, we'll call reinit() ourselves.
1088  auto old_cb = m_inputCollectionsProp.updateCallBack();
1089  m_inputCollectionsProp.declareUpdateHandler(
1090  [] (Gaudi::Details::PropertyBase&) {}
1091  );
1093  m_inputCollectionsProp.declareUpdateHandler (old_cb);;
1094 
1095  return(this->reinit(lock));
1096 }

◆ last()

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

Definition at line 698 of file EventSelectorByteStream.cxx.

698  {
699  if (it.identifier() == m_endIter->identifier()) {
700  ATH_MSG_DEBUG("last(): Last event in InputStream.");
701  return(StatusCode::SUCCESS);
702  }
703  return(StatusCode::FAILURE);
704 }

◆ makeClient()

StatusCode EventSelectorByteStream::makeClient ( int  num)
overridevirtual

Make this a client.

Definition at line 964 of file EventSelectorByteStream.cxx.

964  {
965  lock_t lock (m_mutex);
966  if (m_eventStreamingTool.empty()) {
967  return(StatusCode::FAILURE);
968  }
969  std::string dummyStr;
970  return(m_eventStreamingTool->makeClient(0, dummyStr));
971 }

◆ makeServer()

StatusCode EventSelectorByteStream::makeServer ( int  num)
overridevirtual

Make this a server.

Definition at line 955 of file EventSelectorByteStream.cxx.

955  {
956  lock_t lock (m_mutex);
957  if (m_eventStreamingTool.empty()) {
958  return(StatusCode::FAILURE);
959  }
960  return(m_eventStreamingTool->makeServer(1, ""));
961 }

◆ next() [1/2]

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

Definition at line 343 of file EventSelectorByteStream.cxx.

343  {
344  lock_t lock (m_mutex);
345  return nextImpl (it, lock);
346 }

◆ next() [2/2]

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

Definition at line 486 of file EventSelectorByteStream.cxx.

486  {
487  lock_t lock (m_mutex);
488  return nextImpl (ctxt, jump, lock);
489 }

◆ nextFile()

void EventSelectorByteStream::nextFile ( lock_t lock) const
private

Definition at line 281 of file EventSelectorByteStream.cxx.

281  {
282  FileIncident endInputFileIncident(name(), "EndInputFile", "BSF:" + *m_inputCollectionsIterator);
283  m_incidentSvc->fireIncident(endInputFileIncident);
284  ++m_inputCollectionsIterator;
285  ++m_fileCount;
286 }

◆ nextHandleFileTransition()

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

Handle file transition at the next iteration.

Definition at line 517 of file EventSelectorByteStream.cxx.

518 {
519  lock_t lock (m_mutex);
520  return nextHandleFileTransitionImpl (ctxt, lock);
521 }

◆ nextHandleFileTransitionImpl()

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

Definition at line 522 of file EventSelectorByteStream.cxx.

524 {
525  const RawEvent* pre{};
526  bool badEvent{};
527  // if event source not ready from init, try next file
528  if (m_filebased && !m_eventSource->ready()) {
529  // next file
530  this->nextFile(lock);
531  if (this->openNewRun(lock).isFailure()) {
532  ATH_MSG_DEBUG("Event source found no more valid files left in input list");
533  m_NumEvents = -1;
534  return StatusCode::FAILURE;
535  }
536  }
537  try {
538  pre = m_eventSource->nextEvent();
539  }
540  catch (const ByteStreamExceptions::readError&) {
541  ATH_MSG_FATAL("Caught ByteStreamExceptions::readError");
542  return StatusCode::FAILURE;
543  }
544  catch (const ByteStreamExceptions::badFragment&) {
545  ATH_MSG_ERROR("badFragment encountered");
546  badEvent = true;
547  }
549  ATH_MSG_ERROR("badFragment data encountered");
550  badEvent = true;
551  }
552  // Check whether a RawEvent has actually been provided
553  if (pre == nullptr) {
554  ctxt = *m_endIter;
555  return StatusCode::FAILURE;
556  }
557 
558  // If not secondary just return the status code based on if the event is bas
559  if (!m_isSecondary.value()) {
560  // check bad event flag and handle as configured
561  return badEvent ? StatusCode::RECOVERABLE : StatusCode::SUCCESS;
562  }
563 
564  // Build a DH for use by other components
565  StatusCode rec_sg = m_eventSource->generateDataHeader();
566  if (rec_sg != StatusCode::SUCCESS) {
567  ATH_MSG_ERROR("Fail to record BS DataHeader in StoreGate. Skipping events?! " << rec_sg);
568  }
569 
570  return StatusCode::SUCCESS;
571 }

◆ nextImpl() [1/2]

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

Definition at line 492 of file EventSelectorByteStream.cxx.

495 {
496  if (jump > 0) {
497  if ( m_NumEvents+jump != m_skipEvents.value()) {
498  // Save initial event count
499  unsigned int cntr = m_NumEvents;
500  // In case NumEvents increments multiple times in a single next call
501  while (m_NumEvents+1 <= cntr + jump) {
502  if (!nextImpl(ctxt, lock).isSuccess()) {
503  return(StatusCode::FAILURE);
504  }
505  }
506  }
507  else ATH_MSG_DEBUG("Jump covered by skip event " << m_skipEvents.value());
508  return(StatusCode::SUCCESS);
509  }
510  else {
511  ATH_MSG_WARNING("Called jump next with non-multiple jump");
512  }
513  return(StatusCode::SUCCESS);
514 }

◆ nextImpl() [2/2]

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

Definition at line 347 of file EventSelectorByteStream.cxx.

349 {
350  static std::atomic<int> n_bad_events = 0; // cross loop counter of bad events
351  // Check if this is an athenaMP client process
352  if (!m_eventStreamingTool.empty() && m_eventStreamingTool->isClient()) {
353  void* source = 0;
354  unsigned int status = 0;
355  if (!m_eventStreamingTool->getLockedEvent(&source, status).isSuccess()) {
356  ATH_MSG_FATAL("Cannot get NextEvent from AthenaSharedMemoryTool");
357  return(StatusCode::FAILURE);
358  }
359  m_eventSource->setEvent(static_cast<char*>(source), status);
360  return(StatusCode::SUCCESS);
361  }
362  // Call all selector tool preNext before starting loop
363  for (const ToolHandle<IAthenaSelectorTool>& tool : m_helperTools) {
364  if (!tool->preNext().isSuccess()) {
365  ATH_MSG_WARNING("Failed to preNext() " << tool->name());
366  }
367  }
368  if (!m_counterTool.empty()) {
369  if (!m_counterTool->preNext().isSuccess()) {
370  ATH_MSG_WARNING("Failed to preNext() CounterTool.");
371  }
372  }
373  // Find an event to return
374  for (;;) {
375  bool badEvent{};
377  if (sc.isRecoverable()) {
378  badEvent = true;
379  } else if (sc.isFailure()) {
380  return StatusCode::FAILURE;
381  }
382 
383  // increment that an event was found
384  ++m_NumEvents;
385 
386  // check bad event flag and handle as configured
387  if (badEvent) {
388  int nbad = ++n_bad_events;
389  ATH_MSG_INFO("Bad event encountered, current count at " << nbad);
390  bool toomany = (m_maxBadEvts >= 0 && nbad > m_maxBadEvts);
391  if (toomany) {ATH_MSG_FATAL("too many bad events ");}
392  if (!m_procBadEvent || toomany) {
393  // End of file
394  it = *m_endIter;
395  return(StatusCode::FAILURE);
396  }
397  ATH_MSG_WARNING("Continue with bad event");
398  }
399 
400  // Check whether properties or tools reject this event
401  if ( m_NumEvents > m_skipEvents.value() &&
402  (m_skipEventSequence.empty() || m_NumEvents != m_skipEventSequence.front()) ) {
403 
404  // Build a DH for use by other components
405  StatusCode rec_sg = m_eventSource->generateDataHeader();
406  if (rec_sg != StatusCode::SUCCESS) {
407  ATH_MSG_ERROR("Fail to record BS DataHeader in StoreGate. Skipping events?! " << rec_sg);
408  }
409 
410  // Build event info attribute list
411  if (recordAttributeListImpl(lock).isFailure()) ATH_MSG_WARNING("Unable to build event info att list");
412 
413  StatusCode status(StatusCode::SUCCESS);
414  for (const ToolHandle<IAthenaSelectorTool>& tool : m_helperTools) {
415  StatusCode toolStatus = tool->postNext();
416  if (toolStatus.isRecoverable()) {
417  ATH_MSG_INFO("Request skipping event from: " << tool->name());
418  status = StatusCode::RECOVERABLE;
419  } else if (toolStatus.isFailure()) {
420  ATH_MSG_WARNING("Failed to postNext() " << tool->name());
421  status = StatusCode::FAILURE;
422  }
423  }
424  if (status.isRecoverable()) {
425  ATH_MSG_INFO("skipping event " << m_NumEvents);
426  } else if (status.isFailure()) {
427  ATH_MSG_WARNING("Failed to postNext() HelperTool.");
428  } else {
429  if (!m_counterTool.empty()) {
430  if (!m_counterTool->postNext().isSuccess()) {
431  ATH_MSG_WARNING("Failed to postNext() CounterTool.");
432  }
433  }
434  break;
435  }
436 
437  // Validate the event
438  try {
439  m_eventSource->validateEvent();
440  }
442  ATH_MSG_ERROR("badFragment data encountered");
443 
444  int nbad = ++n_bad_events;
445  ATH_MSG_INFO("Bad event encountered, current count at " << nbad);
446 
447  bool toomany = (m_maxBadEvts >= 0 && nbad > m_maxBadEvts);
448  if (toomany) {ATH_MSG_FATAL("too many bad events ");}
449  if (!m_procBadEvent || toomany) {
450  // End of file
451  it = *m_endIter;
452  return(StatusCode::FAILURE);
453  }
454  ATH_MSG_WARNING("Continue with bad event");
455  }
456  } else {
457  if (!m_skipEventSequence.empty() && m_NumEvents == m_skipEventSequence.front()) {
458  m_skipEventSequence.erase(m_skipEventSequence.begin());
459  }
460  if ( m_NumEvents % 1'000 == 0 ) {
461  ATH_MSG_INFO("Skipping event " << m_NumEvents - 1);
462  } else {
463  ATH_MSG_DEBUG("Skipping event " << m_NumEvents - 1);
464  }
465  }
466  } // for loop
467 
468  if (!m_eventStreamingTool.empty() && m_eventStreamingTool->isServer()) { // For SharedReader Server, put event into SHM
469  const RawEvent* pre = m_eventSource->currentEvent();
470  StatusCode sc;
471  while ( (sc = putEvent_ST(*m_eventStreamingTool,
472  m_NumEvents - 1, pre->start(),
473  pre->fragment_size_word() * sizeof(uint32_t),
474  m_eventSource->currentEventStatus())).isRecoverable() ) {
475  usleep(1000);
476  }
477  if (!sc.isSuccess()) {
478  ATH_MSG_ERROR("Cannot put Event " << m_NumEvents - 1 << " to AthenaSharedMemoryTool");
479  return(StatusCode::FAILURE);
480  }
481  }
482  return(StatusCode::SUCCESS);
483 }

◆ nextWithSkip()

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

Go to next event and skip if necessary.

Definition at line 573 of file EventSelectorByteStream.cxx.

574 {
575  lock_t lock (m_mutex);
576  return nextWithSkipImpl (ctxt, lock);
577 }

◆ nextWithSkipImpl()

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

Definition at line 578 of file EventSelectorByteStream.cxx.

579  {
580  ATH_MSG_DEBUG("EventSelectorByteStream::nextWithSkip");
581 
582  for (;;) {
583  // Check if we're at the end of file
585  if (sc.isRecoverable()) {
586  continue; // handles empty files
587  }
588  if (sc.isFailure()) {
589  return StatusCode::FAILURE;
590  }
591 
592  // Increase event count
593  ++m_NumEvents;
594 
595  if (!m_counterTool.empty() && !m_counterTool->preNext().isSuccess()) {
596  ATH_MSG_WARNING("Failed to preNext() CounterTool.");
597  }
598  if ( m_NumEvents > m_skipEvents.value() &&
599  (m_skipEventSequence.empty() || m_NumEvents != m_skipEventSequence.front()) ) {
600  return StatusCode::SUCCESS;
601  } else {
602  if (!m_skipEventSequence.empty() && m_NumEvents == m_skipEventSequence.front()) {
603  m_skipEventSequence.erase(m_skipEventSequence.begin());
604  }
605  if (m_isSecondary.value()) {
606  ATH_MSG_INFO("skipping secondary event " << m_NumEvents);
607  } else {
608  ATH_MSG_INFO("skipping event " << m_NumEvents);
609  }
610  }
611  }
612 
613  return StatusCode::SUCCESS;
614 }

◆ openNewRun()

StatusCode EventSelectorByteStream::openNewRun ( lock_t lock) const
private

Definition at line 288 of file EventSelectorByteStream.cxx.

288  {
289  // Should be protected upstream, but this is further protection
290  if (!m_filebased) {
291  ATH_MSG_ERROR("cannot open new run for non-filebased inputs");
292  return(StatusCode::FAILURE);
293  }
294  // Check for end of file list
295  if (m_inputCollectionsIterator == m_inputCollectionsProp.value().end()) {
296  ATH_MSG_INFO("End of input file list reached");
297  return(StatusCode::FAILURE);
298  }
299  std::string blockname = *m_inputCollectionsIterator;
300  // try to open a file, if failure go to next FIXME: PVG: silent failure?
301  //long nev = m_eventSource->getBlockIterator(blockname);
302  auto nevguid = m_eventSource->getBlockIterator(blockname);
303  long nev = nevguid.first;
304  if (nev == -1) {
305  ATH_MSG_FATAL("Unable to access file " << *m_inputCollectionsIterator << ", stopping here");
307  }
308  // Fire the incident
309  if (!m_beginFileFired) {
310  FileIncident beginInputFileIncident(name(), "BeginInputFile", "BSF:" + *m_inputCollectionsIterator,nevguid.second);
311  m_incidentSvc->fireIncident(beginInputFileIncident);
312  //m_beginFileFired = true; // Should go here, but can't because IEvtSelector next is const
313  }
314 
315  // check if file is empty
316  if (nev == 0) {
317  ATH_MSG_WARNING("no events in file " << blockname << " try next");
318  if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
319  this->nextFile(lock);
320  return openNewRun(lock);
321  // check if skipping all events in that file (minus events already skipped)
322  } else if (m_skipEvents.value() - m_NumEvents > nev) {
323  ATH_MSG_WARNING("skipping more events " << m_skipEvents.value() - m_NumEvents << "(" << nev <<") than in file " << *m_inputCollectionsIterator << ", try next");
324  m_NumEvents += nev;
325  m_numEvt[m_fileCount] = nev;
326  if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
327  this->nextFile(lock);
328  return openNewRun(lock);
329  }
330 
331  ATH_MSG_DEBUG("Opened block/file " << blockname);
332  m_firstEvt[m_fileCount] = m_NumEvents;
333  m_numEvt[m_fileCount] = nev;
334 
335  return(StatusCode::SUCCESS);
336 }

◆ previous() [1/2]

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

Definition at line 616 of file EventSelectorByteStream.cxx.

617 {
618  lock_t lock (m_mutex);
619  return previousImpl (ctxt, lock);
620 }

◆ previous() [2/2]

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

Definition at line 677 of file EventSelectorByteStream.cxx.

677  {
678  lock_t lock (m_mutex);
679  return previousImpl (ctxt, jump, lock);
680 }

◆ previousImpl() [1/2]

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

Definition at line 683 of file EventSelectorByteStream.cxx.

686 {
687  if (jump > 0) {
688  for (int i = 0; i < jump; i++) {
689  if (!previousImpl(ctxt, lock).isSuccess()) {
690  return(StatusCode::FAILURE);
691  }
692  }
693  return(StatusCode::SUCCESS);
694  }
695  return(StatusCode::FAILURE);
696 }

◆ previousImpl() [2/2]

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

Definition at line 621 of file EventSelectorByteStream.cxx.

622  {
623  ATH_MSG_DEBUG(" ... previous");
624  const RawEvent* pre = 0;
625  bool badEvent(false);
626  // if event source not ready from init, try next file
627  if (m_eventSource->ready()) {
628  try {
629  pre = m_eventSource->previousEvent();
630  }
631  catch (const ByteStreamExceptions::readError&) {
632  ATH_MSG_FATAL("Caught ByteStreamExceptions::readError");
633  return StatusCode::FAILURE;
634  }
635  catch (const ByteStreamExceptions::badFragment&) {
636  ATH_MSG_ERROR("badFragment encountered");
637  badEvent = true;
638  }
640  ATH_MSG_ERROR("badFragment data encountered");
641  badEvent = true;
642  }
643  // Check whether a RawEvent has actually been provided
644  if (pre == 0) {
645  ATH_MSG_ERROR("No event built");
646  //it = *m_endIter;
647  return(StatusCode::FAILURE);
648  }
649  }
650  else {
651  ATH_MSG_FATAL("Attempt to read previous data on invalid reader");
652  return(StatusCode::FAILURE);
653  }
654  // increment that an event was found
655  //++m_NumEvents;
656 
657  // check bad event flag and handle as configured
658  if (badEvent) {
659  ATH_MSG_ERROR("Called previous for bad event");
660  if (!m_procBadEvent) {
661  // End of file
662  //it = *m_endIter;
663  return(StatusCode::FAILURE);
664  }
665  ATH_MSG_WARNING("Continue with bad event");
666  }
667 
668  // Build a DH for use by other components
669  StatusCode rec_sg = m_eventSource->generateDataHeader();
670  if (rec_sg != StatusCode::SUCCESS) {
671  ATH_MSG_ERROR("Fail to record BS DataHeader in StoreGate. Skipping events?! " << rec_sg);
672  }
673 
674  return StatusCode::SUCCESS;
675 }

◆ readEvent()

StatusCode EventSelectorByteStream::readEvent ( int  maxevt)
overridevirtual

Read the next maxevt events.

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

Definition at line 991 of file EventSelectorByteStream.cxx.

991  {
992  lock_t lock (m_mutex);
993  if (m_eventStreamingTool.empty()) {
994  ATH_MSG_ERROR("No AthenaSharedMemoryTool configured for readEvent()");
995  return(StatusCode::FAILURE);
996  }
997  ATH_MSG_VERBOSE("Called read Event " << maxevt);
998  for (int i = 0; i < maxevt || maxevt == -1; ++i) {
999  const RawEvent* pre = 0;
1000  if (this->nextImpl(*m_beginIter, lock).isSuccess()) {
1001  pre = m_eventSource->currentEvent();
1002  } else {
1003  if (m_NumEvents == -1) {
1004  ATH_MSG_VERBOSE("Called read Event and read last event from input: " << i);
1005  break;
1006  }
1007  ATH_MSG_ERROR("Unable to retrieve next event for " << i << "/" << maxevt);
1008  return(StatusCode::FAILURE);
1009  }
1010  if (m_eventStreamingTool->isServer()) {
1011  StatusCode sc;
1012  while ( (sc = putEvent_ST(*m_eventStreamingTool,
1013  m_NumEvents - 1,
1014  pre->start(),
1015  pre->fragment_size_word() * sizeof(uint32_t),
1016  m_eventSource->currentEventStatus())).isRecoverable() ) {
1017  usleep(1000);
1018  }
1019  if (!sc.isSuccess()) {
1020  ATH_MSG_ERROR("Cannot put Event " << m_NumEvents - 1 << " to AthenaSharedMemoryTool");
1021  return(StatusCode::FAILURE);
1022  }
1023  }
1024  }
1025  // End of file, wait for last event to be taken
1026  StatusCode sc;
1027  while ( (sc = putEvent_ST(*m_eventStreamingTool, 0, 0, 0, 0)).isRecoverable() ) {
1028  usleep(1000);
1029  }
1030  if (!sc.isSuccess()) {
1031  ATH_MSG_ERROR("Cannot put last Event marker to AthenaSharedMemoryTool");
1032  return(StatusCode::FAILURE);
1033  }
1034  return(StatusCode::SUCCESS);
1035 }

◆ recordAttributeList()

StatusCode EventSelectorByteStream::recordAttributeList ( ) const
overrideprotectedvirtual

Record AttributeList in StoreGate.

Definition at line 773 of file EventSelectorByteStream.cxx.

774 {
775  lock_t lock (m_mutex);
776  return recordAttributeListImpl (lock);
777 }

◆ recordAttributeListImpl()

StatusCode EventSelectorByteStream::recordAttributeListImpl ( lock_t lock) const
private

Definition at line 778 of file EventSelectorByteStream.cxx.

779 {
780  std::string listName("EventInfoAtts");
781 
782  if (eventStore()->contains<AthenaAttributeList>(listName)) {
783  const AthenaAttributeList* oldAttrList = nullptr;
784  if (!eventStore()->retrieve(oldAttrList, listName).isSuccess()) {
785  ATH_MSG_ERROR("Cannot retrieve old AttributeList from StoreGate.");
786  return(StatusCode::FAILURE);
787  }
788  if (!eventStore()->removeDataAndProxy(oldAttrList).isSuccess()) {
789  ATH_MSG_ERROR("Cannot remove old AttributeList from StoreGate.");
790  return(StatusCode::FAILURE);
791  }
792  }
793 
794  // build the new attr list
795  auto attrList = std::make_unique<AthenaAttributeList>();
796 
797  // fill the attr list
798  ATH_CHECK(fillAttributeListImpl(attrList.get(), "", false, lock));
799 
800  // put result in event store
801  if (eventStore()->record(std::move(attrList), listName).isFailure()) {
802  return StatusCode::FAILURE;
803  }
804 
805  return StatusCode::SUCCESS;
806 }

◆ reinit()

StatusCode EventSelectorByteStream::reinit ( lock_t lock)
private

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

Definition at line 172 of file EventSelectorByteStream.cxx.

172  {
173  ATH_MSG_INFO("reinitialization...");
174  // reset markers
175  if (m_inputCollectionsProp.value().size()>0) {
176  m_numEvt.resize(m_inputCollectionsProp.value().size(), -1);
177  m_firstEvt.resize(m_inputCollectionsProp.value().size(), -1);
178  }
179  else {
180  m_numEvt.resize(1);
181  m_firstEvt.resize(1);
182  }
183 
184  // Initialize InputCollectionsIterator
185  m_inputCollectionsIterator = m_inputCollectionsProp.value().begin();
186  m_NumEvents = 0;
187  bool retError = false;
188  if (!m_helperTools.empty()) {
189  for (ToolHandle<IAthenaSelectorTool>& tool : m_helperTools) {
190  if (!tool->postInitialize().isSuccess()) {
191  ATH_MSG_FATAL("Failed to postInitialize() " << tool->name());
192  retError = true;
193  }
194  }
195  }
196  if (retError) {
197  ATH_MSG_FATAL("Failed to postInitialize() helperTools");
198  return(StatusCode::FAILURE);
199  }
200 
201  // If file based input then fire appropriate incidents
202  if (m_filebased) {
203  if (!m_firstFileFired) {
204  FileIncident firstInputFileIncident(name(), "FirstInputFile", "BSF:" + *m_inputCollectionsIterator);
205  m_incidentSvc->fireIncident(firstInputFileIncident);
206  m_firstFileFired = true;
207  }
208 
209  // try to open a file
210  if (this->openNewRun(lock).isFailure()) {
211  ATH_MSG_FATAL("Unable to open any file in initialize");
212  return(StatusCode::FAILURE);
213  }
214  // should be in openNewRun, but see comment there
215  m_beginFileFired = true;
216  }
217 
218  return(StatusCode::SUCCESS);
219 }

◆ releaseContext()

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

Definition at line 1052 of file EventSelectorByteStream.cxx.

1052  {
1053  return(StatusCode::SUCCESS);
1054 }

◆ resetCriteria()

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

Set a selection criteria.

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

Definition at line 712 of file EventSelectorByteStream.cxx.

712  {
713  return(StatusCode::SUCCESS);
714 }

◆ rewind()

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

Definition at line 706 of file EventSelectorByteStream.cxx.

706  {
707  ATH_MSG_ERROR("rewind() not implemented");
708  return(StatusCode::FAILURE);
709 }

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

717  {
718  lock_t lock (m_mutex);
719  // Check that input is seekable
720  if (!m_filebased) {
721  ATH_MSG_ERROR("Input not seekable, choose different input svc");
722  return StatusCode::FAILURE;
723  }
724  // find the file index with that event
725  long fileNum = findEvent(evtNum, lock);
726  if (fileNum == -1 && evtNum >= m_firstEvt[m_fileCount] && evtNum < m_NumEvents) {
727  fileNum = m_fileCount;
728  }
729  // if unable to locate file, exit
730  if (fileNum == -1) {
731  ATH_MSG_INFO("seek: Reached end of Input.");
732  return(StatusCode::RECOVERABLE);
733  }
734  // check if it is the current file
735  if (fileNum != m_fileCount) { // event in different file
736  // Close input file if open
737  if (m_eventSource->ready()) m_eventSource->closeBlockIterator(true);
738  ATH_MSG_DEBUG("Seek to item: \"" << m_inputCollectionsProp.value()[fileNum] << "\" from the explicit file list.");
739  std::string fileName = m_inputCollectionsProp.value()[fileNum];
740  m_fileCount = fileNum;
741  // Open the correct file
742  auto nevguid = m_eventSource->getBlockIterator(fileName);
743  long nev = nevguid.first;
744  if (nev == -1) {
745  ATH_MSG_FATAL("Unable to open file with seeked event " << evtNum << " file " << fileName);
746  return StatusCode::FAILURE;
747  }
748  int delta = evtNum - m_firstEvt[m_fileCount];
749  if (delta > 0) {
751  if (nextImpl(*beginIter,delta, lock).isFailure()) return StatusCode::FAILURE;
752  }
753  }
754  // event in current file
755  {
756  int delta = (evtNum - m_firstEvt[m_fileCount] + 1) - m_eventSource->positionInBlock();
757  ATH_MSG_DEBUG("Seeking event " << evtNum << " in current file with delta " << delta);
758  if ( delta == 0 ) { // current event
759  // nothing to do
760  }
761  else if ( delta > 0 ) { // forward
763  if ( this->nextImpl(*beginIter, delta, lock).isFailure() ) return StatusCode::FAILURE;
764  }
765  else if ( delta < 0 ) { // backward
767  if ( this->previousImpl(*beginIter, -1*delta, lock).isFailure() ) return(StatusCode::FAILURE);
768  }
769  }
770  return StatusCode::SUCCESS;
771 }

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

974  {
975  lock_t lock (m_mutex);
976  if (m_eventStreamingTool.empty()) {
977  return(StatusCode::FAILURE);
978  }
979  if (m_eventStreamingTool->isClient()) {
980  StatusCode sc = m_eventStreamingTool->lockEvent(evtNum);
981  while (sc.isRecoverable()) {
982  usleep(1000);
983  sc = m_eventStreamingTool->lockEvent(evtNum);
984  }
985  return(sc);
986  }
987  return(StatusCode::FAILURE);
988 }

◆ size()

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

Always returns -1.

Parameters
it[IN/OUT] current event context.

Definition at line 950 of file EventSelectorByteStream.cxx.

950  {
951  return -1;
952 }

◆ start()

StatusCode EventSelectorByteStream::start ( )
overridevirtual

Definition at line 222 of file EventSelectorByteStream.cxx.

222  {
223  ATH_MSG_DEBUG("Calling EventSelectorByteStream::start()");
224  lock_t lock (m_mutex);
225  // Create the begin and end iterator's for this selector.
227  // Increment to get the new event in.
229 
230  return(StatusCode::SUCCESS);
231 }

◆ stop()

StatusCode EventSelectorByteStream::stop ( )
overridevirtual

Definition at line 234 of file EventSelectorByteStream.cxx.

234  {
235  ATH_MSG_DEBUG("Calling EventSelectorByteStream::stop()");
236  // Handle open files
237  if (m_filebased) {
238  // Close the file
239  if (m_eventSource->ready()) {
240  m_eventSource->closeBlockIterator(false);
241  FileIncident endInputFileIncident(name(), "EndInputFile", "stop");
242  m_incidentSvc->fireIncident(endInputFileIncident);
243  }
244  }
245  return(StatusCode::SUCCESS);
246 }

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.

◆ m_beginFileFired

bool EventSelectorByteStream::m_beginFileFired {}
private

Definition at line 197 of file EventSelectorByteStream.h.

◆ m_beginIter

EventContextByteStream* EventSelectorByteStream::m_beginIter {}
private

Definition at line 186 of file EventSelectorByteStream.h.

◆ m_counterTool

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

Definition at line 201 of file EventSelectorByteStream.h.

◆ m_endIter

EventContextByteStream* EventSelectorByteStream::m_endIter {}
private

Definition at line 187 of file EventSelectorByteStream.h.

◆ 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.

◆ m_eventsPerLB

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

Definition at line 213 of file EventSelectorByteStream.h.

◆ m_eventsPerRun

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

Definition at line 211 of file EventSelectorByteStream.h.

◆ m_filebased

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

Definition at line 207 of file EventSelectorByteStream.h.

◆ m_firstEventNo

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

Definition at line 210 of file EventSelectorByteStream.h.

◆ m_firstFileFired

bool EventSelectorByteStream::m_firstFileFired {}
private

Definition at line 196 of file EventSelectorByteStream.h.

◆ m_firstLBNo

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

Definition at line 212 of file EventSelectorByteStream.h.

◆ m_helperTools

ToolHandleArray<IAthenaSelectorTool> EventSelectorByteStream::m_helperTools {this}
private

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

Definition at line 200 of file EventSelectorByteStream.h.

◆ m_incidentSvc

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

Definition at line 191 of file EventSelectorByteStream.h.

◆ m_initTimeStamp

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

Definition at line 214 of file EventSelectorByteStream.h.

◆ m_inputCollectionsProp

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

Definition at line 189 of file EventSelectorByteStream.h.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ m_runNo

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

Definition at line 209 of file EventSelectorByteStream.h.

◆ m_skipEvents

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

Definition at line 193 of file EventSelectorByteStream.h.

◆ m_skipEventSequenceProp

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

Definition at line 194 of file EventSelectorByteStream.h.

◆ m_timeStampInterval

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

Definition at line 215 of file EventSelectorByteStream.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
EventSelectorByteStream::m_firstFileFired
bool m_firstFileFired
Definition: EventSelectorByteStream.h:196
AtlasMcWeight::decode
double decode(number_type binnedWeight)
Convert weight from unsigned to double.
Definition: AtlasMcWeight.cxx:32
EventSelectorByteStream::findEvent
int findEvent(int evtNum, lock_t &lock) const
Search for event with number evtNum.
Definition: EventSelectorByteStream.cxx:905
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
EventSelectorByteStream::m_filebased
Gaudi::Property< bool > m_filebased
Definition: EventSelectorByteStream.h:207
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
hotSpotInTAG.suffix
string suffix
Definition: hotSpotInTAG.py:186
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
EventSelectorByteStream::m_skipEvents
Gaudi::Property< long > m_skipEvents
Definition: EventSelectorByteStream.h:193
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
OFFLINE_FRAGMENTS_NAMESPACE::DataType
uint32_t DataType
Definition: RawEvent.h:24
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
initialize
void initialize()
Definition: run_EoverP.cxx:894
EventContextByteStream::identifier
virtual void * identifier() const
Inequality operator.
Definition: EventContextByteStream.cxx:25
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
skel.it
it
Definition: skel.GENtoEVGEN.py:396
EventSelectorByteStream::nextWithSkipImpl
StatusCode nextWithSkipImpl(IEvtSelector::Context &ctxt, lock_t &lock) const
Definition: EventSelectorByteStream.cxx:578
EventSelectorByteStream::eventStore
StoreGateSvc * eventStore() const
Definition: EventSelectorByteStream.cxx:78
EventSelectorByteStream::openNewRun
StatusCode openNewRun(lock_t &lock) const
Definition: EventSelectorByteStream.cxx:288
EventSelectorByteStream::fillAttributeListImpl
StatusCode fillAttributeListImpl(coral::AttributeList *attrList, const std::string &suffix, bool copySource, lock_t &lock) const
Definition: EventSelectorByteStream.cxx:813
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
EventSelectorByteStream::m_runNo
Gaudi::CheckedProperty< int > m_runNo
Definition: EventSelectorByteStream.h:209
EventSelectorByteStream::nextHandleFileTransitionImpl
StatusCode nextHandleFileTransitionImpl(IEvtSelector::Context &ctxt, lock_t &lock) const
Definition: EventSelectorByteStream.cxx:522
EventSelectorByteStream::m_firstLBNo
Gaudi::CheckedProperty< int > m_firstLBNo
Definition: EventSelectorByteStream.h:212
EventSelectorByteStream::m_beginIter
EventContextByteStream * m_beginIter
Definition: EventSelectorByteStream.h:186
atlasStyleMacro.icol
int icol
Definition: atlasStyleMacro.py:13
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
EventSelectorByteStream::m_mutex
mutex_t m_mutex
Definition: EventSelectorByteStream.h:170
EventSelectorByteStream::m_endIter
EventContextByteStream * m_endIter
Definition: EventSelectorByteStream.h:187
EventSelectorByteStream::size
virtual int size(Context &it) const override
Always returns -1.
Definition: EventSelectorByteStream.cxx:950
EventSelectorByteStream::m_helperTools
ToolHandleArray< IAthenaSelectorTool > m_helperTools
HelperTools, vector of names of AlgTools that are executed by the EventSelector.
Definition: EventSelectorByteStream.h:200
TileAANtupleConfig.inputCollections
inputCollections
Definition: TileAANtupleConfig.py:133
EventSelectorByteStream::m_initTimeStamp
Gaudi::CheckedProperty< int > m_initTimeStamp
Definition: EventSelectorByteStream.h:214
EventSelectorByteStream::reinit
StatusCode reinit(lock_t &lock)
Reinitialize the service when a fork() occurred/was-issued.
Definition: EventSelectorByteStream.cxx:172
createCoolChannelIdFile.buffer
buffer
Definition: createCoolChannelIdFile.py:12
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
EventSelectorByteStream::nextFile
void nextFile(lock_t &lock) const
Definition: EventSelectorByteStream.cxx:281
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ByteStreamExceptions::readError
Definition: ByteStreamExceptions.h:21
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
EventSelectorByteStream::nextImpl
StatusCode nextImpl(Context &it, lock_t &lock) const
Definition: EventSelectorByteStream.cxx:347
lumiFormat.i
int i
Definition: lumiFormat.py:85
EventSelectorByteStream::m_counterTool
ToolHandle< IAthenaSelectorTool > m_counterTool
Definition: EventSelectorByteStream.h:201
EventSelectorByteStream::m_eventsPerRun
Gaudi::CheckedProperty< int > m_eventsPerRun
Definition: EventSelectorByteStream.h:211
EventSelectorByteStream::m_procBadEvent
Gaudi::Property< bool > m_procBadEvent
process bad events, which fail check_tree().
Definition: EventSelectorByteStream.h:183
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
EventSelectorByteStream::inputCollectionsHandler
void inputCollectionsHandler(Gaudi::Details::PropertyBase &)
Definition: EventSelectorByteStream.cxx:63
StoreGateSvc::currentStoreGate
static StoreGateSvc * currentStoreGate()
get current StoreGate
Definition: StoreGateSvc.cxx:69
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
EventSelectorByteStream::m_maxBadEvts
Gaudi::Property< int > m_maxBadEvts
number of bad events allowed before quitting.
Definition: EventSelectorByteStream.h:184
EventSelectorByteStream::ATLAS_THREAD_SAFE
int m_fileCount ATLAS_THREAD_SAFE
number of files to process.
Definition: EventSelectorByteStream.h:171
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Definition: PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:45
EventSelectorByteStream::m_firstEventNo
Gaudi::CheckedProperty< int > m_firstEventNo
Definition: EventSelectorByteStream.h:210
imax
int imax(int i, int j)
Definition: TileLaserTimingTool.cxx:33
python.egammaTruthD3PDObject.blockname
blockname
Definition: egammaTruthD3PDObject.py:64
EventSelectorByteStream::m_isSecondary
Gaudi::Property< bool > m_isSecondary
IsSecondary, know if this is an instance of secondary event selector.
Definition: EventSelectorByteStream.h:180
checkRpcDigits.allGood
bool allGood
Loop over the SDOs & Digits.
Definition: checkRpcDigits.py:171
ByteStreamExceptions::badFragmentData
Definition: ByteStreamExceptions.h:33
EventSelectorByteStream::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
Definition: EventSelectorByteStream.h:191
EventSelectorByteStream::m_eventSourceName
Gaudi::Property< std::string > m_eventSourceName
Definition: EventSelectorByteStream.h:182
EventSelectorByteStream::m_inputCollectionsProp
Gaudi::Property< std::vector< std::string > > m_inputCollectionsProp
Definition: EventSelectorByteStream.h:189
StoreGateSvc::proxy
virtual SG::DataProxy * proxy(const void *const pTransient) const override final
get proxy for a given data object address in memory
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
pool::READ
@ READ
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:68
EventSelectorByteStream::m_beginFileFired
bool m_beginFileFired
Definition: EventSelectorByteStream.h:197
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
EventSelectorByteStream::recordAttributeListImpl
StatusCode recordAttributeListImpl(lock_t &lock) const
Definition: EventSelectorByteStream.cxx:778
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
ByteStreamExceptions::fileAccessError
Definition: ByteStreamExceptions.h:15
EventSelectorByteStream::m_eventSource
SmartIF< IByteStreamInputSvc > m_eventSource
Definition: EventSelectorByteStream.h:188
ByteStreamExceptions::badFragment
Definition: ByteStreamExceptions.h:27
LArCellNtuple.nev
int nev
Definition: LArCellNtuple.py:135
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
EventContextByteStream
This class provides the Context for EventSelectorByteStream.
Definition: EventContextByteStream.h:21
EventSelectorByteStream::m_eventsPerLB
Gaudi::CheckedProperty< int > m_eventsPerLB
Definition: EventSelectorByteStream.h:213
EventSelectorByteStream::m_skipEventSequenceProp
Gaudi::Property< std::vector< long > > m_skipEventSequenceProp
Definition: EventSelectorByteStream.h:194
copySelective.source
string source
Definition: copySelective.py:32
merge.status
status
Definition: merge.py:17
SG::DataProxy
Definition: DataProxy.h:45
EventSelectorByteStream::lock_t
std::lock_guard< mutex_t > lock_t
Definition: EventSelectorByteStream.h:127
EventSelectorByteStream::previousImpl
StatusCode previousImpl(Context &it, lock_t &lock) const
Definition: EventSelectorByteStream.cxx:621
ServiceHandle< IIoComponentMgr >