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

A specialized AthenaEventLoopMgr that allows multiple passes over an event collection. More...

#include <MultipleEventLoopMgr.h>

Inheritance diagram for MultipleEventLoopMgr:
Collaboration diagram for MultipleEventLoopMgr:

Public Types

typedef IEvtSelector::Context EvtContext
 

Public Member Functions

 MultipleEventLoopMgr (const std::string &nam, ISvcLocator *svcLoc)
 Standard Constructor. More...
 
virtual ~MultipleEventLoopMgr ()
 Standard Destructor. More...
 
virtual StatusCode nextEvent (int maxevt)
 Dump out histograms as needed. More...
 
virtual StatusCode initialize ()
 implementation of IAppMgrUI::initalize More...
 
virtual StatusCode finalize ()
 implementation of IAppMgrUI::finalize 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 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...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

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

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...
 
virtual StatusCode executeAlgorithms (const EventContext &)
 Run the algorithms for the current event. 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

 MultipleEventLoopMgr ()
 implementation of IEventProcessor::executeEvent(void* par) More...
 
 MultipleEventLoopMgr (const MultipleEventLoopMgr &)
 no implementation More...
 
StatusCode installEventContext (EventContext &ctx)
 
StoreGateSvceventStore () const
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

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

Properties

StringProperty m_nextPassFilterName
 the name of the INextPassFilter object queried at end of pass More...
 
StringArrayProperty m_toBeReInitializedNames
 a list of services to be reinit at the end of the pass More...
 
ServiceHandle< IToolSvc > m_pToolSvc
 handle to the ToolSvc More...
 
IAlgManager * m_pAlgMgr
 
unsigned int m_passDone
 number of passes already completed More...
 
INextPassFilternextPassFilter ()
 Locate filter. More...
 
bool doNextPass ()
 called at end of pass. Calls nextPassFilter More...
 
StatusCode reInitList ()
 called at each end of pass. More...
 
IAlgManager * algMgr ()
 

Detailed Description

A specialized AthenaEventLoopMgr that allows multiple passes over an event collection.

The number of passes is controlled by a tool called at the end of each pass over the events that implements the INextPassFilter interface (specified using the NextPassFilter property). At the end of each pass the event selector is rewound and the services listed in the ToBeReinitialized property are reinitialized. Typically MultipleEventLoopMgr will be used for calibration jobs, with the INextPassFilter object looking at the status of the constants in the DetectorStore

Definition at line 43 of file MultipleEventLoopMgr.h.

Member Typedef Documentation

◆ EvtContext

typedef IEvtSelector::Context AthenaEventLoopMgr::EvtContext
inherited

Definition at line 68 of file AthenaEventLoopMgr.h.

◆ IConversionSvc_t

typedef ServiceHandle<IConversionSvc> AthenaEventLoopMgr::IConversionSvc_t
protectedinherited

Definition at line 90 of file AthenaEventLoopMgr.h.

◆ IDataManagerSvc_t

typedef ServiceHandle<IDataManagerSvc> AthenaEventLoopMgr::IDataManagerSvc_t
protectedinherited

Definition at line 86 of file AthenaEventLoopMgr.h.

◆ IEvtIdModifierSvc_t

Definition at line 94 of file AthenaEventLoopMgr.h.

◆ IIncidentSvc_t

typedef ServiceHandle<IIncidentSvc> AthenaEventLoopMgr::IIncidentSvc_t
protectedinherited

Definition at line 71 of file AthenaEventLoopMgr.h.

◆ number_type

Definition at line 104 of file AthenaEventLoopMgr.h.

◆ StoreGateSvc_t

Definition at line 75 of file AthenaEventLoopMgr.h.

◆ tool_iterator

typedef tool_store::const_iterator AthenaEventLoopMgr::tool_iterator
protectedinherited

Definition at line 118 of file AthenaEventLoopMgr.h.

◆ tool_stats

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

Definition at line 119 of file AthenaEventLoopMgr.h.

◆ tool_stats_iterator

typedef tool_stats::const_iterator AthenaEventLoopMgr::tool_stats_iterator
protectedinherited

Definition at line 120 of file AthenaEventLoopMgr.h.

◆ tool_store

typedef ToolHandleArray< tool_type > AthenaEventLoopMgr::tool_store
protectedinherited

Definition at line 117 of file AthenaEventLoopMgr.h.

◆ tool_type

Definition at line 116 of file AthenaEventLoopMgr.h.

Constructor & Destructor Documentation

◆ MultipleEventLoopMgr() [1/3]

MultipleEventLoopMgr::MultipleEventLoopMgr ( const std::string &  nam,
ISvcLocator *  svcLoc 
)

Standard Constructor.

Definition at line 24 of file MultipleEventLoopMgr.cxx.

25  :
26  AthenaEventLoopMgr(nam, svcLoc),
27  m_pToolSvc( "ToolSvc", nam ),
28  m_pAlgMgr(nullptr), m_passDone(0)
29 {
30  declareProperty("NextPassFilter", m_nextPassFilterName);
31  declareProperty("ToBeReinitialized", m_toBeReInitializedNames);
32 }

◆ ~MultipleEventLoopMgr()

MultipleEventLoopMgr::~MultipleEventLoopMgr ( )
virtual

Standard Destructor.

Definition at line 34 of file MultipleEventLoopMgr.cxx.

34  {
35  if (m_pAlgMgr) m_pAlgMgr->release();
36 }

◆ MultipleEventLoopMgr() [2/3]

MultipleEventLoopMgr::MultipleEventLoopMgr ( )
private

implementation of IEventProcessor::executeEvent(void* par)

no implementation

◆ MultipleEventLoopMgr() [3/3]

MultipleEventLoopMgr::MultipleEventLoopMgr ( const MultipleEventLoopMgr )
private

no implementation

Member Function Documentation

◆ algMgr()

IAlgManager * MultipleEventLoopMgr::algMgr ( )
private

Definition at line 39 of file MultipleEventLoopMgr.cxx.

39  {
40  if ( nullptr == m_pAlgMgr ) {
41  SmartIF<IAlgManager> algMan(serviceLocator());
42  if( algMan.isValid() ) m_pAlgMgr=&*algMan;
43  else throw GaudiException("IAlgManager not found", name(), StatusCode::FAILURE);
44  m_pAlgMgr->addRef();
45  }
46  return m_pAlgMgr;
47 }

◆ curEvent()

int AthenaEventLoopMgr::curEvent ( ) const
virtualinherited

Return the current event count.

Definition at line 882 of file AthenaEventLoopMgr.cxx.

883 {
884  return m_nevt;
885 }

◆ doNextPass()

bool MultipleEventLoopMgr::doNextPass ( )
private

called at end of pass. Calls nextPassFilter

if true start another pass

Definition at line 75 of file MultipleEventLoopMgr.cxx.

75  {
76  INextPassFilter* pFilter(nextPassFilter());
77  //if no tool found or tool not an INextPassFilter we return false
78  //and terminate the multiple pass iteration
79  return ( nullptr != pFilter && pFilter->doNextPass() );
80 }

◆ eventStore()

StoreGateSvc * AthenaEventLoopMgr::eventStore ( ) const
privateinherited

Definition at line 1010 of file AthenaEventLoopMgr.cxx.

1010  {
1011  return m_eventStore.get();
1012 }

◆ execAtPreFork()

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

Execute certain algorithms/sequences in PreFork.

Definition at line 993 of file AthenaEventLoopMgr.cxx.

993  {
994  IAlgManager* algMgr = Gaudi::svcLocator()->as<IAlgManager>();
995 
996  StatusCode sc;
997  for (const std::string& name : m_execAtPreFork) {
998  SmartIF<IAlgorithm>& alg = algMgr->algorithm(name, /*createIf*/false);
999  if ( alg ) {
1000  ATH_MSG_INFO("Executing " << alg->name() << "...");
1001  sc &= alg->sysExecute(ctx);
1002  }
1003  else ATH_MSG_WARNING("Cannot find algorithm or sequence " << name);
1004  }
1005  return sc;
1006 }

◆ executeAlgorithms()

StatusCode AthenaEventLoopMgr::executeAlgorithms ( const EventContext &  ctx)
protectedvirtualinherited

Run the algorithms for the current event.

Reimplemented in PyAthenaEventLoopMgr.

Definition at line 519 of file AthenaEventLoopMgr.cxx.

519  {
520 
521  // Call the execute() method of all top algorithms
522  for ( ListAlg::iterator ita = m_topAlgList.begin();
523  ita != m_topAlgList.end();
524  ++ita )
525  {
526  const StatusCode& sc = (*ita)->sysExecute(ctx);
527  // this duplicates what is already done in Algorithm::sysExecute, which
528  // calls Algorithm::setExecuted, but eventually we plan to remove that
529  // function
530  m_aess->algExecState(*ita,ctx).setState(AlgExecState::State::Done, sc);
531  if ( !sc.isSuccess() ) {
532  ATH_MSG_INFO ( "Execution of algorithm "
533  << (*ita)->name() << " failed with StatusCode::" << sc );
534  return sc;
535  }
536  }
537 
538  return StatusCode::SUCCESS;
539 }

◆ 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 545 of file AthenaEventLoopMgr.cxx.

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

◆ executeRun()

StatusCode AthenaEventLoopMgr::executeRun ( int  maxevt)
virtualinherited

implementation of IEventProcessor::executeRun(int maxevt)

Definition at line 704 of file AthenaEventLoopMgr.cxx.

705 {
706  if (!(this->nextEvent(maxevt)).isSuccess()) return StatusCode::FAILURE;
707  m_incidentSvc->fireIncident(Incident(name(),"EndEvtLoop"));
708  m_incidentSvc->fireIncident(Incident(name(),IncidentType::EndRun));
709 
710  return StatusCode::SUCCESS;
711 }

◆ finalize()

StatusCode AthenaEventLoopMgr::finalize ( )
virtualinherited

implementation of IAppMgrUI::finalize

Reimplemented in PyAthenaEventLoopMgr.

Definition at line 372 of file AthenaEventLoopMgr.cxx.

373 {
374 
376  if (sc.isFailure()) {
377  ATH_MSG_ERROR ( "Error in Algorithm Finalize" );
378  }
379 
380  StatusCode sc2 = writeHistograms(true);
381  if (sc2.isFailure()) {
382  ATH_MSG_ERROR ( "Error in writing Histograms" );
383  }
384 
385  // Release all interfaces (ignore StatusCodes)
386  m_histoDataMgrSvc.release().ignore();
387  m_histoPersSvc.release().ignore();
388 
389  if (m_evtSelector) m_evtSelector->release();
390  m_incidentSvc.release().ignore();
391 
392  delete m_evtSelCtxt; m_evtSelCtxt = nullptr;
393 
394  if(m_useTools) {
395  tool_iterator firstTool = m_tools.begin();
396  tool_iterator lastTool = m_tools.end();
397  unsigned int toolCtr = 0;
398  ATH_MSG_INFO ( "Summary of AthenaEvtLoopPreSelectTool invocation: (invoked/success/failure)" );
399  ATH_MSG_INFO ( "-----------------------------------------------------" );
400 
401  for ( ; firstTool != lastTool; ++firstTool ) {
402  ATH_MSG_INFO ( std::setw(2) << std::setiosflags(std::ios_base::right)
403  << toolCtr+1 << ".) " << std::resetiosflags(std::ios_base::right)
404  << std::setw(48) << std::setfill('.')
405  << std::setiosflags(std::ios_base::left)
406  << (*firstTool)->name() << std::resetiosflags(std::ios_base::left)
407  << std::setfill(' ')
408  << " ("
409  << std::setw(6) << std::setiosflags(std::ios_base::right)
410  << m_toolInvoke[toolCtr]
411  << "/"
412  << m_toolAccept[toolCtr]
413  << "/"
414  << m_toolReject[toolCtr]
415  << ")"
416  );
417  toolCtr++;
418  }
419  }
420  return ( sc.isFailure() || sc2.isFailure() ) ? StatusCode::FAILURE :
421  StatusCode::SUCCESS;
422 
423 }

◆ handle()

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

IIncidentListenet interfaces.

Definition at line 912 of file AthenaEventLoopMgr.cxx.

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

◆ initialize()

StatusCode AthenaEventLoopMgr::initialize ( )
virtualinherited

implementation of IAppMgrUI::initalize

Reimplemented in PyAthenaEventLoopMgr.

Definition at line 130 of file AthenaEventLoopMgr.cxx.

131 {
132  ATH_MSG_INFO ( "Initializing " << name() ) ;
133 
134  m_autoRetrieveTools = false;
135  m_checkToolDeps = false;
136 
138  if ( !sc.isSuccess() )
139  {
140  ATH_MSG_ERROR ( "Failed to initialize base class MinimalEventLoopMgr" );
141  return sc;
142  }
143 
144 //-------------------------------------------------------------------------
145 // Setup access to event data services
146 //-------------------------------------------------------------------------
147 
148  sc = m_eventStore.retrieve();
149  if( !sc.isSuccess() )
150  {
151  ATH_MSG_FATAL ( "Error retrieving pointer to StoreGateSvc" );
152  return sc;
153  }
154 
155 //--------------------------------------------------------------------------
156 // Get the references to the services that are needed by the ApplicationMgr
157 // itself
158 //--------------------------------------------------------------------------
159  sc = m_incidentSvc.retrieve();
160  if( !sc.isSuccess() )
161  {
162  ATH_MSG_FATAL ( "Error retrieving IncidentSvc." );
163  return sc;
164  }
165 
166 //--------------------------------------------------------------------------
167 // Access Property Manager interface:
168 //--------------------------------------------------------------------------
169  SmartIF<IProperty> prpMgr(serviceLocator());
170  if ( !prpMgr.isValid() )
171  {
172  ATH_MSG_FATAL ( "IProperty interface not found in ApplicationMgr." );
173  return StatusCode::FAILURE;
174  }
175 
176 
177 //--------------------------------------------------------------------------
178 // Set up the Histogram Service
179 //--------------------------------------------------------------------------
180  sc = m_histoDataMgrSvc.retrieve();
181  if( !sc.isSuccess() )
182  {
183  ATH_MSG_FATAL ( "Error retrieving HistogramDataSvc" );
184  return sc;
185  }
186 
187  const std::string& histPersName(m_histPersName.value());
188  if ( histPersName.length() == 0 )
189  {
190  CHECK(setProperty(prpMgr->getProperty("HistogramPersistency")));
191  }
192 
193  if ( histPersName != "NONE" ) {
194 
195  m_histoPersSvc = IConversionSvc_t( "HistogramPersistencySvc",
196  this->name() );
197 
198  if( !sc.isSuccess() ) {
199  ATH_MSG_WARNING ( "Histograms cannot not be saved - though required." );
200  } else {
201 
202  SmartIF<IProperty> histSvc;
203  if (histPersName == "ROOT") {
204  histSvc = serviceLocator()->service("RootHistSvc");
205  } else if ( histPersName == "HBOOK" ) {
206  histSvc = serviceLocator()->service("HbookHistSvc");
207  }
208 
209  if (!histSvc) {
210  ATH_MSG_ERROR ( "could not locate actual Histogram persistency service" );
211  } else {
212  const Gaudi::Details::PropertyBase &prop = histSvc->getProperty("OutputFile");
213  std::string val;
214  try {
215  const StringProperty &sprop = dynamic_cast<const StringProperty&>( prop );
216 
217  val = sprop.value();
218 
219  } catch (...) {
220  ATH_MSG_VERBOSE ( "could not dcast OutputFile property to a StringProperty."
221  << " Need to fix Gaudi." );
222 
223  val = prop.toString();
224 
225  }
226 
227  if (val != "" &&
228  val != "UndefinedROOTOutputFileName" &&
229  val != "UndefinedHbookOutputFileName" ) {
230  m_writeHists = true;
231  }
232  }
233  }
234 
235  } else {
236  ATH_MSG_DEBUG ( "Histograms saving not required." );
237  }
238 
239 //--------------------------------------------------------------------------
240 // Set up the EventID modifier Service
241 //--------------------------------------------------------------------------
242  if( m_evtIdModSvc.empty() ) {
243  ATH_MSG_DEBUG ( "EventID modifier Service not set. No run number, ... overrides will be applied." );
244  }
245  else if ( !m_evtIdModSvc.retrieve().isSuccess() ) {
246  ATH_MSG_INFO ( "Could not find EventID modifier Service. No run number, ... overrides will be applied." );
247  }
248 
249 //-------------------------------------------------------------------------
250 // Setup EventSelector service
251 //-------------------------------------------------------------------------
252  const std::string& selName(m_evtsel.value());
253  // the evt sel is usually specified as a property of ApplicationMgr
254  if (selName.empty())
255  sc = setProperty(prpMgr->getProperty("EvtSel"));
256  if (sc.isFailure()) ATH_MSG_WARNING ( "Unable to set EvtSel property" );
257 
258  // We do not expect a Event Selector necessarily being declared
259  if( !selName.empty() && selName != "NONE") {
260  SmartIF<IEvtSelector> theEvtSel{serviceLocator()->service( selName )};
261  if( theEvtSel && ( theEvtSel != m_evtSelector ) ) {
262  // Event Selector changed (or setup for the first time)
263  m_evtSelector = theEvtSel;
264 
265  // reset iterator
266  if (m_evtSelector->createContext(m_evtSelCtxt).isFailure()) {
267  ATH_MSG_FATAL ( "Can not create the event selector Context."
268  );
269  return StatusCode::FAILURE;
270  }
271  if (msgLevel(MSG::INFO)) {
272  SmartIF<INamedInterface> named(theEvtSel);
273  if (named) {
274  ATH_MSG_INFO ( "Setup EventSelector service " << named->name( )
275  );
276  }
277  }
278  } else if (sc.isFailure()) {
279  ATH_MSG_FATAL ( "No valid event selector called " << selName
280  );
281  return StatusCode::FAILURE;
282  }
283  }
284 
285 //-------------------------------------------------------------------------
286 // Setup 'Clear-Store' policy
287 //-------------------------------------------------------------------------
288  try {
290  } catch(...) {
291  return StatusCode::FAILURE;
292  }
293 
294  // Get the AlgExecStateSvc
295  m_aess = serviceLocator()->service("AlgExecStateSvc");
296  if( !m_aess.isValid() ) {
297  ATH_MSG_FATAL ( "Error retrieving AlgExecStateSvc" );
298  return StatusCode::FAILURE;
299  }
300 
301  // Listen to the BeforeFork incident
302  m_incidentSvc->addListener(this,"BeforeFork",0);
303 
304  CHECK( m_conditionsCleaner.retrieve() );
305 
306  // Print if we override the event number using the one from secondary event
308  {
309  ATH_MSG_INFO ( "Using secondary event number." );
310  }
311 
312  return sc;
313 }

◆ initializeAlgorithms()

StatusCode AthenaEventLoopMgr::initializeAlgorithms ( )
protectedinherited

Initialize all algorithms and output streams.

Definition at line 484 of file AthenaEventLoopMgr.cxx.

484  {
485 
486  // Initialize the list of Algorithms. Note that existing Algorithms
487  // are protected against multiple initialization attempts.
488  ListAlg::iterator ita;
489  for ( ita = m_topAlgList.begin(); ita != m_topAlgList.end(); ++ita )
490  {
491  StatusCode sc = (*ita)->sysInitialize();
492  if( sc.isFailure() )
493  {
494  ATH_MSG_ERROR ( "Unable to initialize Algorithm: "
495  << (*ita)->name() );
496  return sc;
497  }
498  }
499 
500  // Initialize the list of Output Streams. Note that existing Output Streams
501  // are protected against multiple initialization attempts.
502  for (ita = m_outStreamList.begin(); ita != m_outStreamList.end(); ++ita )
503  {
504  StatusCode sc = (*ita)->sysInitialize();
505  if( sc.isFailure() ) {
506  ATH_MSG_ERROR ( "Unable to initialize Output Stream: "
507  << (*ita)->name() );
508  return sc;
509  }
510 
511  }
512 
513  return StatusCode::SUCCESS;
514 }

◆ 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 1018 of file AthenaEventLoopMgr.cxx.

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

◆ modifyEventContext()

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

Definition at line 1170 of file AthenaEventLoopMgr.cxx.

1170  {
1171  if (m_evtIdModSvc.isSet()) {
1172  EventID new_eID(eID);
1173  // m_nevt - 1 because it's incremented early
1174  m_evtIdModSvc->modify_evtid(new_eID, m_nevt - 1, consume_modifier_stream);
1175  if (msgLevel(MSG::DEBUG)) {
1176  unsigned int oldrunnr=eID.run_number();
1177  unsigned int oldLB=eID.lumi_block();
1178  unsigned int oldTS=eID.time_stamp();
1179  unsigned int oldTSno=eID.time_stamp_ns_offset();
1180  ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc runnr=" << oldrunnr << " -> " << new_eID.run_number() );
1181  ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc LB=" << oldLB << " -> " << new_eID.lumi_block() );
1182  ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc TimeStamp=" << oldTS << " -> " << new_eID.time_stamp() );
1183  ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc TimeStamp ns Offset=" << oldTSno << " -> " << new_eID.time_stamp_ns_offset() );
1184  }
1185  ctx.setEventID( new_eID );
1186  Atlas::getExtendedEventContext(ctx).setConditionsRun( ctx.eventID().run_number() );
1187  return;
1188  }
1189 
1190  ctx.setEventID( eID );
1191 }

◆ 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 188 of file AthenaEventLoopMgr.h.

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

◆ nextEvent()

StatusCode MultipleEventLoopMgr::nextEvent ( int  maxevt)
virtual

Dump out histograms as needed.

Run the algorithms for the current event implementation of IAppMgrUI::initalize implementation of IAppMgrUI::finalize implementation of IAppMgrUI::nextEvent

Reimplemented from AthenaEventLoopMgr.

Definition at line 93 of file MultipleEventLoopMgr.cxx.

93  {
94  StatusCode sc;
95  do {
96  MsgStream log(msgSvc(), name());
97  log << MSG::INFO << "nextEvent: starting pass #" << m_passDone << endmsg;
98  // Reset run number to assure BeginRun each rewind
99  m_currentRun = 0;
101  log << MSG::INFO << "nextEvent: finished pass #" << m_passDone << endmsg;
102  m_passDone++;
103  } while ( sc.isSuccess() && //pass ok
104  doNextPass() && //another one?
105  (sc = reInitList()).isSuccess() && //then reinit svcs
106  (sc = seek(0)).isSuccess() ); //and rewind selector
107  return sc;
108 }

◆ nextPassFilter()

INextPassFilter * MultipleEventLoopMgr::nextPassFilter ( )
private

Locate filter.

Parses m_nextPassFilterName allowing for interactive changes.

Definition at line 50 of file MultipleEventLoopMgr.cxx.

50  {
51  INextPassFilter* pFilter(nullptr);
52  const string& filterName(m_nextPassFilterName.value());
53  if (!(filterName.empty())) {
54  Gaudi::Utils::TypeNameString theFilter(filterName);
55  IAlgTool* pHoldTool(nullptr);
56  if ( (m_pToolSvc->retrieveTool(theFilter.type(), theFilter.name(),
57  pHoldTool)).isSuccess() ) {
58  pFilter=dynamic_cast<INextPassFilter*>(pHoldTool);
59  }
60 
61  SmartIF<IAlgorithm>& pHoldAlg = algMgr()->algorithm(theFilter, /*createIf*/false);
62  if (nullptr == pFilter && pHoldAlg) {
63  pFilter=dynamic_cast<INextPassFilter*>(pHoldAlg.get());
64  }
65  }
66  if (nullptr == pFilter) {
67  Gaudi::Utils::TypeNameString theFilter(filterName);
68  MsgStream log(msgSvc(), name());
69  log << MSG::WARNING << "Could not locate filter "
70  << theFilter.type() << '/' << theFilter.name() << endmsg;
71  }
72  return pFilter;
73 }

◆ reInitList()

StatusCode MultipleEventLoopMgr::reInitList ( )
private

called at each end of pass.

Parses m_toBeReInitializedNames allowing for interactive changes

Definition at line 82 of file MultipleEventLoopMgr.cxx.

82  {
83  StatusCode sc;
84  for (const std::string& name : m_toBeReInitializedNames.value()) {
85  SmartIF<IService>& svc = serviceLocator()->service(name, /*createIf*/false);
86  if (svc) sc = svc->reinitialize();
87  if (!sc.isSuccess()) return sc;
88  }
89  return sc;
90 }

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

Definition at line 852 of file AthenaEventLoopMgr.cxx.

853 {
854  IEvtSelectorSeek* is = dynamic_cast<IEvtSelectorSeek*> (m_evtSelector);
855  if (is == nullptr) {
856  ATH_MSG_ERROR ( "Seek failed; unsupported by event selector" );
857  return StatusCode::FAILURE;
858  }
859  //cppcheck-suppress nullPointerRedundantCheck
860  if (!m_evtSelCtxt) {
861  if (m_evtSelector->createContext(m_evtSelCtxt).isFailure()) {
862  ATH_MSG_FATAL ( "Can not create the event selector Context." );
863  return StatusCode::FAILURE;
864  }
865  }
866  //m_evtSelCtxt cannot be null if createContext succeeded
867  //cppcheck-suppress nullPointerRedundantCheck
868  StatusCode sc = is->seek (*m_evtSelCtxt, evt);
869  if (sc.isSuccess()) {
870  m_nevt = evt;
871  }
872  else {
873  ATH_MSG_ERROR ( "Seek failed." );
874  }
875  return sc;
876 }

◆ 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 319 of file AthenaEventLoopMgr.cxx.

319  {
320  const std::string& policyName = m_clearStorePolicy.value();
321 
322  if ( policyName != "BeginEvent" &&
323  policyName != "EndEvent" ) {
324 
325  ATH_MSG_FATAL ( "Unknown policy [" << policyName
326  << "] for the 'ClearStore-policy !"
327  << endmsg
328  << "Valid values are: BeginEvent, EndEvent"
329  );
330  throw GaudiException("Can not setup 'ClearStore'-policy",
331  name(),
332  StatusCode::FAILURE);
333  }
334 
335  return;
336 }

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

◆ 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 339 of file AthenaEventLoopMgr.cxx.

339  {
340 
341  m_toolInvoke.clear();
342  m_toolReject.clear();
343  m_toolAccept.clear();
344 
345  m_tools.retrieve().ignore();
346  if(m_tools.size() > 0) {
347  m_useTools=true;
348  m_toolInvoke.resize(m_tools.size());
349  m_toolReject.resize(m_tools.size());
350  m_toolAccept.resize(m_tools.size());
351 
352  tool_iterator firstTool = m_tools.begin();
353  tool_iterator lastTool = m_tools.end();
354  unsigned int toolCtr = 0;
355  for ( ; firstTool != lastTool; ++firstTool )
356  {
357  // reset statistics
358  m_toolInvoke[toolCtr] = 0;
359  m_toolReject[toolCtr] = 0;
360  m_toolAccept[toolCtr] = 0;
361  toolCtr++;
362  }
363  }
364 
365  return;
366 
367 }

◆ size()

int AthenaEventLoopMgr::size ( )
virtualinherited

Return the size of the collection.

Definition at line 890 of file AthenaEventLoopMgr.cxx.

891 {
892  IEvtSelectorSeek* cs = dynamic_cast<IEvtSelectorSeek*> (m_evtSelector);
893  if (cs == nullptr) {
894  ATH_MSG_ERROR ( "Collection size unsupported by event selector" );
895  return -1;
896  }
897  //cppcheck-suppress nullPointerRedundantCheck
898  if (!m_evtSelCtxt) {
899  if (m_evtSelector->createContext(m_evtSelCtxt).isFailure()) {
900  ATH_MSG_FATAL ( "Can not create the event selector Context." );
901  return -1;
902  }
903  }
904  //m_evtSelCtxt cannot be null if createContext succeeded
905  //cppcheck-suppress nullPointerRedundantCheck
906  return cs->size (*m_evtSelCtxt);
907 }

◆ writeHistograms()

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

Dump out histograms as needed.

Definition at line 428 of file AthenaEventLoopMgr.cxx.

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

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 156 of file AthenaEventLoopMgr.h.

◆ m_chronoStatSvc

ServiceHandle<IChronoStatSvc> AthenaEventLoopMgr::m_chronoStatSvc
privateinherited

Definition at line 218 of file AthenaEventLoopMgr.h.

◆ m_clearStorePolicy

StringProperty AthenaEventLoopMgr::m_clearStorePolicy
protectedinherited

Definition at line 139 of file AthenaEventLoopMgr.h.

◆ m_conditionsCleaner

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

Definition at line 219 of file AthenaEventLoopMgr.h.

◆ m_currentRun

number_type AthenaEventLoopMgr::m_currentRun
protectedinherited

current run number

Definition at line 106 of file AthenaEventLoopMgr.h.

◆ m_doChrono

bool AthenaEventLoopMgr::m_doChrono = false
privateinherited

Definition at line 217 of file AthenaEventLoopMgr.h.

◆ m_eventPrintoutInterval

UnsignedIntegerProperty AthenaEventLoopMgr::m_eventPrintoutInterval
protectedinherited

Definition at line 113 of file AthenaEventLoopMgr.h.

◆ m_eventStore

StoreGateSvc_t AthenaEventLoopMgr::m_eventStore
protectedinherited

Reference to StoreGateSvc;.

Property

Definition at line 77 of file AthenaEventLoopMgr.h.

◆ m_evtIdModSvc

IEvtIdModifierSvc_t AthenaEventLoopMgr::m_evtIdModSvc
protectedinherited

Definition at line 96 of file AthenaEventLoopMgr.h.

◆ m_evtsel

StringProperty AthenaEventLoopMgr::m_evtsel
protectedinherited

Definition at line 84 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 82 of file AthenaEventLoopMgr.h.

◆ m_evtSelector

IEvtSelector* AthenaEventLoopMgr::m_evtSelector
protectedinherited

Reference to the Event Selector.

Definition at line 80 of file AthenaEventLoopMgr.h.

◆ m_execAtPreFork

StringArrayProperty AthenaEventLoopMgr::m_execAtPreFork
protectedinherited

Definition at line 99 of file AthenaEventLoopMgr.h.

◆ m_failureMode

IntegerProperty AthenaEventLoopMgr::m_failureMode
protectedinherited

Definition at line 110 of file AthenaEventLoopMgr.h.

◆ m_firstRun

bool AthenaEventLoopMgr::m_firstRun
protectedinherited

Definition at line 107 of file AthenaEventLoopMgr.h.

◆ m_histoDataMgrSvc

IDataManagerSvc_t AthenaEventLoopMgr::m_histoDataMgrSvc
protectedinherited

Reference to the Histogram Data Service.

Definition at line 88 of file AthenaEventLoopMgr.h.

◆ m_histoPersSvc

IConversionSvc_t AthenaEventLoopMgr::m_histoPersSvc
protectedinherited

Definition at line 92 of file AthenaEventLoopMgr.h.

◆ m_histPersName

StringProperty AthenaEventLoopMgr::m_histPersName
protectedinherited

Definition at line 102 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 73 of file AthenaEventLoopMgr.h.

◆ m_intervalInSeconds

unsigned int AthenaEventLoopMgr::m_intervalInSeconds
privateinherited

Definition at line 210 of file AthenaEventLoopMgr.h.

◆ m_lastNev

unsigned int AthenaEventLoopMgr::m_lastNev {}
privateinherited

Definition at line 209 of file AthenaEventLoopMgr.h.

◆ m_lastTime

time_t AthenaEventLoopMgr::m_lastTime {}
privateinherited

Definition at line 211 of file AthenaEventLoopMgr.h.

◆ m_liteLoop

bool AthenaEventLoopMgr::m_liteLoop
privateinherited

Definition at line 213 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_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 205 of file AthenaEventLoopMgr.h.

◆ m_nevt

int AthenaEventLoopMgr::m_nevt {}
privateinherited

Definition at line 199 of file AthenaEventLoopMgr.h.

◆ m_nextPassFilterName

StringProperty MultipleEventLoopMgr::m_nextPassFilterName
private

the name of the INextPassFilter object queried at end of pass

Definition at line 79 of file MultipleEventLoopMgr.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_pAlgMgr

IAlgManager* MultipleEventLoopMgr::m_pAlgMgr
private

Definition at line 100 of file MultipleEventLoopMgr.h.

◆ m_passDone

unsigned int MultipleEventLoopMgr::m_passDone
private

number of passes already completed

Definition at line 102 of file MultipleEventLoopMgr.h.

◆ m_proc

unsigned int AthenaEventLoopMgr::m_proc
privateinherited

Definition at line 206 of file AthenaEventLoopMgr.h.

◆ m_pToolSvc

ServiceHandle<IToolSvc> MultipleEventLoopMgr::m_pToolSvc
private

handle to the ToolSvc

Definition at line 97 of file MultipleEventLoopMgr.h.

◆ m_requireInputAttributeList

bool AthenaEventLoopMgr::m_requireInputAttributeList {}
protectedinherited

require input attribute list

Definition at line 128 of file AthenaEventLoopMgr.h.

◆ m_toBeReInitializedNames

StringArrayProperty MultipleEventLoopMgr::m_toBeReInitializedNames
private

a list of services to be reinit at the end of the pass

Definition at line 82 of file MultipleEventLoopMgr.h.

◆ m_toolAccept

tool_stats AthenaEventLoopMgr::m_toolAccept
protectedinherited

tool returns StatusCode::SUCCESS counter

Definition at line 124 of file AthenaEventLoopMgr.h.

◆ m_toolInvoke

tool_stats AthenaEventLoopMgr::m_toolInvoke
protectedinherited

tool called counter

Definition at line 122 of file AthenaEventLoopMgr.h.

◆ m_toolReject

tool_stats AthenaEventLoopMgr::m_toolReject
protectedinherited

tool returns StatusCode::FAILURE counter

Definition at line 123 of file AthenaEventLoopMgr.h.

◆ m_tools

tool_store AthenaEventLoopMgr::m_tools
protectedinherited

internal tool store

Definition at line 125 of file AthenaEventLoopMgr.h.

◆ m_useSecondaryEventNumber

bool AthenaEventLoopMgr::m_useSecondaryEventNumber {}
protectedinherited

read event number from secondary input

Definition at line 131 of file AthenaEventLoopMgr.h.

◆ m_useTools

bool AthenaEventLoopMgr::m_useTools
privateinherited

Definition at line 207 of file AthenaEventLoopMgr.h.

◆ m_writeHists

bool AthenaEventLoopMgr::m_writeHists {}
privateinherited

Definition at line 202 of file AthenaEventLoopMgr.h.

◆ m_writeInterval

IntegerProperty AthenaEventLoopMgr::m_writeInterval
privateinherited

Definition at line 201 of file AthenaEventLoopMgr.h.


The documentation for this class was generated from the following files:
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:211
AthenaEventLoopMgr::m_evtIdModSvc
IEvtIdModifierSvc_t m_evtIdModSvc
Definition: AthenaEventLoopMgr.h:96
ClearStorePolicy::EndEvent
@ EndEvent
Definition: ClearStorePolicy.h:15
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
AthenaEventLoopMgr::m_toolAccept
tool_stats m_toolAccept
tool returns StatusCode::SUCCESS counter
Definition: AthenaEventLoopMgr.h:124
INextPassFilter
interface to a tool (typically) that decides whether the event loop mgr (typically) need to do anothe...
Definition: INextPassFilter.h:15
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:125
SGout2dot.alg
alg
Definition: SGout2dot.py:243
LArConditions2Ntuple.objects
objects
Definition: LArConditions2Ntuple.py:58
AthenaEventLoopMgr::m_evtSelCtxt
IEvtSelector::Context * m_evtSelCtxt
Gaudi EventSelector Context (may be used as a cursor by the evt selector)
Definition: AthenaEventLoopMgr.h:82
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
calibdata.force
bool force
Definition: calibdata.py:19
MultipleEventLoopMgr::m_pToolSvc
ServiceHandle< IToolSvc > m_pToolSvc
handle to the ToolSvc
Definition: MultipleEventLoopMgr.h:97
AthenaEventLoopMgr::eventStore
StoreGateSvc * eventStore() const
Definition: AthenaEventLoopMgr.cxx:1010
AthenaEventLoopMgr::name
virtual const std::string & name() const
Definition: AthenaEventLoopMgr.h:188
initialize
void initialize()
Definition: run_EoverP.cxx:894
AthenaEventLoopMgr::m_conditionsCleaner
ServiceHandle< Athena::IConditionsCleanerSvc > m_conditionsCleaner
Definition: AthenaEventLoopMgr.h:219
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
AthenaEventLoopMgr::m_histPersName
StringProperty m_histPersName
Definition: AthenaEventLoopMgr.h:102
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
MultipleEventLoopMgr::algMgr
IAlgManager * algMgr()
Definition: MultipleEventLoopMgr.cxx:39
AthenaEventLoopMgr::m_proc
unsigned int m_proc
Definition: AthenaEventLoopMgr.h:206
clearStorePolicy
ClearStorePolicy::Type clearStorePolicy(const std::string &policyName, MsgStream &msg)
returns the enum-version of the policy (by name)
Definition: ClearStorePolicy.cxx:7
MultipleEventLoopMgr::m_nextPassFilterName
StringProperty m_nextPassFilterName
the name of the INextPassFilter object queried at end of pass
Definition: MultipleEventLoopMgr.h:79
AthenaEventLoopMgr::m_evtSelector
IEvtSelector * m_evtSelector
Reference to the Event Selector.
Definition: AthenaEventLoopMgr.h:80
AthenaEventLoopMgr::m_failureMode
IntegerProperty m_failureMode
Definition: AthenaEventLoopMgr.h:110
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
MultipleEventLoopMgr::reInitList
StatusCode reInitList()
called at each end of pass.
Definition: MultipleEventLoopMgr.cxx:82
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
AthenaEventLoopMgr::m_incidentSvc
IIncidentSvc_t m_incidentSvc
Reference to the incident service.
Definition: AthenaEventLoopMgr.h:73
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
AthenaEventLoopMgr::m_eventStore
StoreGateSvc_t m_eventStore
Reference to StoreGateSvc;.
Definition: AthenaEventLoopMgr.h:77
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:201
AthenaEventLoopMgr::m_currentRun
number_type m_currentRun
current run number
Definition: AthenaEventLoopMgr.h:106
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:205
python.HLT.Jet.JetMenuSequencesConfig.selName
def selName(recoSequenceName, hypoType=JetHypoAlgType.STANDARD)
Definition: JetMenuSequencesConfig.py:136
AthenaEventLoopMgr::modifyEventContext
virtual void modifyEventContext(EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
Definition: AthenaEventLoopMgr.cxx:1170
AthenaEventLoopMgr::installEventContext
StatusCode installEventContext(EventContext &ctx)
Definition: AthenaEventLoopMgr.cxx:1018
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
MultipleEventLoopMgr::nextPassFilter
INextPassFilter * nextPassFilter()
Locate filter.
Definition: MultipleEventLoopMgr.cxx:50
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:716
AthenaEventLoopMgr::initializeAlgorithms
StatusCode initializeAlgorithms()
Initialize all algorithms and output streams.
Definition: AthenaEventLoopMgr.cxx:484
AthenaEventLoopMgr::IConversionSvc_t
ServiceHandle< IConversionSvc > IConversionSvc_t
Definition: AthenaEventLoopMgr.h:90
MultipleEventLoopMgr::m_pAlgMgr
IAlgManager * m_pAlgMgr
Definition: MultipleEventLoopMgr.h:100
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::execAtPreFork
StatusCode execAtPreFork(const EventContext &ctx) const
Execute certain algorithms/sequences in PreFork.
Definition: AthenaEventLoopMgr.cxx:993
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:128
lumiFormat.i
int i
Definition: lumiFormat.py:85
AthenaEventLoopMgr::m_histoPersSvc
IConversionSvc_t m_histoPersSvc
Definition: AthenaEventLoopMgr.h:92
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:156
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:224
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:207
AthenaEventLoopMgr::m_lastNev
unsigned int m_lastNev
Definition: AthenaEventLoopMgr.h:209
AthenaEventLoopMgr::seek
virtual StatusCode seek(int evt)
Seek to a given event.
Definition: AthenaEventLoopMgr.cxx:852
MuonSegmentReaderConfig.histSvc
histSvc
Definition: MuonSegmentReaderConfig.py:96
AthenaEventLoopMgr::m_execAtPreFork
StringArrayProperty m_execAtPreFork
Definition: AthenaEventLoopMgr.h:99
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
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
AthenaEventLoopMgr::m_eventPrintoutInterval
UnsignedIntegerProperty m_eventPrintoutInterval
Definition: AthenaEventLoopMgr.h:113
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:450
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
Athena::Timeout::instance
static Timeout & instance()
Get reference to Timeout singleton.
Definition: Timeout.h:64
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:122
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:123
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthenaEventLoopMgr::m_clearStorePolicy
StringProperty m_clearStorePolicy
Definition: AthenaEventLoopMgr.h:139
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:43
AthenaEventLoopMgr::m_liteLoop
bool m_liteLoop
Definition: AthenaEventLoopMgr.h:213
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:131
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
AthenaEventLoopMgr::setClearStorePolicy
void setClearStorePolicy(Gaudi::Details::PropertyBase &clearStorePolicy)
property update handler:set the clear-store policy value and check its value.
Definition: AthenaEventLoopMgr.cxx:319
MultipleEventLoopMgr::m_toBeReInitializedNames
StringArrayProperty m_toBeReInitializedNames
a list of services to be reinit at the end of the pass
Definition: MultipleEventLoopMgr.h:82
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
AthenaEventLoopMgr::m_intervalInSeconds
unsigned int m_intervalInSeconds
Definition: AthenaEventLoopMgr.h:210
AthenaEventLoopMgr::m_firstRun
bool m_firstRun
Definition: AthenaEventLoopMgr.h:107
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
AthenaEventLoopMgr::m_writeHists
bool m_writeHists
Definition: AthenaEventLoopMgr.h:202
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
AthenaEventLoopMgr::m_evtsel
StringProperty m_evtsel
Definition: AthenaEventLoopMgr.h:84
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:428
AthenaEventLoopMgr::tool_iterator
tool_store::const_iterator tool_iterator
Definition: AthenaEventLoopMgr.h:118
AthenaEventLoopMgr::AthenaEventLoopMgr
AthenaEventLoopMgr()
no implementation
AthenaEventLoopMgr::m_nevt
int m_nevt
Definition: AthenaEventLoopMgr.h:199
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
MultipleEventLoopMgr::m_passDone
unsigned int m_passDone
number of passes already completed
Definition: MultipleEventLoopMgr.h:102
python.PyAthena.obj
obj
Definition: PyAthena.py:132
eventTypeFromxAOD
EventType eventTypeFromxAOD(const xAOD::EventInfo *xaod)
Create EventType object from xAOD::EventInfo.
Definition: EventInfoFromxAOD.cxx:34
PrepareReferenceFile.outfile
outfile
Definition: PrepareReferenceFile.py:42
AthenaEventLoopMgr::executeAlgorithms
virtual StatusCode executeAlgorithms(const EventContext &)
Run the algorithms for the current event.
Definition: AthenaEventLoopMgr.cxx:519
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:88
IEvtSelectorSeek
Abstract interface for seeking for an event selector.
Definition: IEvtSelectorSeek.h:28
MultipleEventLoopMgr::doNextPass
bool doNextPass()
called at end of pass. Calls nextPassFilter
Definition: MultipleEventLoopMgr.cxx:75
EventInfoCnvParams::eventIndex
thread_local event_number_t eventIndex
Definition: IEvtIdModifierSvc.h:34