ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
PyAthenaEventLoopMgr Class Reference

Implementation of the AthenaEventLoopMgr that allows selective and specific overrides in python. The idea is to maximize code-sharing with AthenaEventLoopMgr to reduce maintainance. More...

#include <PyAthenaEventLoopMgr.h>

Inheritance diagram for PyAthenaEventLoopMgr:
Collaboration diagram for PyAthenaEventLoopMgr:

Public Types

typedef IEvtSelector::Context EvtContext
 

Public Member Functions

 PyAthenaEventLoopMgr (const std::string &name, ISvcLocator *svcLoc)
 Standard Constructor. More...
 
 ~PyAthenaEventLoopMgr ()
 
PyObjectsetManager (PyObject *)
 actual manager object More...
 
PyObjectgetManager ()
 
virtual StatusCode initialize ()
 implementation of IAppMgrUI::initalize More...
 
virtual StatusCode finalize ()
 implementation of IAppMgrUI::finalize More...
 
virtual StatusCode nextEvent (int maxevt)
 implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately More...
 
virtual StatusCode executeEvent (EventContext &&ctx)
 implementation of IEventProcessor::executeEvent(EventContext&& ctx) More...
 
virtual StatusCode executeRun (int maxevt)
 implementation of IEventProcessor::executeRun(int maxevt) More...
 
virtual StatusCode seek (int evt)
 Seek to a given event. More...
 
virtual int curEvent () const
 Return the current event count. More...
 
virtual int size ()
 Return the size of the collection. More...
 
void handle (const Incident &inc)
 IIncidentListenet interfaces. More...
 
StatusCode execAtPreFork (const EventContext &ctx) const
 Execute certain algorithms/sequences in PreFork. More...
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 interface dispatcher More...
 
virtual const std::string & name () const
 
virtual void modifyEventContext (EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
 DeclareInterfaceID (IEventSeek, 1, 0)
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Static Public Member Functions

static PyAthenaEventLoopMgrpointer ()
 outside access More...
 
static const InterfaceID & interfaceID ()
 

Protected Types

typedef ServiceHandle< IIncidentSvc > IIncidentSvc_t
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 
typedef ServiceHandle< IDataManagerSvc > IDataManagerSvc_t
 
typedef ServiceHandle< IConversionSvc > IConversionSvc_t
 
typedef ServiceHandle< IEvtIdModifierSvcIEvtIdModifierSvc_t
 
typedef EventID::number_type number_type
 
typedef IAthenaEvtLoopPreSelectTool tool_type
 
typedef ToolHandleArray< tool_typetool_store
 
typedef tool_store::const_iterator tool_iterator
 
typedef std::vector< unsigned int > tool_stats
 
typedef tool_stats::const_iterator tool_stats_iterator
 

Protected Member Functions

 PyAthenaEventLoopMgr ()
 Unimplemented features to keep Reflex happy. More...
 
 PyAthenaEventLoopMgr (const PyAthenaEventLoopMgr &)
 
PyAthenaEventLoopMgroperator= (const PyAthenaEventLoopMgr &)
 
virtual StatusCode executeAlgorithms (const EventContext &)
 Run the algorithms for the current event. More...
 
void setupPreSelectTools (Gaudi::Details::PropertyBase &)
 property update handler:sets up the Pre-selection tools More...
 
void setClearStorePolicy (Gaudi::Details::PropertyBase &clearStorePolicy)
 property update handler:set the clear-store policy value and check its value. More...
 
virtual StatusCode writeHistograms (bool force=false)
 Dump out histograms as needed. More...
 
StatusCode initializeAlgorithms ()
 Initialize all algorithms and output streams. More...
 
void setTimeout (Timeout &instance)
 Set timeout. More...
 
void resetTimeout (Timeout &instance)
 Reset timeout. More...
 

Protected Attributes

IIncidentSvc_t m_incidentSvc
 Reference to the incident service. More...
 
StoreGateSvc_t m_eventStore
 Reference to StoreGateSvc;. More...
 
IEvtSelector * m_evtSelector
 Reference to the Event Selector. More...
 
IEvtSelector::Context * m_evtSelCtxt
 Gaudi EventSelector Context (may be used as a cursor by the evt selector) More...
 
StringProperty m_evtsel
 
IDataManagerSvc_t m_histoDataMgrSvc
 Reference to the Histogram Data Service. More...
 
IConversionSvc_t m_histoPersSvc
 
IEvtIdModifierSvc_t m_evtIdModSvc
 
StringArrayProperty m_execAtPreFork
 
StringProperty m_histPersName
 
number_type m_currentRun
 current run number More...
 
bool m_firstRun
 
IntegerProperty m_failureMode
 
UnsignedIntegerProperty m_eventPrintoutInterval
 
tool_stats m_toolInvoke
 tool called counter More...
 
tool_stats m_toolReject
 tool returns StatusCode::FAILURE counter More...
 
tool_stats m_toolAccept
 tool returns StatusCode::SUCCESS counter More...
 
tool_store m_tools
 internal tool store More...
 
bool m_requireInputAttributeList {}
 require input attribute list More...
 
bool m_useSecondaryEventNumber {}
 read event number from secondary input More...
 
StringProperty m_clearStorePolicy
 
SmartIF< IAlgExecStateSvc > m_aess
 Reference to the Algorithm Execution State Svc. More...
 

Private Member Functions

StatusCode installEventContext (EventContext &ctx)
 
StoreGateSvceventStore () const
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

PyObjectm_manager
 
int m_nevt {}
 
IntegerProperty m_writeInterval
 
bool m_writeHists {}
 
unsigned int m_nev
 events processed More...
 
unsigned int m_proc
 
bool m_useTools
 
unsigned int m_lastNev {}
 
unsigned int m_intervalInSeconds
 
time_t m_lastTime {}
 
bool m_liteLoop
 
bool m_doChrono = false
 
ServiceHandle< IChronoStatSvc > m_chronoStatSvc
 
ServiceHandle< Athena::IConditionsCleanerSvcm_conditionsCleaner
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Detailed Description

Implementation of the AthenaEventLoopMgr that allows selective and specific overrides in python. The idea is to maximize code-sharing with AthenaEventLoopMgr to reduce maintainance.

Definition at line 36 of file PyAthenaEventLoopMgr.h.

Member Typedef Documentation

◆ EvtContext

typedef IEvtSelector::Context AthenaEventLoopMgr::EvtContext
inherited

Definition at line 71 of file AthenaEventLoopMgr.h.

◆ IConversionSvc_t

typedef ServiceHandle<IConversionSvc> AthenaEventLoopMgr::IConversionSvc_t
protectedinherited

Definition at line 93 of file AthenaEventLoopMgr.h.

◆ IDataManagerSvc_t

typedef ServiceHandle<IDataManagerSvc> AthenaEventLoopMgr::IDataManagerSvc_t
protectedinherited

Definition at line 89 of file AthenaEventLoopMgr.h.

◆ IEvtIdModifierSvc_t

Definition at line 97 of file AthenaEventLoopMgr.h.

◆ IIncidentSvc_t

typedef ServiceHandle<IIncidentSvc> AthenaEventLoopMgr::IIncidentSvc_t
protectedinherited

Definition at line 74 of file AthenaEventLoopMgr.h.

◆ number_type

Definition at line 107 of file AthenaEventLoopMgr.h.

◆ StoreGateSvc_t

Definition at line 78 of file AthenaEventLoopMgr.h.

◆ tool_iterator

typedef tool_store::const_iterator AthenaEventLoopMgr::tool_iterator
protectedinherited

Definition at line 121 of file AthenaEventLoopMgr.h.

◆ tool_stats

typedef std::vector<unsigned int> AthenaEventLoopMgr::tool_stats
protectedinherited

Definition at line 122 of file AthenaEventLoopMgr.h.

◆ tool_stats_iterator

typedef tool_stats::const_iterator AthenaEventLoopMgr::tool_stats_iterator
protectedinherited

Definition at line 123 of file AthenaEventLoopMgr.h.

◆ tool_store

typedef ToolHandleArray< tool_type > AthenaEventLoopMgr::tool_store
protectedinherited

Definition at line 120 of file AthenaEventLoopMgr.h.

◆ tool_type

Definition at line 119 of file AthenaEventLoopMgr.h.

Constructor & Destructor Documentation

◆ PyAthenaEventLoopMgr() [1/3]

PyAthenaEventLoopMgr::PyAthenaEventLoopMgr ( const std::string &  name,
ISvcLocator *  svcLoc 
)

Standard Constructor.

overrides the base-class default: for interactive use, it is mandatory to leave the store untouched at the end of the event (so people can interactively browse the store). Hence, we ask for store clean-up at the beginning of the event.

Definition at line 71 of file PyAthenaEventLoopMgr.cxx.

73  : AthenaEventLoopMgr( name, svcLoc ), m_manager( nullptr )
74 {
79  AthenaEventLoopMgr::m_clearStorePolicy.set( "BeginEvent" );
80 }

◆ ~PyAthenaEventLoopMgr()

PyAthenaEventLoopMgr::~PyAthenaEventLoopMgr ( )
inline

Definition at line 40 of file PyAthenaEventLoopMgr.h.

40 {}

◆ PyAthenaEventLoopMgr() [2/3]

PyAthenaEventLoopMgr::PyAthenaEventLoopMgr ( )
protected

Unimplemented features to keep Reflex happy.

◆ PyAthenaEventLoopMgr() [3/3]

PyAthenaEventLoopMgr::PyAthenaEventLoopMgr ( const PyAthenaEventLoopMgr )
protected

Member Function Documentation

◆ curEvent()

int AthenaEventLoopMgr::curEvent ( ) const
virtualinherited

Return the current event count.

Implements IEventSeek.

Definition at line 892 of file AthenaEventLoopMgr.cxx.

893 {
894  return m_nevt;
895 }

◆ DeclareInterfaceID()

IEventSeek::DeclareInterfaceID ( IEventSeek  ,
,
 
)
inherited

◆ eventStore()

StoreGateSvc * AthenaEventLoopMgr::eventStore ( ) const
privateinherited

Definition at line 1042 of file AthenaEventLoopMgr.cxx.

1042  {
1043  return m_eventStore.get();
1044 }

◆ execAtPreFork()

StatusCode AthenaEventLoopMgr::execAtPreFork ( const EventContext &  ctx) const
inherited

Execute certain algorithms/sequences in PreFork.

Definition at line 1003 of file AthenaEventLoopMgr.cxx.

1003  {
1004  const IAlgManager* algMgr = Gaudi::svcLocator()->as<IAlgManager>();
1005  IAlgorithm* alg{nullptr};
1006 
1007  StatusCode sc;
1008  for (const std::string& name : m_execAtPreFork) {
1009  if ( algMgr->getAlgorithm(name, alg) ) {
1010  ATH_MSG_INFO("Executing " << alg->name() << "...");
1011  sc &= alg->sysExecute(ctx);
1012  }
1013  else ATH_MSG_WARNING("Cannot find algorithm or sequence " << name);
1014  }
1015  return sc;
1016 }

◆ executeAlgorithms()

StatusCode PyAthenaEventLoopMgr::executeAlgorithms ( const EventContext &  ctx)
protectedvirtual

Run the algorithms for the current event.

Reimplemented from AthenaEventLoopMgr.

Definition at line 192 of file PyAthenaEventLoopMgr.cxx.

193 {
195 // forward to call to the python-side object
196  if ( m_manager != nullptr )
197  {
198  // forward call, if python side manager available
199  PyObject* pycontext = PyCapsule_New ( const_cast<EventContext*>(&ctx), nullptr, nullptr);
200  PyObject* result = PyObject_CallMethod( m_manager, execalgs,
201  (char*)"O", pycontext);
202  Py_DECREF (pycontext);
203 
204  if ( ! result )
205  {
206  PyErr_Print(); // should use MessageSvc instead
207  return StatusCode::FAILURE;
208  }
209 
210 #if PY_MAJOR_VERSION < 3
211  if ( PyInt_Check( result ) || PyLong_Check( result ) )
212  {
213  StatusCode sc = StatusCode( (int) PyInt_AS_LONG( result ) );
214  Py_DECREF( result );
215  return sc;
216  }
217 #else
218  if ( PyLong_Check( result ) )
219  {
220  StatusCode sc = StatusCode( (int) PyLong_AS_LONG( result ) );
221  Py_DECREF( result );
222  return sc;
223  }
224 #endif
225 
226  // FIXME: allow python result to be a statuscode
227  MsgStream log( msgSvc(), name() );
228  log << MSG::ERROR
229  << "result from python event loop manager has unexpected type."
230  << endmsg;
231  Py_DECREF( result );
232  return StatusCode::FAILURE;
233  }
234 
235 // otherwise, let base class handle it
237 }

◆ executeEvent()

StatusCode AthenaEventLoopMgr::executeEvent ( EventContext &&  ctx)
virtualinherited

implementation of IEventProcessor::executeEvent(EventContext&& ctx)

Fire begin-Run incident if new run:

m_failureMode 1, RECOVERABLE: skip algorithms, but do not terminate job FAILURE: terminate job

m_failureMode 2: skip algorithms, but do not terminate job

Definition at line 555 of file AthenaEventLoopMgr.cxx.

556 {
557  //This is a lightweight implementation of the executeEvent, used when e.g. processing TTrees with RootNtupleEventSelector
558  if(m_liteLoop) {
559  m_incidentSvc->fireIncident(Incident("BeginEvent",IncidentType::BeginEvent));
561  m_incidentSvc->fireIncident(Incident("EndEvent",IncidentType::EndEvent));
562  ++m_proc;
563  ++m_nev;
564  return sc;
565  }
566 
567  CHECK( installEventContext(ctx) );
568 
570  if (m_firstRun || (m_currentRun != ctx.eventID().run_number()) ) {
571  // Fire EndRun incident unless this is the first run
572  if (!m_firstRun) {
573  m_incidentSvc->fireIncident(Incident(name(),IncidentType::EndRun));
574  }
575  m_firstRun=false;
576  m_currentRun = ctx.eventID().run_number();
577 
578  ATH_MSG_INFO ( " ===>>> start of run " << m_currentRun << " <<<===" );
579 
580  m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginRun,ctx));
581  }
582 
583  bool toolsPassed=true;
584  bool eventFailed = false;
585  // Call any attached tools to reject events early
586  unsigned int toolCtr=0;
587  if(m_useTools) {
588  //note: pEvent cannot be nullptr here, it has already been dereferenced
589  tool_store::iterator theTool = m_tools.begin();
590  tool_store::iterator lastTool = m_tools.end();
591  while(toolsPassed && theTool!=lastTool )
592  {
593  toolsPassed = (*theTool)->passEvent(ctx.eventID());
594  m_toolInvoke[toolCtr]++;
595  {toolsPassed ? m_toolAccept[toolCtr]++ : m_toolReject[toolCtr]++;}
596  ++toolCtr;
597  ++theTool;
598  }
599  }
600 
601 
602  uint64_t evtNumber = ctx.eventID().event_number();
603  bool doEvtHeartbeat(m_eventPrintoutInterval.value() > 0 &&
604  ( (!m_intervalInSeconds && 0 == (m_nev % m_eventPrintoutInterval.value())) ||
606  if (doEvtHeartbeat) {
607  if(!m_useTools) {
608  ATH_MSG_INFO ( " ===>>> start processing event #" << evtNumber << ", run #" << m_currentRun << " " << m_nev << " events processed so far <<<===" );
609  if(m_intervalInSeconds) {
610  ATH_MSG_INFO(" ===>>> Event processing rate = " << double(m_nev-m_lastNev)/(time(nullptr)-m_lastTime) << " Hz <<<===");
611  m_lastNev = m_nev; m_lastTime = time(nullptr);
612  }
613  }
614 
615  else ATH_MSG_INFO ( " ===>>> start processing event #" << evtNumber << ", run #" << m_currentRun
616  << " " << m_nev << " events read and " << m_proc
617  << " events processed so far <<<===" );
618  }
619 
620  // Reset the timeout singleton
622  if(toolsPassed) {
623  // Fire BeginEvent "Incident"
624  //m_incidentSvc->fireIncident(Incident(*pEvent, name(),"BeginEvent"));
625 
626  // An incident may schedule a stop, in which case is better to exit before the actual execution.
627  if ( m_scheduledStop ) {
628  ATH_MSG_ALWAYS ( "A stopRun was requested by an incidentListener. "
629  << "Do not process this event." );
630  return (StatusCode::SUCCESS);
631  }
632 
633  CHECK( m_conditionsCleaner->event (ctx, false) );
634 
635  // Call the execute() method of all top algorithms
637 
638  if(!sc.isSuccess()) {
639  eventFailed = true;
640  m_aess->setEventStatus( EventStatus::AlgFail, ctx );
641 
645  if (m_failureMode == 1 && sc.isRecoverable() ) {
646  ATH_MSG_WARNING ( "RECOVERABLE error returned by algorithm. "
647  << "Skipping remaining algorithms." << std::endl
648  << "\tNo output will be written for this event, "
649  << "but job will continue to next event" );
650  eventFailed = false;
651  }
652 
654  if (m_failureMode >= 2) {
655  ATH_MSG_INFO ( "Skipping remaining algorithms." << std::endl
656  << "\tNo output will be written for this event, "
657  << "but job will continue to next event" );
658  eventFailed = false;
659  }
660 
661  } else {
662 
663  m_aess->setEventStatus( EventStatus::Success, ctx );
664 
665  // Call the execute() method of all output streams
666  for (ListAlg::iterator ito = m_outStreamList.begin();
667  ito != m_outStreamList.end(); ++ito ) {
668  sc = (*ito)->sysExecute(ctx);
669  if( !sc.isSuccess() ) {
670  eventFailed = true;
671  }
672  }
673 
674  writeHistograms().ignore();
675 
676  }
677 
678  // Fire EndEvent "Incident"
679  //m_incidentSvc->fireIncident(Incident(*pEvent, name(),"EndEvent"));
680  ++m_proc;
681  } // end of toolsPassed test
682  ++m_nev;
683  if (doEvtHeartbeat) {
684  if(!m_intervalInSeconds) {
685  if (!m_useTools)
686  ATH_MSG_INFO(" ===>>> done processing event #" << evtNumber << ", run #" << m_currentRun
687  << " " << m_nev << " events processed so far <<<===");
688  else
689  ATH_MSG_INFO(" ===>>> done processing event #" << evtNumber << ", run #" << m_currentRun
690  << " " << m_nev << " events read and " << m_proc
691  << " events processed so far <<<===");
692  }
693  std::ofstream outfile( "eventLoopHeartBeat.txt");
694  if ( !outfile ) {
695  ATH_MSG_ERROR ( " unable to open: eventLoopHeartBeat.txt" );
696  } else {
697  outfile << " done processing event #" << evtNumber << ", run #" << m_currentRun
698  << " " << m_nev << " events read so far <<<===" << std::endl;
699  outfile.close();
700  }
701 
702  }
703 
704  //------------------------------------------------------------------------
705  // Check if there was an error processing current event
706  //------------------------------------------------------------------------
707  return eventFailed?StatusCode::FAILURE:StatusCode::SUCCESS;
708 
709 }

◆ executeRun()

StatusCode AthenaEventLoopMgr::executeRun ( int  maxevt)
virtualinherited

implementation of IEventProcessor::executeRun(int maxevt)

Definition at line 714 of file AthenaEventLoopMgr.cxx.

715 {
716  if (!(this->nextEvent(maxevt)).isSuccess()) return StatusCode::FAILURE;
717  m_incidentSvc->fireIncident(Incident(name(),"EndEvtLoop"));
718  m_incidentSvc->fireIncident(Incident(name(),IncidentType::EndRun));
719 
720  return StatusCode::SUCCESS;
721 }

◆ finalize()

StatusCode PyAthenaEventLoopMgr::finalize ( )
virtual

implementation of IAppMgrUI::finalize

Reimplemented from AthenaEventLoopMgr.

Definition at line 243 of file PyAthenaEventLoopMgr.cxx.

244 {
246  Py_XDECREF( m_manager );
247 
248  return this->AthenaEventLoopMgr::finalize();
249 }

◆ getManager()

PyObject * PyAthenaEventLoopMgr::getManager ( )

Definition at line 130 of file PyAthenaEventLoopMgr.cxx.

131 {
133  if ( ! m_manager )
134  {
135  Py_INCREF( Py_None );
136  return Py_None;
137  }
138 
139  Py_INCREF( m_manager );
140  return m_manager;
141 }

◆ handle()

void AthenaEventLoopMgr::handle ( const Incident &  inc)
inherited

IIncidentListenet interfaces.

Definition at line 922 of file AthenaEventLoopMgr.cxx.

923 {
924  if(inc.type()!="BeforeFork")
925  return;
926 
927  if(!m_firstRun) {
928  ATH_MSG_WARNING ( "Skipping BeforeFork handler. Begin run has already passed" );
929  return;
930  }
931 
932  // Initialize Algorithms and Output Streams
934  if(sc.isFailure()) {
935  ATH_MSG_ERROR ( "Failed to initialize Algorithms" );
936  return;
937  }
938 
939  if(!m_evtSelCtxt) {
940  ATH_MSG_WARNING ( "Skipping BeforeFork handler. No event selector is provided" );
941  return;
942  }
943 
944  // Construct EventInfo
945  IOpaqueAddress* addr = nullptr;
946  sc = m_evtSelector->next(*m_evtSelCtxt);
947  if(!sc.isSuccess()) {
948  ATH_MSG_INFO ( "No more events in event selection " );
949  return;
950  }
951  sc = m_evtSelector->createAddress(*m_evtSelCtxt, addr);
952  if (sc.isFailure()) {
953  ATH_MSG_ERROR ( "Could not create an IOpaqueAddress" );
954  return;
955  }
956  if (nullptr != addr) {
957  //create its proxy
958  sc = eventStore()->recordAddress(addr);
959  if(!sc.isSuccess()) {
960  ATH_MSG_ERROR ( "Error declaring Event object" );
961  return;
962  }
963  }
964 
965  if(eventStore()->loadEventProxies().isFailure()) {
966  ATH_MSG_WARNING ( "Error loading Event proxies" );
967  return;
968  }
969 
970  // Need to make sure we have a valid EventContext in place before
971  // doing anything that could fire incidents.
972  EventContext ctx;
973  // In the case of the BeginRun incident, we just want to take the
974  // next IoV from the list in the EvtIdModifierSvc, but leave it to
975  // be used for the next executeEvent call. TODO CHECK
976  if( installEventContext(ctx).isFailure() ) {
977  throw std::runtime_error( "Error installing event context object" );
978  }
979 
980  m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginRun,ctx));
981  m_firstRun=false;
982  m_currentRun = ctx.eventID().run_number();
983 
984  // Execute requested algorithms/sequences
985  if ( execAtPreFork(ctx).isFailure() ) {
986  ATH_MSG_ERROR ( "Unable to execute requested algorithms/sequences during PreFork!" );
987  return;
988  }
989 
990  // Clear Store
991  const ClearStorePolicy::Type s_clearStore = clearStorePolicy( m_clearStorePolicy.value(), msgStream() );
992  if(s_clearStore==ClearStorePolicy::EndEvent) {
993  sc = eventStore()->clearStore();
994  if(!sc.isSuccess()) {
995  ATH_MSG_ERROR ( "Clear of Event data store failed" );
996  }
997  }
998 }

◆ initialize()

StatusCode PyAthenaEventLoopMgr::initialize ( )
virtual

implementation of IAppMgrUI::initalize

Reimplemented from AthenaEventLoopMgr.

Definition at line 147 of file PyAthenaEventLoopMgr.cxx.

148 {
150 // get the PyAthenaEventLoopMgr python-side class
151  PyObject* modpyelm = PyImport_ImportModule( const_cast< char* >( "AthenaServices.PyAthenaEventLoopMgr" ) );
152  if ( modpyelm ) {
153 
154  PyObject* pyelm = PyObject_GetAttrString( modpyelm, const_cast< char* >( "PyAthenaEventLoopMgr" ) );
155  Py_DECREF( modpyelm );
156 
157  if ( pyelm ) {
158  PyObject* args = PyTuple_New( 0 );
159  PyObject* self = PyObject_Call( pyelm, args, nullptr );
160  Py_DECREF( args );
161  Py_DECREF( pyelm );
162 
163  if ( self ) {
164  // initialize base class, which then allows queryInterface as appropriate
166 
167  // set the interfaces on the python-side manager
168  PyObject* result = setManager( self );
169  Py_DECREF( self );
170 
171  if ( ! result ) {
172  PyErr_Print();
173  sc.ignore();
174  return StatusCode::FAILURE;
175  }
176 
177  return sc;
178  }
179 
180  }
181 
182  }
183 
184  PyErr_Print();
185  return StatusCode::FAILURE;
186 }

◆ initializeAlgorithms()

StatusCode AthenaEventLoopMgr::initializeAlgorithms ( )
protectedinherited

Initialize all algorithms and output streams.

Definition at line 494 of file AthenaEventLoopMgr.cxx.

494  {
495 
496  // Initialize the list of Algorithms. Note that existing Algorithms
497  // are protected against multiple initialization attempts.
498  ListAlg::iterator ita;
499  for ( ita = m_topAlgList.begin(); ita != m_topAlgList.end(); ++ita )
500  {
501  StatusCode sc = (*ita)->sysInitialize();
502  if( sc.isFailure() )
503  {
504  ATH_MSG_ERROR ( "Unable to initialize Algorithm: "
505  << (*ita)->name() );
506  return sc;
507  }
508  }
509 
510  // Initialize the list of Output Streams. Note that existing Output Streams
511  // are protected against multiple initialization attempts.
512  for (ita = m_outStreamList.begin(); ita != m_outStreamList.end(); ++ita )
513  {
514  StatusCode sc = (*ita)->sysInitialize();
515  if( sc.isFailure() ) {
516  ATH_MSG_ERROR ( "Unable to initialize Output Stream: "
517  << (*ita)->name() );
518  return sc;
519  }
520 
521  }
522 
523  return StatusCode::SUCCESS;
524 }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ installEventContext()

StatusCode AthenaEventLoopMgr::installEventContext ( EventContext &  ctx)
privateinherited

Definition at line 1050 of file AthenaEventLoopMgr.cxx.

1050  {
1051  // first get EventInfo and conditionsRun
1052  std::unique_ptr<EventInfo> eventInfo;
1053  EventID eventID;
1054  unsigned int conditionsRun = EventIDBase::UNDEFNUM;
1055  bool consume_modifier_stream = false; // FIXME/CHECK: was true inside TP converter and checks for active storegate
1056 
1057  if (m_evtSelCtxt) { // Deal with the case when an EventSelector is provided
1058  // First try to build a legacy EventInfo object from the TAG information
1059  // Read the attribute list
1060  const AthenaAttributeList* pAttrList =
1062  if (pAttrList != nullptr && pAttrList->size() > 6) {
1063  // Try making EventID-only EventInfo object from in-file TAG
1064  try {
1065  unsigned int runNumber = (*pAttrList)["RunNumber"].data<unsigned int>();
1066  unsigned long long eventNumber = (*pAttrList)["EventNumber"].data<unsigned long long>();
1067  unsigned int eventTime = (*pAttrList)["EventTime"].data<unsigned int>();
1068  unsigned int eventTimeNS = (*pAttrList)["EventTimeNanoSec"].data<unsigned int>();
1069  unsigned int lumiBlock = (*pAttrList)["LumiBlockN"].data<unsigned int>();
1070  unsigned int bunchId = (*pAttrList)["BunchId"].data<unsigned int>();
1071 
1072  ATH_MSG_DEBUG("use TAG with runNumber=" << runNumber);
1073  consume_modifier_stream = true;
1074  // an option to override primary eventNumber with the secondary one in
1075  // case of DoubleEventSelector
1077  unsigned long long eventNumberSecondary{};
1078  if (!(pAttrList->exists("hasSecondaryInput") &&
1079  (*pAttrList)["hasSecondaryInput"].data<bool>())) {
1080  ATH_MSG_FATAL("Secondary EventNumber requested, but secondary input does not exist!");
1081  return StatusCode::FAILURE;
1082  }
1083  if (pAttrList->exists("EventNumber_secondary")) {
1084  eventNumberSecondary = (*pAttrList)["EventNumber_secondary"].data<unsigned long long>();
1085  } else {
1086  // try legacy EventInfo if secondary input did not have attribute
1087  // list primary input should not have this EventInfo type
1088  const EventInfo* pEventSecondary = eventStore()->tryConstRetrieve<EventInfo>();
1089  if (pEventSecondary) {
1090  eventNumberSecondary = pEventSecondary->event_ID()->event_number();
1091  } else {
1092  ATH_MSG_FATAL("Secondary EventNumber requested, but it does not exist!");
1093  return StatusCode::FAILURE;
1094  }
1095  }
1096  if (eventNumberSecondary != 0) {
1097  bool doEvtHeartbeat(m_eventPrintoutInterval.value() > 0 &&
1098  0 == (m_nev % m_eventPrintoutInterval.value()));
1099  if (doEvtHeartbeat) {
1100  ATH_MSG_INFO(" ===>>> using secondary event #"
1101  << eventNumberSecondary << " instead of #"
1102  << eventNumber << " <<<===");
1103  }
1104  eventNumber = eventNumberSecondary;
1105  }
1106  }
1107 
1108  eventInfo = std::make_unique<EventInfo>(
1109  new EventID(runNumber, eventNumber, eventTime, eventTimeNS, lumiBlock, bunchId),
1110  (EventType*)nullptr);
1111  eventID = *(eventInfo->event_ID());
1112 
1113  if (!m_evtIdModSvc.isSet() && pAttrList->exists("ConditionsRun")) {
1114  conditionsRun = (*pAttrList)["ConditionsRun"].data<unsigned int>();
1115  } else {
1116  conditionsRun = runNumber;
1117  }
1118 
1119  } catch (...) {
1120  }
1121  /* FIXME: PvG, not currently written
1122  if( pEvent != 0 && pAttrList->size() > 7 ) {
1123  // Try adding EventType information
1124  try {
1125  float eventWeight = (*pAttrList)["EventWeight"].data<float>();
1126  const EventType* pType = new EventType(); pEvent->setEventType(pType);
1127  pEvent->event_type()->set_mc_event_weight(eventWeight);
1128  } catch (...) {
1129  pEvent->setEventType(0);
1130  }
1131  }
1132  */
1133  } else if (m_requireInputAttributeList) {
1134  ATH_MSG_FATAL("Valid input attribute list required but not present!");
1135  return StatusCode::FAILURE;
1136  }
1137  // In the case that there is no TAG information
1138  if( !eventInfo ) {
1139  // Secondly try to retrieve a legacy EventInfo object from the input file
1140  // m_nevt - 1 because it's incremented early
1142  const EventInfo* pei = eventStore()->tryConstRetrieve<EventInfo>();
1143  if( pei ) {
1144  eventID = *(pei->event_ID());
1145  } else {
1146  // Finally try to retrieve an xAOD::EventInfo object from the
1147  // input file and build a legacy EventInfo object from that.
1149  if (xAODEvent == nullptr) {
1150  ATH_MSG_ERROR("Failed to get EventID from input. Tried old-style and xAOD::EventInfo");
1151  return StatusCode::FAILURE;
1152  }
1153  ATH_MSG_DEBUG("use xAOD::EventInfo with runNumber=" << xAODEvent->runNumber());
1154  // Record the old-style object for those clients that still need it
1155  eventInfo = std::make_unique<EventInfo>(
1156  new EventID(eventIDFromxAOD(xAODEvent)),
1157  new EventType(eventTypeFromxAOD(xAODEvent)));
1158  eventID = *(eventInfo->event_ID());
1159  StatusCode sc = eventStore()->record(std::move(eventInfo), "");
1160  if (!sc.isSuccess()) {
1161  ATH_MSG_ERROR("Error declaring event data object");
1162  return StatusCode::FAILURE;
1163  }
1164  }
1165  }
1166  } else {
1167  // No EventSelector is provided, so with no iterator it's up to us
1168  // to create an EventInfo
1169  eventInfo = std::make_unique<EventInfo>(new EventID(1, m_nevt, 0), new EventType());
1170  eventInfo->event_ID()->set_lumi_block(m_nevt);
1171  eventID = *(eventInfo->event_ID());
1172  StatusCode sc = eventStore()->record(std::move(eventInfo), "");
1173  if (!sc.isSuccess()) {
1174  ATH_MSG_ERROR("Error declaring event data object");
1175  return (StatusCode::FAILURE);
1176  }
1177  }
1178 
1179  ctx.setEventID( eventID );
1180  ctx.set(m_nev,0);
1182  Atlas::ExtendedEventContext( eventStore()->hiveProxyDict(),
1183  conditionsRun) );
1184  modifyEventContext(ctx, eventID, consume_modifier_stream);
1185  Gaudi::Hive::setCurrentContext( ctx );
1186 
1187  m_aess->reset( ctx );
1188  if (eventStore()->record(std::make_unique<EventContext> ( ctx ),
1189  "EventContext").isFailure())
1190  {
1191  ATH_MSG_ERROR ( "Error recording event context object" );
1192  return (StatusCode::FAILURE);
1193  }
1194 
1195  return StatusCode::SUCCESS;
1196 }

◆ interfaceID()

static const InterfaceID& ICollectionSize::interfaceID ( )
inlinestaticinherited

Definition at line 39 of file ICollectionSize.h.

39 { return IID_ICollectionSize; }

◆ modifyEventContext()

void AthenaEventLoopMgr::modifyEventContext ( EventContext &  ctx,
const EventID eID,
bool  consume_modifier_stream 
)
virtualinherited

Definition at line 1200 of file AthenaEventLoopMgr.cxx.

1200  {
1201  if (m_evtIdModSvc.isSet()) {
1202  EventID new_eID(eID);
1203  // m_nevt - 1 because it's incremented early
1204  m_evtIdModSvc->modify_evtid(new_eID, m_nevt - 1, consume_modifier_stream);
1205  if (msgLevel(MSG::DEBUG)) {
1206  unsigned int oldrunnr=eID.run_number();
1207  unsigned int oldLB=eID.lumi_block();
1208  unsigned int oldTS=eID.time_stamp();
1209  unsigned int oldTSno=eID.time_stamp_ns_offset();
1210  ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc runnr=" << oldrunnr << " -> " << new_eID.run_number() );
1211  ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc LB=" << oldLB << " -> " << new_eID.lumi_block() );
1212  ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc TimeStamp=" << oldTS << " -> " << new_eID.time_stamp() );
1213  ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc TimeStamp ns Offset=" << oldTSno << " -> " << new_eID.time_stamp_ns_offset() );
1214  }
1215  ctx.setEventID( new_eID );
1216  Atlas::getExtendedEventContext(ctx).setConditionsRun( ctx.eventID().run_number() );
1217  return;
1218  }
1219 
1220  ctx.setEventID( eID );
1221 }

◆ msg() [1/4]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/4]

MsgStream & AthMessaging::msg
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 92 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [3/4]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msg() [4/4]

MsgStream & AthMessaging::msg
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 99 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl() [1/2]

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ msgLvl() [2/2]

bool AthMessaging::msgLvl
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 86 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ name()

virtual const std::string& AthenaEventLoopMgr::name ( ) const
inlinevirtualinherited

Definition at line 195 of file AthenaEventLoopMgr.h.

195 { return Service::name(); } //FIXME

◆ nextEvent()

StatusCode AthenaEventLoopMgr::nextEvent ( int  maxevt)
virtualinherited

implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately

Reimplemented in MultipleEventLoopMgr.

Definition at line 726 of file AthenaEventLoopMgr.cxx.

727 {
728  // make nextEvent(0) a dummy call
729  if (0 == maxevt) return StatusCode::SUCCESS;
730 
731  static int total_nevt = 0;
732 
733  // the current 'clear-store' policy
734  static const ClearStorePolicy::Type s_clearStore =
735  clearStorePolicy( m_clearStorePolicy.value(), msgStream() );
736 
737 
738  // These following two initialization loops are performed here in case new
739  // Top level Algorithms or Output Streams have been created interactively
740  // at run-time instead of configuration time. Note also that it is possible
741  // that some newly created Algorithms are still not initialized as a result
742  // of these loops (e.g. where the membership of an existing Sequencer is
743  // changed at run-time. In this case, the Algorithm::sysExecute() function
744  // will ensure that the Algorithm is correctly initialized. This mechanism
745  // actually makes loops redundant, but they do provide a well defined
746  // location for the initialization to take place in the non-interactive case.
747 
749  if(sc.isFailure())
750  return sc;
751 
752  // loop over events if the maxevt (received as input) is different from -1.
753  // if evtmax is -1 it means infinite loop
754 
755  while(maxevt == -1 || m_nevt < maxevt) {
756 
757  if(m_doChrono && total_nevt>0) m_chronoStatSvc->chronoStart("EventLoopMgr"); //start after first event
758  if(m_doChrono && total_nevt>0) m_chronoStatSvc->chronoStart("EventLoopMgr_preexec");
759 
760  // Check if there is a scheduled stop issued by some algorithm/sevice
761  if ( m_scheduledStop ) {
762  m_scheduledStop = false;
763  ATH_MSG_ALWAYS ( "A stopRun was requested. Terminating event loop." );
764  break;
765  }
766 
767 
768 
769  ++m_nevt; ++total_nevt;
770  //-----------------------------------------------------------------------
771  // Clear the event store, if used in the event loop
772  //-----------------------------------------------------------------------
773  if( s_clearStore == ClearStorePolicy::BeginEvent &&
774  0 != total_nevt ) {
775  sc = eventStore()->clearStore();
776  if( !sc.isSuccess() ) {
777  ATH_MSG_ERROR ( "Clear of Event data store failed" );
778  m_incidentSvc->fireIncident(Incident(name(),"EndEvtLoop"));
779  return sc;
780  }
781  }
782 
783 
784 
785  //-----------------------------------------------------------------------
786  // we need an EventInfo Object to fire the incidents.
787  //-----------------------------------------------------------------------
788  if ( m_evtSelCtxt )
789  { // Deal with the case when an EventSelector is provided
790 
791  IOpaqueAddress* addr = nullptr;
792 
793  sc = m_evtSelector->next(*m_evtSelCtxt);
794 
795  if ( !sc.isSuccess() )
796  {
797  // This is the end of the loop. No more events in the selection
798  ATH_MSG_INFO ( "No more events in event selection " );
799  sc = StatusCode::SUCCESS;
800  break;
801  }
802 
803  if (m_evtSelector->createAddress(*m_evtSelCtxt, addr).isFailure()) {
804  ATH_MSG_ERROR ( "Could not create an IOpaqueAddress" );
805  break;
806  }
807 
808 
809  // Most iterators provide the IOA of an event header (EventInfo, DataHeader)
810  if (nullptr != addr) {
811  //create its proxy
812  sc = eventStore()->recordAddress(addr);
813  if( !sc.isSuccess() ) {
814  ATH_MSG_WARNING ( "Error declaring Event object" );
815  continue;
816  }
817  }
818  if ((sc=eventStore()->loadEventProxies()).isFailure()) {
819  ATH_MSG_ERROR ( "Error loading Event proxies" );
820  continue;
821  }
822  }
823  if(m_doChrono && total_nevt>1) m_chronoStatSvc->chronoStop("EventLoopMgr_preexec");
824  if(m_doChrono && total_nevt>1) m_chronoStatSvc->chronoStart("EventLoopMgr_execute");
825  // create an empty EventContext that will get set inside executeEvent
826  EventContext ctx;
827  // Execute event for all required algorithms
828  sc = executeEvent( std::move( ctx ) );
829  if(m_doChrono && total_nevt>1) m_chronoStatSvc->chronoStop("EventLoopMgr_execute");
830  if(m_doChrono && total_nevt>1) m_chronoStatSvc->chronoStart("EventLoopMgr_postexec");
831  if( !sc.isSuccess() )
832  {
833  ATH_MSG_ERROR ( "Terminating event processing loop due to errors" );
834  break;
835  }
836 
837  //-----------------------------------------------------------------------
838  // Clear the event store, if used in the event loop
839  //-----------------------------------------------------------------------
840  if ( s_clearStore == ClearStorePolicy::EndEvent ) {
841  sc = eventStore()->clearStore();
842  if( !sc.isSuccess() ) {
843  ATH_MSG_ERROR ( "Clear of Event data store failed" );
844  break;
845  }
846  }
847  if(m_doChrono && total_nevt>1) m_chronoStatSvc->chronoStop("EventLoopMgr_postexec");
848  if(m_doChrono && total_nevt>1) m_chronoStatSvc->chronoStop("EventLoopMgr");
849  } //event loop
850 
851 
852 
853  return sc;
854 
855 }

◆ operator=()

PyAthenaEventLoopMgr& PyAthenaEventLoopMgr::operator= ( const PyAthenaEventLoopMgr )
protected

◆ pointer()

PyAthenaEventLoopMgr * PyAthenaEventLoopMgr::pointer ( )
static

outside access

Definition at line 55 of file PyAthenaEventLoopMgr.cxx.

55  {
56  IEventProcessor* ep = nullptr;
57 
58  static const bool CREATEIF( false );
59  if ( ( Gaudi::svcLocator()->service( "PyAthenaEventLoopMgr", ep, CREATEIF ) ).isSuccess() ) {
60  ep->addRef();
61  return dynamic_cast< PyAthenaEventLoopMgr* >( ep );
62  }
63 
64  return nullptr;
65 }

◆ queryInterface()

StatusCode AthenaEventLoopMgr::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
virtualinherited

interface dispatcher

Definition at line 1026 of file AthenaEventLoopMgr.cxx.

1028 {
1029  if ( IEventSeek::interfaceID().versionMatch(riid) ) {
1030  *ppvInterface = dynamic_cast<IEventSeek*>(this);
1031  }
1032  else if ( ICollectionSize::interfaceID().versionMatch(riid) ) {
1033  *ppvInterface = dynamic_cast<ICollectionSize*>(this);
1034  } else {
1035  // Interface is not directly available : try out a base class
1036  return MinimalEventLoopMgr::queryInterface(riid, ppvInterface);
1037  }
1038  addRef();
1039  return StatusCode::SUCCESS;
1040 }

◆ resetTimeout()

void Athena::TimeoutMaster::resetTimeout ( Timeout instance)
inlineprotectedinherited

Reset timeout.

Definition at line 83 of file Timeout.h.

83 { instance.reset(); }

◆ seek()

StatusCode AthenaEventLoopMgr::seek ( int  evt)
virtualinherited

Seek to a given event.

Implements IEventSeek.

Definition at line 862 of file AthenaEventLoopMgr.cxx.

863 {
864  IEvtSelectorSeek* is = dynamic_cast<IEvtSelectorSeek*> (m_evtSelector);
865  if (is == nullptr) {
866  ATH_MSG_ERROR ( "Seek failed; unsupported by event selector" );
867  return StatusCode::FAILURE;
868  }
869  //cppcheck-suppress nullPointerRedundantCheck
870  if (!m_evtSelCtxt) {
871  if (m_evtSelector->createContext(m_evtSelCtxt).isFailure()) {
872  ATH_MSG_FATAL ( "Can not create the event selector Context." );
873  return StatusCode::FAILURE;
874  }
875  }
876  //m_evtSelCtxt cannot be null if createContext succeeded
877  //cppcheck-suppress nullPointerRedundantCheck
878  StatusCode sc = is->seek (*m_evtSelCtxt, evt);
879  if (sc.isSuccess()) {
880  m_nevt = evt;
881  }
882  else {
883  ATH_MSG_ERROR ( "Seek failed." );
884  }
885  return sc;
886 }

◆ setClearStorePolicy()

void AthenaEventLoopMgr::setClearStorePolicy ( Gaudi::Details::PropertyBase &  clearStorePolicy)
protectedinherited

property update handler:set the clear-store policy value and check its value.

Definition at line 329 of file AthenaEventLoopMgr.cxx.

329  {
330  const std::string& policyName = m_clearStorePolicy.value();
331 
332  if ( policyName != "BeginEvent" &&
333  policyName != "EndEvent" ) {
334 
335  ATH_MSG_FATAL ( "Unknown policy [" << policyName
336  << "] for the 'ClearStore-policy !"
337  << endmsg
338  << "Valid values are: BeginEvent, EndEvent"
339  );
340  throw GaudiException("Can not setup 'ClearStore'-policy",
341  name(),
342  StatusCode::FAILURE);
343  }
344 
345  return;
346 }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

◆ setManager()

PyObject * PyAthenaEventLoopMgr::setManager ( PyObject mgr)

actual manager object

Definition at line 86 of file PyAthenaEventLoopMgr.cxx.

87 {
89  if ( ! PyObject_HasAttrString( mgr, execalgs ) )
90  {
91  PyErr_SetString( PyExc_TypeError, "given object is not a manager" );
92  return nullptr;
93  }
94 
95 // set on ourselves
97  Py_INCREF( mgr );
98  m_manager = mgr;
99 
100 // set onto the module as a module global (this may replace the old one, so
101 // users are best served to only access this through the module)
102  PyObject* pyelm = PyImport_AddModule( const_cast< char* >( "AthenaServices.PyAthenaEventLoopMgr" ) );
103  if ( pyelm ) {
104  Py_INCREF( mgr );
105  PyModule_AddObject( pyelm, const_cast< char* >( "EventLoopMgr" ), mgr );
106  }
107 
108 // hand the python side its interfaces
109  PyObject* pyself = PyCapsule_New( (void*)static_cast< IEventSeek* >( this ), nullptr, nullptr );
110 #if PY_MAJOR_VERSION < 3
111  PyObject* method = PyString_FromString( "_installServices" );
112 #else
113  PyObject* method = PyUnicode_FromString( "_installServices" );
114 #endif
115  PyObject* result = PyObject_CallMethodObjArgs( mgr, method, pyself, 0 );
116  Py_DECREF( method );
117  Py_DECREF( pyself );
118 
119  if ( ! result )
120  return nullptr;
121 
122 // return old value (with its refcount), if set previously; or None
123  if ( old != nullptr )
124  return old;
125 
126  Py_INCREF( Py_None );
127  return Py_None;
128 }

◆ setTimeout()

void Athena::TimeoutMaster::setTimeout ( Timeout instance)
inlineprotectedinherited

Set timeout.

Definition at line 80 of file Timeout.h.

80 { instance.set(); }

◆ setupPreSelectTools()

void AthenaEventLoopMgr::setupPreSelectTools ( Gaudi::Details::PropertyBase &  )
protectedinherited

property update handler:sets up the Pre-selection tools

Definition at line 349 of file AthenaEventLoopMgr.cxx.

349  {
350 
351  m_toolInvoke.clear();
352  m_toolReject.clear();
353  m_toolAccept.clear();
354 
355  m_tools.retrieve().ignore();
356  if(m_tools.size() > 0) {
357  m_useTools=true;
358  m_toolInvoke.resize(m_tools.size());
359  m_toolReject.resize(m_tools.size());
360  m_toolAccept.resize(m_tools.size());
361 
362  tool_iterator firstTool = m_tools.begin();
363  tool_iterator lastTool = m_tools.end();
364  unsigned int toolCtr = 0;
365  for ( ; firstTool != lastTool; ++firstTool )
366  {
367  // reset statistics
368  m_toolInvoke[toolCtr] = 0;
369  m_toolReject[toolCtr] = 0;
370  m_toolAccept[toolCtr] = 0;
371  toolCtr++;
372  }
373  }
374 
375  return;
376 
377 }

◆ size()

int AthenaEventLoopMgr::size ( )
virtualinherited

Return the size of the collection.

Implements ICollectionSize.

Definition at line 900 of file AthenaEventLoopMgr.cxx.

901 {
902  IEvtSelectorSeek* cs = dynamic_cast<IEvtSelectorSeek*> (m_evtSelector);
903  if (cs == nullptr) {
904  ATH_MSG_ERROR ( "Collection size unsupported by event selector" );
905  return -1;
906  }
907  //cppcheck-suppress nullPointerRedundantCheck
908  if (!m_evtSelCtxt) {
909  if (m_evtSelector->createContext(m_evtSelCtxt).isFailure()) {
910  ATH_MSG_FATAL ( "Can not create the event selector Context." );
911  return -1;
912  }
913  }
914  //m_evtSelCtxt cannot be null if createContext succeeded
915  //cppcheck-suppress nullPointerRedundantCheck
916  return cs->size (*m_evtSelCtxt);
917 }

◆ writeHistograms()

StatusCode AthenaEventLoopMgr::writeHistograms ( bool  force = false)
protectedvirtualinherited

Dump out histograms as needed.

Definition at line 438 of file AthenaEventLoopMgr.cxx.

438  {
439 
440  StatusCode sc (StatusCode::SUCCESS);
441 
442  if ( 0 != m_histoPersSvc && m_writeHists ) {
443  std::vector<DataObject*> objects;
444  sc = m_histoDataMgrSvc->traverseTree( [&objects]( IRegistry* reg, int ) {
445  DataObject* obj = reg->object();
446  if ( !obj || obj->clID() == CLID_StatisticsFile ) return false;
447  objects.push_back( obj );
448  return true;
449  } );
450 
451  if ( !sc.isSuccess() ) {
452  ATH_MSG_ERROR ( "Error while traversing Histogram data store" );
453  return sc;
454  }
455 
456  if ( objects.size() > 0) {
457  int writeInterval(m_writeInterval.value());
458 
459  if ( m_nevt == 1 || force ||
460  (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
461 
462  // skip /stat entry!
463  sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
464  IOpaqueAddress* pAddr = nullptr;
465  StatusCode iret = m_histoPersSvc->createRep( i, pAddr );
466  if ( iret.isFailure() ) return iret;
467  i->registry()->setAddress( pAddr );
468  return isc;
469  } );
470  sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
471  IRegistry* reg = i->registry();
472  StatusCode iret = m_histoPersSvc->fillRepRefs( reg->address(), i );
473  return iret.isFailure() ? iret : isc;
474  } );
475  if ( ! sc.isSuccess() ) {
476  ATH_MSG_ERROR ( "Error while saving Histograms." );
477  }
478  }
479 
480  if (force || (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
481  ATH_MSG_DEBUG ( "committing Histograms" );
482  m_histoPersSvc->conversionSvc()->commitOutput("",true).ignore();
483  }
484  }
485 
486  }
487 
488  return sc;
489 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_aess

SmartIF<IAlgExecStateSvc> AthenaEventLoopMgr::m_aess
protectedinherited

Reference to the Algorithm Execution State Svc.

Definition at line 159 of file AthenaEventLoopMgr.h.

◆ m_chronoStatSvc

ServiceHandle<IChronoStatSvc> AthenaEventLoopMgr::m_chronoStatSvc
privateinherited

Definition at line 225 of file AthenaEventLoopMgr.h.

◆ m_clearStorePolicy

StringProperty AthenaEventLoopMgr::m_clearStorePolicy
protectedinherited

Definition at line 142 of file AthenaEventLoopMgr.h.

◆ m_conditionsCleaner

ServiceHandle<Athena::IConditionsCleanerSvc> AthenaEventLoopMgr::m_conditionsCleaner
privateinherited

Definition at line 226 of file AthenaEventLoopMgr.h.

◆ m_currentRun

number_type AthenaEventLoopMgr::m_currentRun
protectedinherited

current run number

Definition at line 109 of file AthenaEventLoopMgr.h.

◆ m_doChrono

bool AthenaEventLoopMgr::m_doChrono = false
privateinherited

Definition at line 224 of file AthenaEventLoopMgr.h.

◆ m_eventPrintoutInterval

UnsignedIntegerProperty AthenaEventLoopMgr::m_eventPrintoutInterval
protectedinherited

Definition at line 116 of file AthenaEventLoopMgr.h.

◆ m_eventStore

StoreGateSvc_t AthenaEventLoopMgr::m_eventStore
protectedinherited

Reference to StoreGateSvc;.

Property

Definition at line 80 of file AthenaEventLoopMgr.h.

◆ m_evtIdModSvc

IEvtIdModifierSvc_t AthenaEventLoopMgr::m_evtIdModSvc
protectedinherited

Definition at line 99 of file AthenaEventLoopMgr.h.

◆ m_evtsel

StringProperty AthenaEventLoopMgr::m_evtsel
protectedinherited

Definition at line 87 of file AthenaEventLoopMgr.h.

◆ m_evtSelCtxt

IEvtSelector::Context* AthenaEventLoopMgr::m_evtSelCtxt
protectedinherited

Gaudi EventSelector Context (may be used as a cursor by the evt selector)

Definition at line 85 of file AthenaEventLoopMgr.h.

◆ m_evtSelector

IEvtSelector* AthenaEventLoopMgr::m_evtSelector
protectedinherited

Reference to the Event Selector.

Definition at line 83 of file AthenaEventLoopMgr.h.

◆ m_execAtPreFork

StringArrayProperty AthenaEventLoopMgr::m_execAtPreFork
protectedinherited

Definition at line 102 of file AthenaEventLoopMgr.h.

◆ m_failureMode

IntegerProperty AthenaEventLoopMgr::m_failureMode
protectedinherited

Definition at line 113 of file AthenaEventLoopMgr.h.

◆ m_firstRun

bool AthenaEventLoopMgr::m_firstRun
protectedinherited

Definition at line 110 of file AthenaEventLoopMgr.h.

◆ m_histoDataMgrSvc

IDataManagerSvc_t AthenaEventLoopMgr::m_histoDataMgrSvc
protectedinherited

Reference to the Histogram Data Service.

Definition at line 91 of file AthenaEventLoopMgr.h.

◆ m_histoPersSvc

IConversionSvc_t AthenaEventLoopMgr::m_histoPersSvc
protectedinherited

Definition at line 95 of file AthenaEventLoopMgr.h.

◆ m_histPersName

StringProperty AthenaEventLoopMgr::m_histPersName
protectedinherited

Definition at line 105 of file AthenaEventLoopMgr.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_incidentSvc

IIncidentSvc_t AthenaEventLoopMgr::m_incidentSvc
protectedinherited

Reference to the incident service.

Definition at line 76 of file AthenaEventLoopMgr.h.

◆ m_intervalInSeconds

unsigned int AthenaEventLoopMgr::m_intervalInSeconds
privateinherited

Definition at line 217 of file AthenaEventLoopMgr.h.

◆ m_lastNev

unsigned int AthenaEventLoopMgr::m_lastNev {}
privateinherited

Definition at line 216 of file AthenaEventLoopMgr.h.

◆ m_lastTime

time_t AthenaEventLoopMgr::m_lastTime {}
privateinherited

Definition at line 218 of file AthenaEventLoopMgr.h.

◆ m_liteLoop

bool AthenaEventLoopMgr::m_liteLoop
privateinherited

Definition at line 220 of file AthenaEventLoopMgr.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_manager

PyObject* PyAthenaEventLoopMgr::m_manager
private

Definition at line 62 of file PyAthenaEventLoopMgr.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nev

unsigned int AthenaEventLoopMgr::m_nev
privateinherited

events processed

Definition at line 212 of file AthenaEventLoopMgr.h.

◆ m_nevt

int AthenaEventLoopMgr::m_nevt {}
privateinherited

Definition at line 206 of file AthenaEventLoopMgr.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_proc

unsigned int AthenaEventLoopMgr::m_proc
privateinherited

Definition at line 213 of file AthenaEventLoopMgr.h.

◆ m_requireInputAttributeList

bool AthenaEventLoopMgr::m_requireInputAttributeList {}
protectedinherited

require input attribute list

Definition at line 131 of file AthenaEventLoopMgr.h.

◆ m_toolAccept

tool_stats AthenaEventLoopMgr::m_toolAccept
protectedinherited

tool returns StatusCode::SUCCESS counter

Definition at line 127 of file AthenaEventLoopMgr.h.

◆ m_toolInvoke

tool_stats AthenaEventLoopMgr::m_toolInvoke
protectedinherited

tool called counter

Definition at line 125 of file AthenaEventLoopMgr.h.

◆ m_toolReject

tool_stats AthenaEventLoopMgr::m_toolReject
protectedinherited

tool returns StatusCode::FAILURE counter

Definition at line 126 of file AthenaEventLoopMgr.h.

◆ m_tools

tool_store AthenaEventLoopMgr::m_tools
protectedinherited

internal tool store

Definition at line 128 of file AthenaEventLoopMgr.h.

◆ m_useSecondaryEventNumber

bool AthenaEventLoopMgr::m_useSecondaryEventNumber {}
protectedinherited

read event number from secondary input

Definition at line 134 of file AthenaEventLoopMgr.h.

◆ m_useTools

bool AthenaEventLoopMgr::m_useTools
privateinherited

Definition at line 214 of file AthenaEventLoopMgr.h.

◆ m_writeHists

bool AthenaEventLoopMgr::m_writeHists {}
privateinherited

Definition at line 209 of file AthenaEventLoopMgr.h.

◆ m_writeInterval

IntegerProperty AthenaEventLoopMgr::m_writeInterval
privateinherited

Definition at line 208 of file AthenaEventLoopMgr.h.


The documentation for this class was generated from the following files:
RunTileTBRec.method
method
Definition: RunTileTBRec.py:73
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
StoreGateSvc::record
StatusCode record(T *p2BRegistered, const TKEY &key)
Record an object with a key.
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
AthenaEventLoopMgr::m_lastTime
time_t m_lastTime
Definition: AthenaEventLoopMgr.h:218
AthenaEventLoopMgr::m_evtIdModSvc
IEvtIdModifierSvc_t m_evtIdModSvc
Definition: AthenaEventLoopMgr.h:99
ClearStorePolicy::EndEvent
@ EndEvent
Definition: ClearStorePolicy.h:15
AthenaEventLoopMgr::m_toolAccept
tool_stats m_toolAccept
tool returns StatusCode::SUCCESS counter
Definition: AthenaEventLoopMgr.h:127
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
AthenaEventLoopMgr::m_tools
tool_store m_tools
internal tool store
Definition: AthenaEventLoopMgr.h:128
SGout2dot.alg
alg
Definition: SGout2dot.py:243
get_generator_info.result
result
Definition: get_generator_info.py:21
LArConditions2Ntuple.objects
objects
Definition: LArConditions2Ntuple.py:56
AthenaEventLoopMgr::m_evtSelCtxt
IEvtSelector::Context * m_evtSelCtxt
Gaudi EventSelector Context (may be used as a cursor by the evt selector)
Definition: AthenaEventLoopMgr.h:85
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
calibdata.force
bool force
Definition: calibdata.py:19
EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition: EventType.h:92
AthenaEventLoopMgr::eventStore
StoreGateSvc * eventStore() const
Definition: AthenaEventLoopMgr.cxx:1042
AthenaEventLoopMgr::name
virtual const std::string & name() const
Definition: AthenaEventLoopMgr.h:195
AthenaEventLoopMgr::initialize
virtual StatusCode initialize()
implementation of IAppMgrUI::initalize
Definition: AthenaEventLoopMgr.cxx:129
AthenaEventLoopMgr::m_conditionsCleaner
ServiceHandle< Athena::IConditionsCleanerSvc > m_conditionsCleaner
Definition: AthenaEventLoopMgr.h:226
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
AthenaEventLoopMgr::m_proc
unsigned int m_proc
Definition: AthenaEventLoopMgr.h:213
clearStorePolicy
ClearStorePolicy::Type clearStorePolicy(const std::string &policyName, MsgStream &msg)
returns the enum-version of the policy (by name)
Definition: ClearStorePolicy.cxx:7
AthenaEventLoopMgr::m_evtSelector
IEvtSelector * m_evtSelector
Reference to the Event Selector.
Definition: AthenaEventLoopMgr.h:83
AthenaEventLoopMgr::m_failureMode
IntegerProperty m_failureMode
Definition: AthenaEventLoopMgr.h:113
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
AthenaEventLoopMgr::m_incidentSvc
IIncidentSvc_t m_incidentSvc
Reference to the incident service.
Definition: AthenaEventLoopMgr.h:76
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.DomainsRegistry.reg
reg
globals -----------------------------------------------------------------—
Definition: DomainsRegistry.py:343
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
AthenaEventLoopMgr::m_eventStore
StoreGateSvc_t m_eventStore
Reference to StoreGateSvc;.
Definition: AthenaEventLoopMgr.h:80
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
AthenaEventLoopMgr::m_writeInterval
IntegerProperty m_writeInterval
Definition: AthenaEventLoopMgr.h:208
AthenaEventLoopMgr::m_currentRun
number_type m_currentRun
current run number
Definition: AthenaEventLoopMgr.h:109
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
AthenaEventLoopMgr::m_nev
unsigned int m_nev
events processed
Definition: AthenaEventLoopMgr.h:212
RootUtils::PyGILStateEnsure
Definition: PyAthenaGILStateEnsure.h:20
AthenaEventLoopMgr::modifyEventContext
virtual void modifyEventContext(EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
Definition: AthenaEventLoopMgr.cxx:1200
AthenaEventLoopMgr::installEventContext
StatusCode installEventContext(EventContext &ctx)
Definition: AthenaEventLoopMgr.cxx:1050
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition: ExtendedEventContext.cxx:32
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
IEvtSelectorSeek::seek
virtual StatusCode seek(IEvtSelector::Context &c, int evtnum) const =0
Seek to a given event number.
AthenaEventLoopMgr::nextEvent
virtual StatusCode nextEvent(int maxevt)
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
Definition: AthenaEventLoopMgr.cxx:726
AthenaEventLoopMgr::initializeAlgorithms
StatusCode initializeAlgorithms()
Initialize all algorithms and output streams.
Definition: AthenaEventLoopMgr.cxx:494
ICollectionSize::interfaceID
static const InterfaceID & interfaceID()
Definition: ICollectionSize.h:39
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthenaEventLoopMgr::m_doChrono
bool m_doChrono
Definition: AthenaEventLoopMgr.h:224
AthenaEventLoopMgr::execAtPreFork
StatusCode execAtPreFork(const EventContext &ctx) const
Execute certain algorithms/sequences in PreFork.
Definition: AthenaEventLoopMgr.cxx:1003
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
AthenaEventLoopMgr::m_requireInputAttributeList
bool m_requireInputAttributeList
require input attribute list
Definition: AthenaEventLoopMgr.h:131
lumiFormat.i
int i
Definition: lumiFormat.py:92
AthenaEventLoopMgr::m_histoPersSvc
IConversionSvc_t m_histoPersSvc
Definition: AthenaEventLoopMgr.h:95
Atlas::ExtendedEventContext
Definition: ExtendedEventContext.h:23
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthenaEventLoopMgr::m_aess
SmartIF< IAlgExecStateSvc > m_aess
Reference to the Algorithm Execution State Svc.
Definition: AthenaEventLoopMgr.h:159
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
EventInfo::event_ID
EventID * event_ID()
the unique identification of the event.
Definition: EventInfo/EventInfo/EventInfo.h:210
ClearStorePolicy::Type
Type
Definition: ClearStorePolicy.h:13
IEvtSelectorSeek::size
virtual int size(IEvtSelector::Context &c) const =0
Return the size of the collection, or -1 if we can't get the size.
AthenaEventLoopMgr::m_useTools
bool m_useTools
Definition: AthenaEventLoopMgr.h:214
AthenaEventLoopMgr::m_lastNev
unsigned int m_lastNev
Definition: AthenaEventLoopMgr.h:216
AthenaEventLoopMgr::m_execAtPreFork
StringArrayProperty m_execAtPreFork
Definition: AthenaEventLoopMgr.h:102
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ICollectionSize
Abstract interface for finding the size of an event collection.
Definition: ICollectionSize.h:31
AthenaEventLoopMgr::finalize
virtual StatusCode finalize()
implementation of IAppMgrUI::finalize
Definition: AthenaEventLoopMgr.cxx:382
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
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
PyAthenaEventLoopMgr
Implementation of the AthenaEventLoopMgr that allows selective and specific overrides in python....
Definition: PyAthenaEventLoopMgr.h:36
AthenaEventLoopMgr::m_eventPrintoutInterval
UnsignedIntegerProperty m_eventPrintoutInterval
Definition: AthenaEventLoopMgr.h:116
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
StoreGateSvc::clearStore
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
Definition: StoreGateSvc.cxx:461
Athena::Timeout::instance
static Timeout & instance()
Get reference to Timeout singleton.
Definition: Timeout.h:64
AthenaEventLoopMgr::executeEvent
virtual StatusCode executeEvent(EventContext &&ctx)
implementation of IEventProcessor::executeEvent(EventContext&& ctx)
Definition: AthenaEventLoopMgr.cxx:555
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
AthenaEventLoopMgr::m_toolInvoke
tool_stats m_toolInvoke
tool called counter
Definition: AthenaEventLoopMgr.h:125
Atlas::ExtendedEventContext::setConditionsRun
void setConditionsRun(EventIDBase::number_type conditionsRun)
Definition: ExtendedEventContext.h:36
AthenaEventLoopMgr::m_toolReject
tool_stats m_toolReject
tool returns StatusCode::FAILURE counter
Definition: AthenaEventLoopMgr.h:126
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
AthenaEventLoopMgr::m_clearStorePolicy
StringProperty m_clearStorePolicy
Definition: AthenaEventLoopMgr.h:142
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:42
AthenaEventLoopMgr::m_liteLoop
bool m_liteLoop
Definition: AthenaEventLoopMgr.h:220
AthenaEventLoopMgr::m_chronoStatSvc
ServiceHandle< IChronoStatSvc > m_chronoStatSvc
Definition: AthenaEventLoopMgr.h:225
StoreGateSvc::recordAddress
StatusCode recordAddress(const std::string &skey, IOpaqueAddress *pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
StoreGateSvc::tryConstRetrieve
const T * tryConstRetrieve() const
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
AthenaEventLoopMgr::m_useSecondaryEventNumber
bool m_useSecondaryEventNumber
read event number from secondary input
Definition: AthenaEventLoopMgr.h:134
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
ClearStorePolicy::BeginEvent
@ BeginEvent
Definition: ClearStorePolicy.h:14
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
AthenaEventLoopMgr::m_intervalInSeconds
unsigned int m_intervalInSeconds
Definition: AthenaEventLoopMgr.h:217
AthenaEventLoopMgr::m_firstRun
bool m_firstRun
Definition: AthenaEventLoopMgr.h:110
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthenaEventLoopMgr::m_writeHists
bool m_writeHists
Definition: AthenaEventLoopMgr.h:209
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
eventIDFromxAOD
EventID eventIDFromxAOD(const xAOD::EventInfo *xaod)
Create EventID object from xAOD::EventInfo.
Definition: EventInfoFromxAOD.cxx:16
EventID
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventID.h:35
AthenaEventLoopMgr::writeHistograms
virtual StatusCode writeHistograms(bool force=false)
Dump out histograms as needed.
Definition: AthenaEventLoopMgr.cxx:438
AthenaEventLoopMgr::tool_iterator
tool_store::const_iterator tool_iterator
Definition: AthenaEventLoopMgr.h:121
IEventSeek
Abstract interface for seeking within an event stream.
Definition: IEventSeek.h:27
AthenaEventLoopMgr::AthenaEventLoopMgr
AthenaEventLoopMgr()
no implementation
PyAthenaEventLoopMgr::setManager
PyObject * setManager(PyObject *)
actual manager object
Definition: PyAthenaEventLoopMgr.cxx:86
AthenaEventLoopMgr::m_nevt
int m_nevt
Definition: AthenaEventLoopMgr.h:206
Athena::TimeoutMaster::resetTimeout
void resetTimeout(Timeout &instance)
Reset timeout.
Definition: Timeout.h:83
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
python.PyAthena.obj
obj
Definition: PyAthena.py:135
eventTypeFromxAOD
EventType eventTypeFromxAOD(const xAOD::EventInfo *xaod)
Create EventType object from xAOD::EventInfo.
Definition: EventInfoFromxAOD.cxx:34
PrepareReferenceFile.outfile
outfile
Definition: PrepareReferenceFile.py:42
PyObject
_object PyObject
Definition: IPyComponent.h:26
AthenaEventLoopMgr::executeAlgorithms
virtual StatusCode executeAlgorithms(const EventContext &)
Run the algorithms for the current event.
Definition: AthenaEventLoopMgr.cxx:529
PyAthenaEventLoopMgr::m_manager
PyObject * m_manager
Definition: PyAthenaEventLoopMgr.h:62
Atlas::setExtendedEventContext
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
Definition: ExtendedEventContext.cxx:50
AthenaEventLoopMgr::m_histoDataMgrSvc
IDataManagerSvc_t m_histoDataMgrSvc
Reference to the Histogram Data Service.
Definition: AthenaEventLoopMgr.h:91
IEvtSelectorSeek
Abstract interface for seeking for an event selector.
Definition: IEvtSelectorSeek.h:28
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
EventInfoCnvParams::eventIndex
thread_local event_number_t eventIndex
Definition: IEvtIdModifierSvc.h:34