The Gaudi Framework  v36r1 (3e2fb5a8)
ApplicationMgr Class Reference

#include </builds/gaudi/Gaudi/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.h>

Inheritance diagram for ApplicationMgr:
Collaboration diagram for ApplicationMgr:

Public Member Functions

 ApplicationMgr (IInterface *=nullptr)
 
StatusCode queryInterface (const InterfaceID &iid, void **pinterface) override
 
StatusCode run () override
 
StatusCode configure () override
 
StatusCode terminate () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode nextEvent (int maxevt) override
 
const std::stringname () const override
 
EventContext createEventContext () override
 implementation of IEventProcessor::createEventContext() More...
 
StatusCode executeEvent (EventContext &&ctx) override
 implementation of IEventProcessor::executeEvent(void*) More...
 
StatusCode executeRun (int evtmax) override
 implementation of IEventProcessor::executeRun(int) More...
 
StatusCode stopRun () override
 implementation of IEventProcessor::stopRun() More...
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 
StatusCode sysStart () override
 
StatusCode sysStop () override
 
StatusCode sysFinalize () override
 
StatusCode sysReinitialize () override
 
StatusCode sysRestart () override
 
void push (EventContext &&ctx) override
 
bool empty () const override
 
std::optional< Gaudi::Interfaces::IQueueingEventProcessor::ResultTypepop () override
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

Gaudi::Details::PropertyBase handlers

typedef std::map< unsigned long, SmartIF< IComponentManager > > ManagersMap
 Typedef for the map of component managers, the key is the "id" field of the basic InterfaceID of the managed components. More...
 
ManagersMap m_managers
 Map of known component managers. More...
 
Gaudi::Property< std::vector< std::string > > m_declaredManagers
 Property to declare the list of known managers. More...
 
SmartIF< ISvcManagerm_svcManager
 Cached pointer to the manager of services. More...
 
SmartIF< IAlgManagerm_algManager
 Cached pointer to the manager of algorithms. More...
 
SmartIF< ISvcLocatorm_svcLocator
 Reference to its own service locator (must be instantiated prior to any service!) More...
 
SmartIF< DLLClassManagerm_classManager
 Reference to the class manager. More...
 
Gaudi::Property< int > m_SIGo
 
Gaudi::Property< int > m_SIExit
 
Gaudi::Property< std::vector< std::string > > m_topAlgNameList
 
Gaudi::Property< std::vector< std::string > > m_outStreamNameList
 
Gaudi::Property< std::stringm_outStreamType
 
Gaudi::Property< std::stringm_messageSvcType
 
Gaudi::Property< std::stringm_jobOptionsSvcType
 
std::string m_name = "ApplicationMgr"
 Name. More...
 
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Internal State. More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Internal State. More...
 
Gaudi::Property< std::vector< std::string > > m_svcMapping {this, "SvcMapping", {}, "Default mapping of services"}
 
Gaudi::Property< std::vector< std::string > > m_svcOptMapping
 
SmartIF< IMessageSvcm_messageSvc
 Reference to the message service. More...
 
SmartIF< IRunablem_runable
 Reference to the runable object. More...
 
SmartIF< IEventProcessorm_processingMgr
 Reference to processing manager object. More...
 
SmartIF< IQueueingEventProcessor > m_queueingProcessor
 Reference to a queueing processing manager object. More...
 
Gaudi::Monitoring::Hub m_monitoringHub
 
Gaudi::Property< int > m_evtMax {this, "EvtMax", -1, "Number of events to be processed (-1 means all events)"}
 
Gaudi::Property< std::vector< std::string > > m_extSvcNameList
 
Gaudi::Property< bool > m_extSvcCreates
 
Gaudi::Property< std::vector< std::string > > m_dllNameList {this, "Dlls", {}, "List of DDL's names"}
 
Gaudi::Property< std::stringm_jobOptionsType {this, "JobOptionsType", "FILE", "Source type (e.g. dbase, file...)"}
 
Gaudi::Property< std::stringm_jobOptionsPath {this, "JobOptionsPath", {}, "The \"file\" to look for properties"}
 
Gaudi::Property< std::stringm_jobOptionsPreAction
 
Gaudi::Property< std::stringm_jobOptionsPostAction
 
Gaudi::Property< std::stringm_runableType {this, "Runable", "AppMgrRunable", "Runable type"}
 
Gaudi::Property< std::stringm_eventLoopMgr {this, "EventLoop", "EventLoopMgr", "Processing manager type"}
 
Gaudi::Property< std::stringm_evtsel {this, "EvtSel", {}, "Event selection"}
 
Gaudi::Property< std::stringm_histPersName {this, "HistogramPersistency", "NONE", "Name of the Hist Pers Svc"}
 
Gaudi::Property< int > m_outputLevel {this, "OutputLevel", MSG::INFO, "Message output level"}
 
Gaudi::Property< std::stringm_appName {this, "AppName", "ApplicationMgr", "The name of the application"}
 
Gaudi::Property< std::stringm_appVersion {this, "AppVersion", {}, "The version of the application"}
 
Gaudi::Property< bool > m_actHistory {this, "ActivateHistory", false, "Activate HistorySvc"}
 
Gaudi::Property< bool > m_codeCheck {this, "StatusCodeCheck", false, "[[deprecated]] will be removed"}
 
Gaudi::Property< int > m_pluginDebugLevel
 
Gaudi::Property< std::vector< std::string > > m_createSvcNameList
 
Gaudi::Property< bool > m_auditTools {this, "AuditTools", false}
 Defaults for auditors. More...
 
Gaudi::Property< bool > m_auditSvcs {this, "AuditServices", false}
 
Gaudi::Property< bool > m_auditAlgs {this, "AuditAlgorithms", false}
 
Gaudi::Property< std::map< std::string, std::string > > m_environment
 
Gaudi::Property< bool > m_loopCheck
 
Gaudi::Property< bool > m_stopOnSignal
 Property to enable/disable the "stop on signal" service. More...
 
Gaudi::Property< bool > m_stalledEventMonitoring
 Property to enable/disable the monitoring and reporting of stalled events. More...
 
Gaudi::Property< bool > m_propertiesPrint
 
Gaudi::Property< int > m_returnCode
 Property to record the error conditions occurring during the running. More...
 
Gaudi::Property< bool > m_printAlgsSequence
 
bool m_useHiveAlgorithmManager
 
std::vector< std::stringm_okDlls
 names of successfully loaded dlls More...
 
void evtLoopPropertyHandler (Gaudi::Details::PropertyBase &theProp)
 
StatusCode decodeExtSvcNameList ()
 
StatusCode decodeCreateSvcNameList ()
 
void createSvcNameListHandler (Gaudi::Details::PropertyBase &)
 
void extSvcNameListHandler (Gaudi::Details::PropertyBase &theProp)
 
StatusCode decodeDllNameList ()
 
void dllNameListHandler (Gaudi::Details::PropertyBase &theProp)
 
void pluginDebugPropertyHandler (Gaudi::Details::PropertyBase &theProp)
 
template<class I >
SmartIF< IComponentManager > & getManager ()
 
SmartIF< ISvcManager > & svcManager ()
 
SmartIF< IAlgManager > & algManager ()
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Needed to locate the message service. More...
 
void outputLevelUpdate () override
 Function to call to update the outputLevel of the components (after a change in MessageSvc). More...
 
Gaudi::Monitoring::HubmonitoringHub () override
 
void printAlgsSequences ()
 Print the sequence of algorithms that have been loaded. More...
 
void setServiceManager (ISvcManager *) override
 
StatusCode i_startup ()
 Internal startup routine. More...
 
StatusCode GoToState (Gaudi::StateMachine::State state, bool ignoreFailures=false)
 Reach a state from current state (whichever it is) going through the correct transitions. More...
 
template<typename SELF , typename PIMPL , typename METHOD , typename... ARGS>
static auto i_delegateToEvtProc (SELF *self, PIMPL &member, std::string_view method_name, METHOD &&method, ARGS &&... args)
 Helper to delegate calls to event processor implementation. More...
 

Additional Inherited Members

- Public Types inherited from PropertyHolder< CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > >
using base_class = CommonMessaging
 
- Protected Member Functions inherited from CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Detailed Description

The Application Manager class. The main purpose of the Application Manager is to steer any data processing application. This includes all data processing applications for LHCb data in all stages: simulation, reconstruction, analysis, high level triggers, etc. Specific implementations of the ApplicationMgr will be developed to cope with the different environments (on-line, off-line, interactive, batch, etc.).

Author
Pere Mato

Definition at line 55 of file ApplicationMgr.h.

Member Typedef Documentation

◆ ManagersMap

typedef std::map<unsigned long, SmartIF<IComponentManager> > ApplicationMgr::ManagersMap
protected

Typedef for the map of component managers, the key is the "id" field of the basic InterfaceID of the managed components.

Definition at line 174 of file ApplicationMgr.h.

Constructor & Destructor Documentation

◆ ApplicationMgr()

ApplicationMgr::ApplicationMgr ( IInterface = nullptr)

Definition at line 58 of file ApplicationMgr.cpp.

58  {
59  // IInterface initialization
60  addRef(); // Initial count set to 1
61 
62  // Instantiate component managers
63  m_managers[IService::interfaceID().id()] = new ServiceManager( this );
64 
66 
67  // Instantiate internal services
68  // SvcLocator/Factory HAS to be already instantiated
69  m_classManager = new DLLClassManager( this );
70 
71  AlgorithmManager* algMgr = new AlgorithmManager( this );
72  m_managers[IAlgorithm::interfaceID().id()] = algMgr;
73  // m_managers[IAlgorithm::interfaceID().id()] = new HiveAlgorithmManager(this);
74 
75  // This property is not hosted in the ApplicationMgr instance
76  declareProperty( "AlgTypeAliases", algMgr->typeAliases(),
77  "Aliases of algorithm types, to replace an algorithm type for every instance" );
78 
79  // ServiceMgr Initialization loop checking
80  svcManager()->setLoopCheckEnabled( m_loopCheck );
81 
82  m_svcMapping = {"EvtDataSvc/EventDataSvc",
83  "DetDataSvc/DetectorDataSvc",
84  "HistogramSvc/HistogramDataSvc",
85  "HbookCnv::PersSvc/HbookHistSvc",
86  "RootHistCnv::PersSvc/RootHistSvc",
87  "EvtPersistencySvc/EventPersistencySvc",
88  "DetPersistencySvc/DetectorPersistencySvc",
89  "HistogramPersistencySvc/HistogramPersistencySvc"};
90 }

Member Function Documentation

◆ algManager()

SmartIF<IAlgManager>& ApplicationMgr::algManager ( )
inline

Definition at line 142 of file ApplicationMgr.h.

142  {
143  // Cache the casted pointer to IAlgManager
144  if ( !m_algManager ) { m_algManager = getManager<IAlgorithm>(); }
145  return m_algManager;
146  }

◆ configure()

StatusCode ApplicationMgr::configure ( )
override

Definition at line 230 of file ApplicationMgr.cpp.

230  {
231 
232  // Check if the state is compatible with the transition
233  MsgStream tlog( m_messageSvc, name() );
235  tlog << MSG::INFO << "Already Configured" << endmsg;
236  return StatusCode::SUCCESS;
237  }
239  tlog << MSG::FATAL << "configure: Invalid state \"" << m_state << "\"" << endmsg;
240  return StatusCode::FAILURE;
241  }
243 
244  // Reset application return code.
246 
247  StatusCode sc;
248  sc = i_startup();
249  if ( !sc.isSuccess() ) { return sc; }
250 
251  {
253  // Get my own options using the Job options service
254  if ( log.level() <= MSG::DEBUG ) log << MSG::DEBUG << "Getting my own properties" << endmsg;
255  bindPropertiesTo( serviceLocator()->getOptsSvc() );
256  }
257 
258  // Make sure that the OutputLevel is in sync
259  if ( m_outputLevel != MSG::NIL && m_messageSvc ) m_messageSvc->setOutputLevel( name(), m_outputLevel );
261 
262  // Check current outputLevel to eventually inform the MessageSvc
263  if ( m_outputLevel != MSG::NIL && !m_appName.empty() ) {
264  // Print a welcome message
266  << "=================================================================="
267  << "==================================================================" << std::endl
268  << " "
269  << " Welcome to " << m_appName.value();
270 
271  if ( !m_appVersion.empty() ) {
272  log << MSG::ALWAYS << " version " << m_appVersion.value();
273  } else {
274  log << MSG::ALWAYS << " (GaudiCoreSvc "
275  << "v" << GAUDI_MAJOR_VERSION << "r" << GAUDI_MINOR_VERSION
276 #if GAUDI_PATCH_VERSION
277  << "p" << GAUDI_PATCH_VERSION
278 #endif
279  << ")";
280  }
281 
282  // Add the host name and current time to the message
284  << " "
285  << " running on " << System::hostName() << " on " << Gaudi::Time::current().format( true ) << std::endl
286  << "=================================================================="
287  << "==================================================================" << endmsg;
288  }
289 
290  // print all own properties if the options "PropertiesPrint" is set to true
291  if ( m_propertiesPrint ) {
292  const auto& properties = getProperties();
293  log << MSG::ALWAYS << "List of ALL properties of " << System::typeinfoName( typeid( *this ) ) << "/" << this->name()
294  << " #properties = " << properties.size() << endmsg;
295  for ( const auto& property : properties ) { log << "Property ['Name': Value] = " << *property << endmsg; }
296  }
297 
298  // set the requested environment variables
299  for ( auto& var : m_environment ) {
300  const std::string& name = var.first;
301  const std::string& value = var.second;
303  const MSG::Level lvl = ( !old.empty() && ( old != "UNKNOWN" ) ) ? MSG::WARNING : MSG::DEBUG;
304  if ( UNLIKELY( m_outputLevel <= lvl ) ) log << lvl << "Setting " << name << " = " << value << endmsg;
305  System::setEnv( name, value );
306  }
307 
308  // Declare Service Types
309  for ( auto& j : m_svcMapping ) {
311  if ( svcManager()->declareSvcType( itm.name(), itm.type() ).isFailure() ) {
312  log << MSG::ERROR << "configure: declaring svc type:'" << j << "' failed." << endmsg;
313  return StatusCode::FAILURE;
314  } else {
315  ON_VERBOSE
316  log << MSG::VERBOSE << "declared service " << j << endmsg;
317  }
318  }
319  for ( auto& j : m_svcOptMapping ) {
321  if ( svcManager()->declareSvcType( itm.name(), itm.type() ).isFailure() ) {
322  log << MSG::ERROR << "declaring svc type:'" << j << "' failed." << endmsg;
323  return StatusCode::FAILURE;
324  }
325  }
326 
327  //--------------------------------------------------------------------------
328  // Declare other Services and Algorithms by loading DLL's
329  sc = decodeDllNameList();
330  if ( sc.isFailure() ) {
331  log << MSG::ERROR << "Failure loading declared DLL's" << endmsg;
332  return sc;
333  }
334 
335  //--------------------------------------------------------------------------
336  // Deal with the services explicitly declared by the user.
337  sc = decodeExtSvcNameList();
338  if ( sc.isFailure() ) {
339  log << MSG::ERROR << "Failure during external service association" << endmsg;
340  return sc;
341  }
342 
344  if ( sc.isFailure() ) {
345  log << MSG::ERROR << "Failure during external service creation" << endmsg;
346  return sc;
347  }
348 
349  //--------------------------------------------------------------------------
350  // Retrieve intrinsic services. If needed configure them.
351  //--------------------------------------------------------------------------
352  const Gaudi::Utils::TypeNameString evtloop_item( m_eventLoopMgr );
353  sc = svcManager()->addService( evtloop_item, ServiceManager::DEFAULT_SVC_PRIORITY * 10 );
354  if ( !sc.isSuccess() ) {
355  log << MSG::FATAL << "Error adding :" << m_eventLoopMgr << endmsg;
356  return sc;
357  } else {
358  ON_VERBOSE
359  log << MSG::VERBOSE << "added service " << evtloop_item << endmsg;
360  }
361 
362  m_runable = m_svcLocator->service( m_runableType );
363  if ( !m_runable ) {
364  log << MSG::FATAL << "Error retrieving Runable: " << m_runableType.value() << "\n Check option ApplicationMgr."
365  << m_runableType.name() << endmsg;
366  return sc;
367  }
368  m_processingMgr = m_svcLocator->service( evtloop_item );
369  if ( !m_processingMgr ) {
370  log << MSG::FATAL << "Error retrieving Processing manager: " << m_eventLoopMgr.value()
371  << "\n Check option ApplicationMgr." << m_eventLoopMgr.name() << "\n No events will be processed." << endmsg;
372  return sc;
373  }
374  // The IEventProcessor might also be an IQueueingEventProcessor
376 
377  // Establish Update Handlers for ExtSvc and DLLs Properties
381 
382  if ( m_actHistory ) {
383  // Create HistorySvc with a priority to ensure it's initialized last, finalized first
384  sc = svcManager()->addService( "HistorySvc", std::numeric_limits<int>::max() );
385  if ( sc.isFailure() ) {
386  log << MSG::FATAL << "Error adding HistorySvc" << endmsg;
387  return StatusCode::FAILURE;
388  }
389  }
390 
391  log << MSG::INFO << "Application Manager Configured successfully" << endmsg;
393  return StatusCode::SUCCESS;
394 }

◆ createEventContext()

EventContext ApplicationMgr::createEventContext ( )
override

implementation of IEventProcessor::createEventContext()

Definition at line 780 of file ApplicationMgr.cpp.

780  {
782  if ( m_processingMgr ) { return m_processingMgr->createEventContext(); }
783  }
785  ss << "createEventContext: Invalid state \"" << FSMState() << '"';
786  throw GaudiException( ss.str(), name(), StatusCode::FAILURE );
787 }

◆ createSvcNameListHandler()

void ApplicationMgr::createSvcNameListHandler ( Gaudi::Details::PropertyBase )

Definition at line 886 of file ApplicationMgr.cpp.

886  {
887  if ( !( decodeCreateSvcNameList() ).isSuccess() ) {
888  throw GaudiException( "Failed to create ext services", "MinimalEventLoopMgr::createSvcNameListHandler",
890  }
891 }

◆ decodeCreateSvcNameList()

StatusCode ApplicationMgr::decodeCreateSvcNameList ( )

Definition at line 895 of file ApplicationMgr.cpp.

895  {
897  const auto& theNames = m_createSvcNameList.value();
898  auto it = theNames.begin();
899  auto et = theNames.end();
900  while ( result.isSuccess() && it != et ) {
901  Gaudi::Utils::TypeNameString item( *it++ );
902  if ( ( result = svcManager()->addService( item, ServiceManager::DEFAULT_SVC_PRIORITY ) ).isFailure() ) {
904  log << MSG::ERROR << "decodeCreateSvcNameList: Cannot create service " << item.type() << "/" << item.name()
905  << endmsg;
906  } else {
907  ON_DEBUG {
909  log << MSG::DEBUG << "decodeCreateSvcNameList: Created service " << item.type() << "/" << item.name() << endmsg;
910  }
911  }
912  }
913  return result;
914 }

◆ decodeDllNameList()

StatusCode ApplicationMgr::decodeDllNameList ( )

Definition at line 967 of file ApplicationMgr.cpp.

967  {
968 
971 
972  // Clean up multiple entries from DLL list
973  // -------------------------------------------------------------------------
974  std::vector<std::string> newList;
975  std::map<std::string, unsigned int> dllInList, duplicateList;
976  {
977  for ( const auto& it : m_dllNameList ) {
978  if ( 0 == dllInList[it] ) {
979  newList.push_back( it ); // first instance of this module
980  } else {
981  ++duplicateList[it];
982  } // module listed multiple times
983  ++dllInList[it]; // increment count for this module
984  }
985  }
986  // m_dllNameList = newList; // update primary list to new, filtered list (do not use the
987  // property itself otherwise we get called again infinitely)
988  // List modules that were in there twice..
989  ON_DEBUG if ( !duplicateList.empty() ) {
990  log << MSG::DEBUG << "Removed duplicate entries for modules : ";
991  for ( auto it = duplicateList.begin(); it != duplicateList.end(); ++it ) {
992  log << it->first << "(" << 1 + it->second << ")";
993  if ( it != --duplicateList.end() ) log << ", ";
994  }
995  log << endmsg;
996  }
997  // -------------------------------------------------------------------------
998 
999  const std::vector<std::string>& theNames = newList;
1000 
1001  // only load the new dlls or previously failed dlls
1002  ON_DEBUG log << MSG::DEBUG << "Loading declared DLL's" << endmsg;
1003 
1004  std::vector<std::string> successNames, failNames;
1005  for ( const auto& it : theNames ) {
1006  if ( std::find( m_okDlls.rbegin(), m_okDlls.rend(), it ) == m_okDlls.rend() ) {
1007  // found a new module name
1008  StatusCode status = m_classManager->loadModule( it );
1009  if ( status.isFailure() ) {
1010  failNames.push_back( it );
1011  result = StatusCode::FAILURE;
1012  } else {
1013  successNames.push_back( it );
1014  }
1015  }
1016  }
1017 
1018  // report back to the user and store the names of the succesfully loaded dlls
1019  if ( !successNames.empty() ) {
1020  log << MSG::INFO << "Successfully loaded modules : ";
1021  for ( auto it = successNames.begin(); it != successNames.end(); it++ ) {
1022  log << ( *it );
1023  if ( ( it + 1 ) != successNames.end() ) log << ", ";
1024  // save name
1025  m_okDlls.push_back( *it );
1026  }
1027  log << endmsg;
1028  }
1029 
1030  if ( result == StatusCode::FAILURE ) {
1031  log << MSG::WARNING << "Failed to load modules: ";
1032  for ( auto it = failNames.begin(); it != failNames.end(); it++ ) {
1033  log << ( *it );
1034  if ( ( it + 1 ) != failNames.end() ) log << ", ";
1035  }
1036  log << endmsg;
1037  }
1038  return result;
1039 }

◆ decodeExtSvcNameList()

StatusCode ApplicationMgr::decodeExtSvcNameList ( )

Definition at line 929 of file ApplicationMgr.cpp.

929  {
931 
932  const auto& theNames = m_extSvcNameList.value();
933 
934  auto it = theNames.begin();
935  auto et = theNames.end();
936  while ( result.isSuccess() && it != et ) {
937  Gaudi::Utils::TypeNameString item( *it++ );
938  if ( m_extSvcCreates ) {
939  if ( ( result = svcManager()->addService( item, ServiceManager::DEFAULT_SVC_PRIORITY ) ).isFailure() ) {
941  log << MSG::ERROR << "decodeExtSvcNameList: Cannot create service " << item.type() << "/" << item.name()
942  << endmsg;
943  }
944  } else {
945  if ( ( result = svcManager()->declareSvcType( item.name(), item.type() ) ).isFailure() ) {
947  log << MSG::ERROR << "decodeExtSvcNameList: Cannot declare service " << item.type() << "/" << item.name()
948  << endmsg;
949  }
950  }
951  }
952  return result;
953 }

◆ dllNameListHandler()

void ApplicationMgr::dllNameListHandler ( Gaudi::Details::PropertyBase theProp)

Definition at line 958 of file ApplicationMgr.cpp.

958  {
959  if ( !( decodeDllNameList() ).isSuccess() ) {
960  throw GaudiException( "Failed to load DLLs.", "MinimalEventLoopMgr::dllNameListHandler", StatusCode::FAILURE );
961  }
962 }

◆ empty()

bool ApplicationMgr::empty ( ) const
override

Definition at line 772 of file ApplicationMgr.cpp.

◆ evtLoopPropertyHandler()

void ApplicationMgr::evtLoopPropertyHandler ( Gaudi::Details::PropertyBase theProp)

Definition at line 876 of file ApplicationMgr.cpp.

876  {
877  if ( m_processingMgr ) {
878  auto props = m_processingMgr.as<IProperty>();
879  if ( props ) props->setProperty( p ).ignore();
880  }
881 }

◆ executeEvent()

StatusCode ApplicationMgr::executeEvent ( EventContext &&  ctx)
override

implementation of IEventProcessor::executeEvent(void*)

Definition at line 758 of file ApplicationMgr.cpp.

758  {
760  if ( m_processingMgr ) { return m_processingMgr->executeEvent( std::move( ctx ) ); }
761  }
763  log << MSG::FATAL << "executeEvent: Invalid state \"" << FSMState() << "\"" << endmsg;
764  return StatusCode::FAILURE;
765 }

◆ executeRun()

StatusCode ApplicationMgr::executeRun ( int  evtmax)
override

implementation of IEventProcessor::executeRun(int)

Definition at line 791 of file ApplicationMgr.cpp.

791  {
794  if ( m_processingMgr ) { return m_processingMgr->executeRun( evtmax ); }
795  log << MSG::WARNING << "No EventLoop Manager specified " << endmsg;
796  return StatusCode::SUCCESS;
797  }
798  log << MSG::FATAL << "executeRun: Invalid state \"" << FSMState() << "\"" << endmsg;
799  return StatusCode::FAILURE;
800 }

◆ extSvcNameListHandler()

void ApplicationMgr::extSvcNameListHandler ( Gaudi::Details::PropertyBase theProp)

Definition at line 919 of file ApplicationMgr.cpp.

919  {
920  if ( !( decodeExtSvcNameList() ).isSuccess() ) {
921  throw GaudiException( "Failed to declare ext services", "MinimalEventLoopMgr::extSvcNameListHandler",
923  }
924 }

◆ finalize()

StatusCode ApplicationMgr::finalize ( )
override

Definition at line 546 of file ApplicationMgr.cpp.

546  {
549  log << MSG::INFO << "Already Finalized" << endmsg;
550  return StatusCode::SUCCESS;
551  }
553  log << MSG::FATAL << "finalize: Invalid state \"" << m_state << "\"" << endmsg;
554  return StatusCode::FAILURE;
555  }
557 
558  // disable message suppression in finalize
559  m_svcLocator->service<IProperty>( "MessageSvc" )
560  ->setProperty( Gaudi::Property<bool>( "enableSuppression", false ) )
561  .ignore();
562 
563  // Finalize independently managed Algorithms
564  StatusCode sc = algManager()->finalize();
565  if ( sc.isFailure() ) {
566  log << MSG::WARNING << "Failed to finalize an algorithm." << endmsg;
568  }
569 
570  // Finalize all Services
571  sc = svcManager()->finalize();
572  if ( sc.isFailure() ) {
573  log << MSG::WARNING << "Failed to finalize a service." << endmsg;
575  }
576 
577  // svcManager()->removeService( (IService*) m_processingMgr.get() );
578  // svcManager()->removeService( (IService*) m_runable.get() );
579 
580  if ( sc.isSuccess() ) {
581  log << MSG::INFO << "Application Manager Finalized successfully" << endmsg;
582  } else {
583  log << MSG::ERROR << "Application Manager failed to finalize" << endmsg;
584  }
585 
587  return sc;
588 }

◆ FSMState()

Gaudi::StateMachine::State ApplicationMgr::FSMState ( ) const
override

Definition at line 819 of file ApplicationMgr.cpp.

819 { return m_state; }

◆ getManager()

template<class I >
SmartIF<IComponentManager>& ApplicationMgr::getManager ( )
inline

Definition at line 132 of file ApplicationMgr.h.

132  {
133  return m_managers[I::interfaceID().id()];
134  }

◆ GoToState()

StatusCode ApplicationMgr::GoToState ( Gaudi::StateMachine::State  state,
bool  ignoreFailures = false 
)
protected

Reach a state from current state (whichever it is) going through the correct transitions.

By default, if a transition fails, the chain is interrupted, but the behavior can be changed with the parameter "gnoreFailures"

Definition at line 646 of file ApplicationMgr.cpp.

646  {
648 
649  switch ( state ) {
650 
652  switch ( m_state ) {
654  return StatusCode::SUCCESS;
655  break;
657  return terminate();
658  break;
659  default: // Gaudi::StateMachine::INITIALIZED or Gaudi::StateMachine::RUNNING
661  if ( sc.isSuccess() ) { return terminate(); }
662  break;
663  }
664  break;
665 
667  switch ( m_state ) {
669  return StatusCode::SUCCESS;
670  break;
672  return configure();
673  break;
675  return finalize();
676  break;
677  default: // Gaudi::StateMachine::RUNNING
679  if ( sc.isSuccess() ) { return finalize(); }
680  break;
681  }
682  break;
683 
685  switch ( m_state ) {
687  return StatusCode::SUCCESS;
688  break;
690  return initialize();
691  break;
693  return stop();
694  break;
695  default: // Gaudi::StateMachine::OFFLINE
697  if ( sc.isSuccess() ) { return initialize(); }
698  break;
699  }
700  break;
701 
703  switch ( m_state ) {
705  return StatusCode::SUCCESS;
706  break;
708  return start();
709  break;
710  default: // Gaudi::StateMachine::OFFLINE or Gaudi::StateMachine::CONFIGURED
712  if ( sc.isSuccess() ) { return start(); }
713  break;
714  }
715  break;
716  }
717 
718  // If I get here, there has been a problem in the recursion
719 
720  if ( ignoreFailures ) {
721  // force the new state
722  m_state = state;
723  return StatusCode::SUCCESS;
724  }
725 
726  return sc;
727 }

◆ i_delegateToEvtProc()

template<typename SELF , typename PIMPL , typename METHOD , typename... ARGS>
static auto ApplicationMgr::i_delegateToEvtProc ( SELF *  self,
PIMPL &  member,
std::string_view  method_name,
METHOD &&  method,
ARGS &&...  args 
)
inlinestaticprivate

Helper to delegate calls to event processor implementation.

Definition at line 322 of file ApplicationMgr.h.

323  {
324  if ( LIKELY( self->m_state == Gaudi::StateMachine::RUNNING ) ) {
325  if ( LIKELY( bool( member ) ) ) {
326  return std::invoke( method, *member.get(), std::forward<ARGS>( args )... );
327  } else {
329  s << method_name << ": event processor is not a \""
330  << System::typeinfoName( typeid( decltype( *member.get() ) ) ) << '"';
331  throw GaudiException{s.str(), self->name(), StatusCode::FAILURE};
332  }
333  }
335  s << method_name << ": Invalid state \"" << self->FSMState() << '"';
336  throw GaudiException{s.str(), self->name(), StatusCode::FAILURE};
337  }

◆ i_startup()

StatusCode ApplicationMgr::i_startup ( )
protected

Internal startup routine.

Definition at line 121 of file ApplicationMgr.cpp.

121  {
122 
123  StatusCode sc;
124 
125  // declare factories in current module
126  m_classManager->loadModule( "" ).ignore();
127 
128  // Note: we cannot use CommonMessaging methods here because MessageSvc is not there yet
129  MsgStream log( nullptr, name() );
130 
131  // Create the Message service
132  auto msgsvc = svcManager()->createService( Gaudi::Utils::TypeNameString( "MessageSvc", m_messageSvcType ) );
133  if ( !msgsvc ) {
134  log << MSG::FATAL << "Error creating MessageSvc of type " << m_messageSvcType << endmsg;
135  return StatusCode::FAILURE;
136  }
137  // Get the useful interface from Message services
138  m_messageSvc = m_svcLocator->service( "MessageSvc" );
139  if ( !m_messageSvc ) {
140  log << MSG::FATAL << "Error retrieving MessageSvc." << endmsg;
141  return StatusCode::FAILURE;
142  }
143  sc = m_messageSvc.as<IProperty>()->setProperty( "OutputLevel", m_outputLevel );
144  if ( !sc ) {
145  log << MSG::FATAL << "Error setting OutputLevel option of MessageSvc" << endmsg;
146  return sc;
147  }
148 
149  auto jobsvc = svcManager()->createService( Gaudi::Utils::TypeNameString( "JobOptionsSvc", m_jobOptionsSvcType ) );
150  // Create the Job Options service
151  if ( !jobsvc ) {
152  log << MSG::FATAL << "Error creating JobOptionsSvc" << endmsg;
153  return StatusCode::FAILURE;
154  }
155 
156  auto jobOptsIProp = jobsvc.as<IProperty>();
157  if ( !jobOptsIProp ) {
158  log << MSG::FATAL << "Error locating JobOptionsSvc" << endmsg;
159  return StatusCode::FAILURE;
160  }
161  sc = jobOptsIProp->setProperty( Gaudi::Property<std::string>( "TYPE", m_jobOptionsType ) );
162  if ( !sc.isSuccess() ) {
163  log << MSG::FATAL << "Error setting TYPE option in JobOptionsSvc" << endmsg;
164  return sc;
165  }
166 
167  if ( !m_jobOptionsPreAction.empty() ) {
168  sc = jobOptsIProp->setProperty( Gaudi::Property<std::string>( "PYTHONPARAMS", m_jobOptionsPreAction ) );
169  if ( !sc.isSuccess() ) {
170  log << MSG::FATAL << "Error setting JobOptionsPreAction option in JobOptionsSvc" << endmsg;
171  return sc;
172  }
173  }
174 
175  if ( !m_jobOptionsPostAction.empty() ) {
176  sc = jobOptsIProp->setProperty( Gaudi::Property<std::string>( "PYTHONACTION", m_jobOptionsPostAction ) );
177  if ( !sc.isSuccess() ) {
178  log << MSG::FATAL << "Error setting JobOptionsPostAction option in JobOptionsSvc" << endmsg;
179  return sc;
180  }
181  }
182 
183  if ( !m_jobOptionsPath.empty() ) { // The command line takes precedence
184  sc = jobOptsIProp->setProperty( Gaudi::Property<std::string>( "PATH", m_jobOptionsPath ) );
185  if ( !sc.isSuccess() ) {
186  log << MSG::FATAL << "Error setting PATH option in JobOptionsSvc" << endmsg;
187  return sc;
188  }
189  } else if ( isEnvSet( "JOBOPTPATH" ) ) { // Otherwise the Environment JOBOPTPATH
190  sc = jobOptsIProp->setProperty( Gaudi::Property<std::string>( "PATH", getEnv( "JOBOPTPATH" ) ) );
191  if ( !sc.isSuccess() ) {
192  log << MSG::FATAL << "Error setting PATH option in JobOptionsSvc from env" << endmsg;
193  return sc;
194  }
195  } else { // Otherwise the default
196  sc = jobOptsIProp->setProperty( Gaudi::Property<std::string>( "PATH", "../options/job.opts" ) );
197  if ( !sc.isSuccess() ) {
198  log << MSG::FATAL << "Error setting PATH option in JobOptionsSvc to default" << endmsg;
199  return sc;
200  }
201  }
202  jobOptsIProp.reset();
203 
204  // Sets my default the Output Level of the Message service to be
205  // the same as this
206  auto msgSvcIProp = msgsvc.as<IProperty>();
207  msgSvcIProp->setProperty( Gaudi::Property<int>( "OutputLevel", m_outputLevel ) ).ignore();
208  msgSvcIProp.reset();
209 
210  sc = jobsvc->sysInitialize();
211  if ( !sc.isSuccess() ) {
212  log << MSG::FATAL << "Error initializing JobOptionsSvc" << endmsg;
213  return sc;
214  }
215  sc = msgsvc->sysInitialize();
216  if ( !sc.isSuccess() ) {
217  log << MSG::FATAL << "Error initializing MessageSvc" << endmsg;
218  return sc;
219  }
220 
221  // Make sure output level caches are up to date.
223 
224  return sc;
225 }

◆ initialize()

StatusCode ApplicationMgr::initialize ( )
override

Definition at line 399 of file ApplicationMgr.cpp.

399  {
400  StatusCode sc;
401 
403 
404  // Make sure output level caches are up to date.
406 
407  // I cannot add these services in configure() because they are coming from GaudiUtils
408  // and it messes up genconf when rebuilding it.
409  if ( m_stopOnSignal ) {
410  // Instantiate the service that schedules a stop when a signal is received
411  std::string svcname( "Gaudi::Utils::StopSignalHandler" );
412  sc = svcManager()->addService( svcname );
413  if ( sc.isFailure() ) {
414  log << MSG::INFO << "Cannot instantiate " << svcname << "signals will be ignored" << endmsg;
415  }
416  }
417 
418  if ( m_stalledEventMonitoring ) {
419  // Instantiate the service that schedules a stop when a signal is received
420  std::string svcname( "StalledEventMonitor" );
421  sc = svcManager()->addService( svcname );
422  if ( sc.isFailure() ) {
423  log << MSG::INFO << "Cannot instantiate " << svcname << "signals will be ignored" << endmsg;
424  }
425  }
426 
428  log << MSG::INFO << "Already Initialized!" << endmsg;
429  return StatusCode::SUCCESS;
430  }
432  log << MSG::FATAL << "initialize: Invalid state \"" << m_state << "\"" << endmsg;
433  return StatusCode::FAILURE;
434  }
436 
437  //--------------------------------------------------------------------------
438  // Initialize the list of top Services
439  //--------------------------------------------------------------------------
440  sc = svcManager()->initialize();
441  if ( !sc.isSuccess() ) return sc;
442 
443  sc = algManager()->initialize();
444  if ( !sc.isSuccess() ) return sc;
445 
446  //--------------------------------------------------------------------------
447  // Final steps: Inform user and change internal state
448  //--------------------------------------------------------------------------
449  log << MSG::INFO << "Application Manager Initialized successfully" << endmsg;
451 
453 
454  return sc;
455 }

◆ monitoringHub()

Gaudi::Monitoring::Hub& ApplicationMgr::monitoringHub ( )
inlineoverride

Definition at line 154 of file ApplicationMgr.h.

154 { return m_monitoringHub; }

◆ name()

const std::string & ApplicationMgr::name ( ) const
override

Definition at line 816 of file ApplicationMgr.cpp.

816 { return m_name; }

◆ nextEvent()

StatusCode ApplicationMgr::nextEvent ( int  maxevt)
override

Definition at line 494 of file ApplicationMgr.cpp.

494  {
497  log << MSG::FATAL << "nextEvent: Invalid state \"" << m_state << "\"" << endmsg;
498  return StatusCode::FAILURE;
499  }
500  if ( !m_processingMgr ) {
502  log << MSG::FATAL << "No event processing manager specified. Check option: " << m_eventLoopMgr.name() << endmsg;
503  return StatusCode::FAILURE;
504  }
505  return m_processingMgr->nextEvent( maxevt );
506 }

◆ outputLevelUpdate()

void ApplicationMgr::outputLevelUpdate ( )
override

Function to call to update the outputLevel of the components (after a change in MessageSvc).

Definition at line 1041 of file ApplicationMgr.cpp.

1041  {
1042  resetMessaging();
1043  for ( auto& mgrItem : m_managers ) { mgrItem.second->outputLevelUpdate(); }
1044 }

◆ pluginDebugPropertyHandler()

void ApplicationMgr::pluginDebugPropertyHandler ( Gaudi::Details::PropertyBase theProp)

◆ pop()

std::optional< Gaudi::Interfaces::IQueueingEventProcessor::ResultType > ApplicationMgr::pop ( )
override

Definition at line 776 of file ApplicationMgr.cpp.

◆ printAlgsSequences()

void ApplicationMgr::printAlgsSequences ( )

Print the sequence of algorithms that have been loaded.

Definition at line 1067 of file ApplicationMgr.cpp.

1067  {
1069  log << MSG::ALWAYS << "****************************** Algorithm Sequence ****************************" << endmsg;
1070  for ( auto& algname : m_topAlgNameList ) { printAlgsSequencesHelper( algManager(), algname, log, 0 ); }
1071  log << MSG::ALWAYS << "******************************************************************************" << endmsg;
1072 }

◆ push()

void ApplicationMgr::push ( EventContext &&  ctx)
override

Definition at line 767 of file ApplicationMgr.cpp.

◆ queryInterface()

StatusCode ApplicationMgr::queryInterface ( const InterfaceID iid,
void **  pinterface 
)
override

Definition at line 95 of file ApplicationMgr.cpp.

95  {
96  if ( !ppvi ) { return StatusCode::FAILURE; }
97 
98  // try to find own/direct interfaces:
99  StatusCode sc = base_class::queryInterface( iid, ppvi );
100  if ( sc.isSuccess() ) return sc;
101 
102  // find indirect interfaces :
103  if ( ISvcLocator::interfaceID().versionMatch( iid ) ) { return serviceLocator()->queryInterface( iid, ppvi ); }
104  if ( ISvcManager::interfaceID().versionMatch( iid ) ) { return svcManager()->queryInterface( iid, ppvi ); }
105  if ( IAlgManager::interfaceID().versionMatch( iid ) ) { return algManager()->queryInterface( iid, ppvi ); }
106  if ( IClassManager::interfaceID().versionMatch( iid ) ) { return m_classManager->queryInterface( iid, ppvi ); }
107  if ( IMessageSvc::interfaceID().versionMatch( iid ) ) {
108  *ppvi = m_messageSvc.get();
109  if ( m_messageSvc ) m_messageSvc->addRef();
110  // Note that 0 can be a valid IMessageSvc pointer value (when used for
111  // MsgStream).
112  return StatusCode::SUCCESS;
113  }
114  *ppvi = nullptr;
115  return StatusCode::FAILURE;
116 }

◆ reinitialize()

StatusCode ApplicationMgr::reinitialize ( )
override

Definition at line 826 of file ApplicationMgr.cpp.

826  {
829  StatusCode sc;
831  throw GaudiException( "Cannot reinitialize application if not INITIALIZED or RUNNING",
832  "ApplicationMgr::reinitialize", StatusCode::FAILURE );
833  }
835  sc = svcManager()->reinitialize();
836  if ( sc.isFailure() ) retval = sc;
837  sc = algManager()->reinitialize();
838  if ( sc.isFailure() ) retval = sc;
839 
841  if ( sc.isFailure() ) retval = sc;
842  sc = m_svcLocator->service( "JobOptionsSvc" )->sysReinitialize();
843  if ( sc.isFailure() ) retval = sc;
844 
845  log << MSG::INFO << "Application Manager Reinitialized successfully" << endmsg;
846 
847  return retval;
848 }

◆ restart()

StatusCode ApplicationMgr::restart ( )
override

Definition at line 853 of file ApplicationMgr.cpp.

853  {
855  StatusCode sc;
857  throw GaudiException( "Cannot restart application if not RUNNING", "ApplicationMgr::restart", StatusCode::FAILURE );
858  }
859 
860  sc = svcManager()->restart();
861  if ( sc.isFailure() ) retval = sc;
862  sc = algManager()->restart();
863  if ( sc.isFailure() ) retval = sc;
864 
865  sc = m_messageSvc.as<IService>()->sysRestart();
866  if ( sc.isFailure() ) retval = sc;
867  sc = m_svcLocator->service( "JobOptionsSvc" )->sysRestart();
868  if ( sc.isFailure() ) retval = sc;
869 
870  return retval;
871 }

◆ run()

StatusCode ApplicationMgr::run ( )
override

Definition at line 732 of file ApplicationMgr.cpp.

732  {
734 
736  if ( sc.isSuccess() ) {
738  if ( m_runable != 0 ) { // loop over the events
739  sc = m_runable->run();
740  if ( !sc.isSuccess() ) { log << MSG::FATAL << "Application execution failed. Ending the job." << endmsg; }
741  } else {
742  log << MSG::FATAL << "Application has no runable object. Check option:" << m_runableType.name() << endmsg;
743  }
744  }
745  if ( sc.isSuccess() ) { // try to close cleanly
747  }
748  // either the runable failed of the stut-down
749  if ( sc.isFailure() ) { // try to close anyway (but keep the StatusCode unchanged)
751  }
752  return sc;
753 }

◆ serviceLocator()

SmartIF<ISvcLocator>& ApplicationMgr::serviceLocator ( ) const
inlineoverride

Needed to locate the message service.

Definition at line 149 of file ApplicationMgr.h.

149 { return m_svcLocator; }

◆ setServiceManager()

void ApplicationMgr::setServiceManager ( ISvcManager )
inlineoverrideprotected

Definition at line 161 of file ApplicationMgr.h.

161 {}

◆ start()

StatusCode ApplicationMgr::start ( )
override

Definition at line 460 of file ApplicationMgr.cpp.

460  {
461 
463 
465  log << MSG::INFO << "Already Initialized!" << endmsg;
466  return StatusCode::SUCCESS;
467  }
469  log << MSG::FATAL << "start: Invalid state \"" << m_state << "\"" << endmsg;
470  return StatusCode::FAILURE;
471  }
473 
474  //--------------------------------------------------------------------------
475  // Initialize the list of top Services
476  //--------------------------------------------------------------------------
477  return m_svcLocator->service( "JobOptionsSvc" )
478  ->sysStart()
479  .andThen( [&]() { return m_messageSvc.as<IService>()->sysStart(); } )
480  .andThen( [&]() { return svcManager()->start(); } )
481  .andThen( [&]() { return algManager()->start(); } )
482  .andThen( [&]() {
483  //--------------------------------------------------------------------------
484  // Final steps: Inform user and change internal state
485  //--------------------------------------------------------------------------
486  log << MSG::INFO << "Application Manager Started successfully" << endmsg;
488  } );
489 }

◆ stop()

StatusCode ApplicationMgr::stop ( )
override

Definition at line 511 of file ApplicationMgr.cpp.

511  {
512 
514 
516  log << MSG::INFO << "Already Initialized!" << endmsg;
517  return StatusCode::SUCCESS;
518  }
520  log << MSG::FATAL << "stop: Invalid state \"" << m_state << "\"" << endmsg;
521  return StatusCode::FAILURE;
522  }
524 
525  // Stop independently managed Algorithms
526  return algManager()
527  ->stop()
528  //--------------------------------------------------------------------------
529  // Stop the list of top Services
530  //--------------------------------------------------------------------------
531  .andThen( [&]() { return svcManager()->stop(); } )
532  .andThen( [&]() { return m_messageSvc.as<IService>()->sysStop(); } )
533  .andThen( [&]() { return m_svcLocator->service( "JobOptionsSvc" )->sysStop(); } )
534  //--------------------------------------------------------------------------
535  // Final steps: Inform user and change internal state
536  //--------------------------------------------------------------------------
537  .andThen( [&]() {
538  log << MSG::INFO << "Application Manager Stopped successfully" << endmsg;
540  } );
541 }

◆ stopRun()

StatusCode ApplicationMgr::stopRun ( )
override

implementation of IEventProcessor::stopRun()

Definition at line 805 of file ApplicationMgr.cpp.

805  {
808  if ( m_processingMgr ) { return m_processingMgr->stopRun(); }
809  log << MSG::WARNING << "No EventLoop Manager specified " << endmsg;
810  return StatusCode::SUCCESS;
811  }
812  log << MSG::FATAL << "stopRun: Invalid state \"" << FSMState() << "\"" << endmsg;
813  return StatusCode::FAILURE;
814 }

◆ svcManager()

SmartIF<ISvcManager>& ApplicationMgr::svcManager ( )
inline

Definition at line 136 of file ApplicationMgr.h.

136  {
137  // Cache the casted pointer to ISvcManager
138  if ( !m_svcManager ) { m_svcManager = getManager<IService>(); }
139  return m_svcManager;
140  }

◆ sysFinalize()

StatusCode ApplicationMgr::sysFinalize ( )
inlineoverride

Definition at line 107 of file ApplicationMgr.h.

107 { return StatusCode::SUCCESS; }

◆ sysInitialize()

StatusCode ApplicationMgr::sysInitialize ( )
inlineoverride

Definition at line 101 of file ApplicationMgr.h.

101 { return StatusCode::SUCCESS; }

◆ sysReinitialize()

StatusCode ApplicationMgr::sysReinitialize ( )
inlineoverride

Definition at line 109 of file ApplicationMgr.h.

109 { return StatusCode::SUCCESS; }

◆ sysRestart()

StatusCode ApplicationMgr::sysRestart ( )
inlineoverride

Definition at line 111 of file ApplicationMgr.h.

111 { return StatusCode::SUCCESS; }

◆ sysStart()

StatusCode ApplicationMgr::sysStart ( )
inlineoverride

Definition at line 103 of file ApplicationMgr.h.

103 { return StatusCode::SUCCESS; }

◆ sysStop()

StatusCode ApplicationMgr::sysStop ( )
inlineoverride

Definition at line 105 of file ApplicationMgr.h.

105 { return StatusCode::SUCCESS; }

◆ targetFSMState()

Gaudi::StateMachine::State ApplicationMgr::targetFSMState ( ) const
override

Definition at line 821 of file ApplicationMgr.cpp.

821 { return m_targetState; }

◆ terminate()

StatusCode ApplicationMgr::terminate ( )
override

Definition at line 593 of file ApplicationMgr.cpp.

593  {
595 
597  log << MSG::INFO << "Already Offline" << endmsg;
598  return StatusCode::SUCCESS;
599  }
601  log << MSG::FATAL << "terminate: Invalid state \"" << m_state << "\"" << endmsg;
602  return StatusCode::FAILURE;
603  }
604  // release all Services
606 
608  log << MSG::INFO << "Application Manager Terminated successfully" << endmsg;
610  log << MSG::INFO << "Application Manager Terminated successfully with a user requested ScheduledStop" << endmsg;
611  } else {
612  log << MSG::ERROR << "Application Manager Terminated with error code " << m_returnCode.value() << endmsg;
613  }
614 
615  {
616  auto& opts = m_svcLocator->getOptsSvc();
617  // Force a disable the auditing of finalize for MessageSvc
618  opts.set( "MessageSvc.AuditFinalize", "false" );
619  // Force a disable the auditing of finalize for JobOptionsSvc
620  opts.set( "JobOptionsSvc.AuditFinalize", "false" );
621  }
622 
623  // finalize MessageSvc
624  auto svc = m_messageSvc.as<IService>();
625  if ( !svc ) {
626  log << MSG::ERROR << "Could not get the IService interface of the MessageSvc" << endmsg;
627  } else {
628  svc->sysFinalize().ignore();
629  }
630 
631  // finalize JobOptionsSvc
632  svc = m_svcLocator->service( "JobOptionsSvc" );
633  if ( !svc ) {
634  log << MSG::ERROR << "Could not get the IService interface of the JobOptionsSvc" << endmsg;
635  } else {
636  svc->sysFinalize().ignore();
637  }
638 
640  return StatusCode::SUCCESS;
641 }

Member Data Documentation

◆ m_actHistory

Gaudi::Property<bool> ApplicationMgr::m_actHistory {this, "ActivateHistory", false, "Activate HistorySvc"}
protected

Definition at line 264 of file ApplicationMgr.h.

◆ m_algManager

SmartIF<IAlgManager> ApplicationMgr::m_algManager
protected

Cached pointer to the manager of algorithms.

Definition at line 186 of file ApplicationMgr.h.

◆ m_appName

Gaudi::Property<std::string> ApplicationMgr::m_appName {this, "AppName", "ApplicationMgr", "The name of the application"}
protected

Definition at line 262 of file ApplicationMgr.h.

◆ m_appVersion

Gaudi::Property<std::string> ApplicationMgr::m_appVersion {this, "AppVersion", {}, "The version of the application"}
protected

Definition at line 263 of file ApplicationMgr.h.

◆ m_auditAlgs

Gaudi::Property<bool> ApplicationMgr::m_auditAlgs {this, "AuditAlgorithms", false}
protected

Definition at line 285 of file ApplicationMgr.h.

◆ m_auditSvcs

Gaudi::Property<bool> ApplicationMgr::m_auditSvcs {this, "AuditServices", false}
protected

Definition at line 284 of file ApplicationMgr.h.

◆ m_auditTools

Gaudi::Property<bool> ApplicationMgr::m_auditTools {this, "AuditTools", false}
protected

Defaults for auditors.

Definition at line 283 of file ApplicationMgr.h.

◆ m_classManager

SmartIF<DLLClassManager> ApplicationMgr::m_classManager
protected

Reference to the class manager.

Definition at line 191 of file ApplicationMgr.h.

◆ m_codeCheck

Gaudi::Property<bool> ApplicationMgr::m_codeCheck {this, "StatusCodeCheck", false, "[[deprecated]] will be removed"}
protected

Definition at line 265 of file ApplicationMgr.h.

◆ m_createSvcNameList

Gaudi::Property<std::vector<std::string> > ApplicationMgr::m_createSvcNameList
protected
Initial value:
{
this, "CreateSvc", {}, "List of extra services to be created"}

Definition at line 279 of file ApplicationMgr.h.

◆ m_declaredManagers

Gaudi::Property<std::vector<std::string> > ApplicationMgr::m_declaredManagers
protected

Property to declare the list of known managers.

Definition at line 180 of file ApplicationMgr.h.

◆ m_dllNameList

Gaudi::Property<std::vector<std::string> > ApplicationMgr::m_dllNameList {this, "Dlls", {}, "List of DDL's names"}
protected

Definition at line 250 of file ApplicationMgr.h.

◆ m_environment

Gaudi::Property<std::map<std::string, std::string> > ApplicationMgr::m_environment
protected
Initial value:
{
this, "Environment", {}, "Environment variables to set"}

Definition at line 287 of file ApplicationMgr.h.

◆ m_eventLoopMgr

Gaudi::Property<std::string> ApplicationMgr::m_eventLoopMgr {this, "EventLoop", "EventLoopMgr", "Processing manager type"}
protected

Definition at line 258 of file ApplicationMgr.h.

◆ m_evtMax

Gaudi::Property<int> ApplicationMgr::m_evtMax {this, "EvtMax", -1, "Number of events to be processed (-1 means all events)"}
protected

Definition at line 244 of file ApplicationMgr.h.

◆ m_evtsel

Gaudi::Property<std::string> ApplicationMgr::m_evtsel {this, "EvtSel", {}, "Event selection"}
protected

Definition at line 259 of file ApplicationMgr.h.

◆ m_extSvcCreates

Gaudi::Property<bool> ApplicationMgr::m_extSvcCreates
protected
Initial value:
{this, "ExtSvcCreates", true,
"LHCb (default) or ATLAS definition of \"ExtSvc\""}

Definition at line 247 of file ApplicationMgr.h.

◆ m_extSvcNameList

Gaudi::Property<std::vector<std::string> > ApplicationMgr::m_extSvcNameList
protected
Initial value:
{
this, "ExtSvc", {}, "List of external services names", "vector<Service>"}

Definition at line 245 of file ApplicationMgr.h.

◆ m_histPersName

Gaudi::Property<std::string> ApplicationMgr::m_histPersName {this, "HistogramPersistency", "NONE", "Name of the Hist Pers Svc"}
protected

Definition at line 260 of file ApplicationMgr.h.

◆ m_jobOptionsPath

Gaudi::Property<std::string> ApplicationMgr::m_jobOptionsPath {this, "JobOptionsPath", {}, "The \"file\" to look for properties"}
protected

Definition at line 252 of file ApplicationMgr.h.

◆ m_jobOptionsPostAction

Gaudi::Property<std::string> ApplicationMgr::m_jobOptionsPostAction
protected
Initial value:
{
this, "JobOptionsPreAction", {}, "additional command to run on config"}

Definition at line 255 of file ApplicationMgr.h.

◆ m_jobOptionsPreAction

Gaudi::Property<std::string> ApplicationMgr::m_jobOptionsPreAction
protected
Initial value:
{
this, "JobOptionsPostAction", {}, "additional command to run on config"}

Definition at line 253 of file ApplicationMgr.h.

◆ m_jobOptionsSvcType

Gaudi::Property<std::string> ApplicationMgr::m_jobOptionsSvcType
protected
Initial value:
{this, "JobOptionsSvcType", "JobOptionsSvc", "JobOptionsSvc type",
"Service:Gaudi::Interfaces::IOptionsSvc"}

Definition at line 221 of file ApplicationMgr.h.

◆ m_jobOptionsType

Gaudi::Property<std::string> ApplicationMgr::m_jobOptionsType {this, "JobOptionsType", "FILE", "Source type (e.g. dbase, file...)"}
protected

Definition at line 251 of file ApplicationMgr.h.

◆ m_loopCheck

Gaudi::Property<bool> ApplicationMgr::m_loopCheck
protected
Initial value:
{this, "InitializationLoopCheck", true,
[this]( auto& ) { this->svcManager()->setLoopCheckEnabled( m_loopCheck ); },
"For ServiceMgr initialization loop checking"}

Definition at line 290 of file ApplicationMgr.h.

◆ m_managers

ManagersMap ApplicationMgr::m_managers
protected

Map of known component managers.

It contains (at least) the managers for IService and IAlgorithm. IAlgTool and IAuditor are not mandatory (but a missing manager for IAlgTool will probably not allow any job to run).

Definition at line 178 of file ApplicationMgr.h.

◆ m_messageSvc

SmartIF<IMessageSvc> ApplicationMgr::m_messageSvc
protected

Reference to the message service.

Definition at line 232 of file ApplicationMgr.h.

◆ m_messageSvcType

Gaudi::Property<std::string> ApplicationMgr::m_messageSvcType
protected
Initial value:
{this, "MessageSvcType", "MessageSvc", "MessageSvc type",
"Service:IMessageSvc"}

Definition at line 219 of file ApplicationMgr.h.

◆ m_monitoringHub

Gaudi::Monitoring::Hub ApplicationMgr::m_monitoringHub
protected

Definition at line 238 of file ApplicationMgr.h.

◆ m_name

std::string ApplicationMgr::m_name = "ApplicationMgr"
protected

Name.

Definition at line 224 of file ApplicationMgr.h.

◆ m_okDlls

std::vector<std::string> ApplicationMgr::m_okDlls
private

names of successfully loaded dlls

Definition at line 318 of file ApplicationMgr.h.

◆ m_outputLevel

Gaudi::Property<int> ApplicationMgr::m_outputLevel {this, "OutputLevel", MSG::INFO, "Message output level"}
protected

Definition at line 261 of file ApplicationMgr.h.

◆ m_outStreamNameList

Gaudi::Property<std::vector<std::string> > ApplicationMgr::m_outStreamNameList
protected
Initial value:
{
this, "OutStream", {}, &ApplicationMgr::evtLoopPropertyHandler, "List of output stream names"}

Definition at line 214 of file ApplicationMgr.h.

◆ m_outStreamType

Gaudi::Property<std::string> ApplicationMgr::m_outStreamType
protected
Initial value:
{this, "OutStreamType", "OutputStream",
"[[deprecated]] Output stream type"}

Definition at line 216 of file ApplicationMgr.h.

◆ m_pluginDebugLevel

Gaudi::Property<int> ApplicationMgr::m_pluginDebugLevel
protected
Initial value:
{this, "PluginDebugLevel", 0,
[this]( auto& ) {
<< "Updating Gaudi::PluginService::SetDebug(level) to level="
}
},
"Debug level for the plugin system"}

Definition at line 266 of file ApplicationMgr.h.

◆ m_printAlgsSequence

Gaudi::Property<bool> ApplicationMgr::m_printAlgsSequence
protected
Initial value:
{this, "PrintAlgsSequence", false,
"Print the sequence of algorithms that have been loaded."}

Definition at line 311 of file ApplicationMgr.h.

◆ m_processingMgr

SmartIF<IEventProcessor> ApplicationMgr::m_processingMgr
protected

Reference to processing manager object.

Definition at line 234 of file ApplicationMgr.h.

◆ m_propertiesPrint

Gaudi::Property<bool> ApplicationMgr::m_propertiesPrint
protected
Initial value:
{this, "PropertiesPrint", false,
"Flag to activate the printout of properties"}

Definition at line 304 of file ApplicationMgr.h.

◆ m_queueingProcessor

SmartIF<IQueueingEventProcessor> ApplicationMgr::m_queueingProcessor
protected

Reference to a queueing processing manager object.

Definition at line 236 of file ApplicationMgr.h.

◆ m_returnCode

Gaudi::Property<int> ApplicationMgr::m_returnCode
protected
Initial value:
{this, "ReturnCode", Gaudi::ReturnCode::Success,
"Return code of the application. Set internally in case of error conditions."}

Property to record the error conditions occurring during the running.

Definition at line 308 of file ApplicationMgr.h.

◆ m_runable

SmartIF<IRunable> ApplicationMgr::m_runable
protected

Reference to the runable object.

Definition at line 233 of file ApplicationMgr.h.

◆ m_runableType

Gaudi::Property<std::string> ApplicationMgr::m_runableType {this, "Runable", "AppMgrRunable", "Runable type"}
protected

Definition at line 257 of file ApplicationMgr.h.

◆ m_SIExit

Gaudi::Property<int> ApplicationMgr::m_SIExit
protected
Initial value:
{this, "Exit", 0,
[this]( auto& ) {
::exit( 0 );
},
"For SI's \"Exit\" command via callback"}

Definition at line 201 of file ApplicationMgr.h.

◆ m_SIGo

Gaudi::Property<int> ApplicationMgr::m_SIGo
protected
Initial value:
{this, "Go", 0,
[this]( auto& ) {
this->reinitialize().ignore();
},
"For SI's \"Go\" command via callback"}

Definition at line 193 of file ApplicationMgr.h.

◆ m_stalledEventMonitoring

Gaudi::Property<bool> ApplicationMgr::m_stalledEventMonitoring
protected
Initial value:
{
this, "StalledEventMonitoring", false, "Flag to enable/disable the monitoring and reporting of stalled events"}

Property to enable/disable the monitoring and reporting of stalled events.

See also
StalledEventMonitor

Definition at line 301 of file ApplicationMgr.h.

◆ m_state

Gaudi::StateMachine::State ApplicationMgr::m_state = Gaudi::StateMachine::OFFLINE
protected

Internal State.

Definition at line 225 of file ApplicationMgr.h.

◆ m_stopOnSignal

Gaudi::Property<bool> ApplicationMgr::m_stopOnSignal
protected
Initial value:
{
this, "StopOnSignal", false, "Flag to enable/disable the signal handler that schedule a stop of the event loop"}

Property to enable/disable the "stop on signal" service.

See also
Gaudi::Utils::StopSignalHandler

Definition at line 296 of file ApplicationMgr.h.

◆ m_svcLocator

SmartIF<ISvcLocator> ApplicationMgr::m_svcLocator
mutableprotected

Reference to its own service locator (must be instantiated prior to any service!)

Definition at line 189 of file ApplicationMgr.h.

◆ m_svcManager

SmartIF<ISvcManager> ApplicationMgr::m_svcManager
protected

Cached pointer to the manager of services.

Definition at line 183 of file ApplicationMgr.h.

◆ m_svcMapping

Gaudi::Property<std::vector<std::string> > ApplicationMgr::m_svcMapping {this, "SvcMapping", {}, "Default mapping of services"}
protected

Definition at line 228 of file ApplicationMgr.h.

◆ m_svcOptMapping

Gaudi::Property<std::vector<std::string> > ApplicationMgr::m_svcOptMapping
protected
Initial value:
{
this, "SvcOptMapping", {}, "Default mapping of optional services"}

Definition at line 229 of file ApplicationMgr.h.

◆ m_targetState

Gaudi::StateMachine::State ApplicationMgr::m_targetState = Gaudi::StateMachine::OFFLINE
protected

Internal State.

Definition at line 226 of file ApplicationMgr.h.

◆ m_topAlgNameList

Gaudi::Property<std::vector<std::string> > ApplicationMgr::m_topAlgNameList
protected
Initial value:
{this,
"TopAlg",
{},
"List of top level algorithms names",
"vector<Algorithm>"}

Definition at line 208 of file ApplicationMgr.h.

◆ m_useHiveAlgorithmManager

bool ApplicationMgr::m_useHiveAlgorithmManager
protected

Definition at line 315 of file ApplicationMgr.h.


The documentation for this class was generated from the following files:
ApplicationMgr::printAlgsSequences
void printAlgsSequences()
Print the sequence of algorithms that have been loaded.
Definition: ApplicationMgr.cpp:1067
Gaudi::ReturnCode::Success
constexpr int Success
Definition: AppReturnCode.h:26
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
IService
Definition: IService.h:28
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: PropertyBase.h:39
ApplicationMgr::m_algManager
SmartIF< IAlgManager > m_algManager
Cached pointer to the manager of algorithms.
Definition: ApplicationMgr.h:186
Gaudi::Interfaces::IQueueingEventProcessor::pop
virtual std::optional< ResultType > pop()=0
Get the next available result.
Gaudi::ReturnCode::FinalizationFailure
constexpr int FinalizationFailure
Error codes for operation failures.
Definition: AppReturnCode.h:42
std::string
STL class.
ApplicationMgr::m_propertiesPrint
Gaudi::Property< bool > m_propertiesPrint
Definition: ApplicationMgr.h:304
Gaudi.Configuration.log
log
Definition: Configuration.py:24
std::move
T move(T... args)
ApplicationMgr::decodeDllNameList
StatusCode decodeDllNameList()
Definition: ApplicationMgr.cpp:967
CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > >::resetMessaging
MSG::Level resetMessaging()
Reinitialize internal states.
Definition: CommonMessaging.h:179
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:355
MSG::INFO
@ INFO
Definition: IMessageSvc.h:25
ApplicationMgr::outputLevelUpdate
void outputLevelUpdate() override
Function to call to update the outputLevel of the components (after a change in MessageSvc).
Definition: ApplicationMgr.cpp:1041
ApplicationMgr::m_runable
SmartIF< IRunable > m_runable
Reference to the runable object.
Definition: ApplicationMgr.h:233
ApplicationMgr::i_startup
StatusCode i_startup()
Internal startup routine.
Definition: ApplicationMgr.cpp:121
ApplicationMgr::stop
StatusCode stop() override
Definition: ApplicationMgr.cpp:511
ApplicationMgr::m_name
std::string m_name
Name.
Definition: ApplicationMgr.h:224
gaudirun.s
string s
Definition: gaudirun.py:328
System::getEnv
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:379
ApplicationMgr::m_messageSvcType
Gaudi::Property< std::string > m_messageSvcType
Definition: ApplicationMgr.h:219
std::vector< std::string >
std::find
T find(T... args)
PropertyHolder< CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > > >::setProperty
StatusCode setProperty(const Gaudi::Details::PropertyBase &p)
Set the property from a property.
Definition: IProperty.h:39
GAUDI_MINOR_VERSION
#define GAUDI_MINOR_VERSION
Definition: GAUDI_VERSION.h:9
ApplicationMgr::name
const std::string & name() const override
Definition: ApplicationMgr.cpp:816
GaudiException
Definition: GaudiException.h:31
ApplicationMgr::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: ApplicationMgr.cpp:819
ApplicationMgr::sysStop
StatusCode sysStop() override
Definition: ApplicationMgr.h:105
ApplicationMgr::m_stopOnSignal
Gaudi::Property< bool > m_stopOnSignal
Property to enable/disable the "stop on signal" service.
Definition: ApplicationMgr.h:296
ServiceManager
Definition: ServiceManager.h:46
ApplicationMgr::m_stalledEventMonitoring
Gaudi::Property< bool > m_stalledEventMonitoring
Property to enable/disable the monitoring and reporting of stalled events.
Definition: ApplicationMgr.h:301
System::setEnv
GAUDI_API int setEnv(const std::string &name, const std::string &value, int overwrite=1)
Set an environment variables.
Definition: System.cpp:492
std::stringstream
STL class.
MSG::WARNING
@ WARNING
Definition: IMessageSvc.h:25
ApplicationMgr::m_okDlls
std::vector< std::string > m_okDlls
names of successfully loaded dlls
Definition: ApplicationMgr.h:318
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:308
ApplicationMgr::i_delegateToEvtProc
static auto i_delegateToEvtProc(SELF *self, PIMPL &member, std::string_view method_name, METHOD &&method, ARGS &&... args)
Helper to delegate calls to event processor implementation.
Definition: ApplicationMgr.h:322
ApplicationMgr::terminate
StatusCode terminate() override
Definition: ApplicationMgr.cpp:593
ApplicationMgr::executeRun
StatusCode executeRun(int evtmax) override
implementation of IEventProcessor::executeRun(int)
Definition: ApplicationMgr.cpp:791
ApplicationMgr::finalize
StatusCode finalize() override
Definition: ApplicationMgr.cpp:546
PropertyHolder< CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > > >::bindPropertiesTo
void bindPropertiesTo(Gaudi::Interfaces::IOptionsSvc &optsSvc)
Definition: PropertyHolder.h:252
ApplicationMgr::m_jobOptionsSvcType
Gaudi::Property< std::string > m_jobOptionsSvcType
Definition: ApplicationMgr.h:221
PropertyHolder< CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > > >::property
Gaudi::Details::PropertyBase * property(std::string_view name) const
\fixme property and bindPropertiesTo should be protected
Definition: PropertyHolder.h:238
ApplicationMgr::createSvcNameListHandler
void createSvcNameListHandler(Gaudi::Details::PropertyBase &)
Definition: ApplicationMgr.cpp:886
AlgorithmManager
Definition: AlgorithmManager.h:41
std::vector::push_back
T push_back(T... args)
DLLClassManager
Definition: DLLClassManager.h:38
PropertyHolder< CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > > >::getProperties
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
Definition: PropertyHolder.h:222
ApplicationMgr::svcManager
SmartIF< ISvcManager > & svcManager()
Definition: ApplicationMgr.h:136
ApplicationMgr::m_dllNameList
Gaudi::Property< std::vector< std::string > > m_dllNameList
Definition: ApplicationMgr.h:250
IProperty
Definition: IProperty.h:33
ApplicationMgr::dllNameListHandler
void dllNameListHandler(Gaudi::Details::PropertyBase &theProp)
Definition: ApplicationMgr.cpp:958
GaudiPython.Pythonizations.self
self
Definition: Pythonizations.py:566
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:20
ApplicationMgr::m_returnCode
Gaudi::Property< int > m_returnCode
Property to record the error conditions occurring during the running.
Definition: ApplicationMgr.h:308
Gaudi::Time::format
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:262
Gaudi::StateMachine::CONFIGURED
@ CONFIGURED
Definition: StateMachine.h:24
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:566
StatusCode
Definition: StatusCode.h:65
gaudirun.opts
opts
Definition: gaudirun.py:319
ApplicationMgr::configure
StatusCode configure() override
Definition: ApplicationMgr.cpp:230
IInterface::interfaceID
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
Definition: IInterface.h:246
ApplicationMgr::m_jobOptionsPostAction
Gaudi::Property< std::string > m_jobOptionsPostAction
Definition: ApplicationMgr.h:255
LIKELY
#define LIKELY(x)
Definition: Kernel.h:105
Gaudi::StateMachine::OFFLINE
@ OFFLINE
Definition: StateMachine.h:23
std::string::c_str
T c_str(T... args)
Gaudi::Interfaces::IQueueingEventProcessor::push
virtual void push(EventContext &&ctx)=0
Schedule the processing of an event.
Gaudi::Property::declareUpdateHandler
Details::PropertyBase & declareUpdateHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for update
Definition: Property.h:146
ApplicationMgr::m_jobOptionsPreAction
Gaudi::Property< std::string > m_jobOptionsPreAction
Definition: ApplicationMgr.h:253
Gaudi::Property::value
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:240
Gaudi::ReturnCode::ScheduledStop
constexpr int ScheduledStop
Definition: AppReturnCode.h:35
ApplicationMgr::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Reference to its own service locator (must be instantiated prior to any service!)
Definition: ApplicationMgr.h:189
ApplicationMgr::m_appVersion
Gaudi::Property< std::string > m_appVersion
Definition: ApplicationMgr.h:263
ApplicationMgr::sysReinitialize
StatusCode sysReinitialize() override
Definition: ApplicationMgr.h:109
ApplicationMgr::m_jobOptionsType
Gaudi::Property< std::string > m_jobOptionsType
Definition: ApplicationMgr.h:251
ApplicationMgr::sysRestart
StatusCode sysRestart() override
Definition: ApplicationMgr.h:111
ON_DEBUG
#define ON_DEBUG
Definition: ApplicationMgr.cpp:45
ApplicationMgr::m_svcManager
SmartIF< ISvcManager > m_svcManager
Cached pointer to the manager of services.
Definition: ApplicationMgr.h:183
ApplicationMgr::m_runableType
Gaudi::Property< std::string > m_runableType
Definition: ApplicationMgr.h:257
compareRootHistos.retval
def retval
Definition: compareRootHistos.py:471
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
System::isEnvSet
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
Definition: System.cpp:399
std::map< std::string, unsigned int >
ApplicationMgr::m_topAlgNameList
Gaudi::Property< std::vector< std::string > > m_topAlgNameList
Definition: ApplicationMgr.h:208
ApplicationMgr::m_processingMgr
SmartIF< IEventProcessor > m_processingMgr
Reference to processing manager object.
Definition: ApplicationMgr.h:234
Gaudi::StateMachine::RUNNING
@ RUNNING
Definition: StateMachine.h:26
MsgStream
Definition: MsgStream.h:34
ApplicationMgr::m_svcMapping
Gaudi::Property< std::vector< std::string > > m_svcMapping
Definition: ApplicationMgr.h:228
MSG::FATAL
@ FATAL
Definition: IMessageSvc.h:25
Gaudi::PluginService::v1::SetDebug
GAUDIPS_API void SetDebug(int debugLevel)
Backward compatibility with Reflex.
Definition: PluginServiceV1.cpp:323
ApplicationMgr::m_svcOptMapping
Gaudi::Property< std::vector< std::string > > m_svcOptMapping
Definition: ApplicationMgr.h:229
ApplicationMgr::decodeExtSvcNameList
StatusCode decodeExtSvcNameList()
Definition: ApplicationMgr.cpp:929
gaudiComponentHelp.properties
properties
Definition: gaudiComponentHelp.py:62
ApplicationMgr::m_extSvcNameList
Gaudi::Property< std::vector< std::string > > m_extSvcNameList
Definition: ApplicationMgr.h:245
ApplicationMgr::m_eventLoopMgr
Gaudi::Property< std::string > m_eventLoopMgr
Definition: ApplicationMgr.h:258
std::vector::rend
T rend(T... args)
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:156
SmartIF::as
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:117
ApplicationMgr::m_extSvcCreates
Gaudi::Property< bool > m_extSvcCreates
Definition: ApplicationMgr.h:247
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:142
ApplicationMgr::m_createSvcNameList
Gaudi::Property< std::vector< std::string > > m_createSvcNameList
Definition: ApplicationMgr.h:279
ApplicationMgr::m_actHistory
Gaudi::Property< bool > m_actHistory
Definition: ApplicationMgr.h:264
MSG::Level
Level
Definition: IMessageSvc.h:25
ApplicationMgr::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Needed to locate the message service.
Definition: ApplicationMgr.h:149
PropertyHolder< CommonMessaging< implements< IAppMgrUI, Gaudi::Interfaces::IQueueingEventProcessor, IService, IStateful, INamedInterface, IProperty > > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
Definition: PropertyHolder.h:106
ApplicationMgr::m_monitoringHub
Gaudi::Monitoring::Hub m_monitoringHub
Definition: ApplicationMgr.h:238
MSG::VERBOSE
@ VERBOSE
Definition: IMessageSvc.h:25
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
std::endl
T endl(T... args)
ApplicationMgr::decodeCreateSvcNameList
StatusCode decodeCreateSvcNameList()
Definition: ApplicationMgr.cpp:895
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:86
ApplicationMgr::m_appName
Gaudi::Property< std::string > m_appName
Definition: ApplicationMgr.h:262
gaudirun.args
args
Definition: gaudirun.py:319
ProduceConsume.props
props
Definition: ProduceConsume.py:54
MSG::ALWAYS
@ ALWAYS
Definition: IMessageSvc.h:25
compareRootHistos.state
def state
Definition: compareRootHistos.py:468
std::map::begin
T begin(T... args)
MSG::NIL
@ NIL
Definition: IMessageSvc.h:25
Gaudi::StateMachine::INITIALIZED
@ INITIALIZED
Definition: StateMachine.h:25
MSG::ERROR
@ ERROR
Definition: IMessageSvc.h:25
Gaudi::Time::current
static Time current()
Returns the current time.
Definition: Time.cpp:119
ApplicationMgr::evtLoopPropertyHandler
void evtLoopPropertyHandler(Gaudi::Details::PropertyBase &theProp)
Definition: ApplicationMgr.cpp:876
ApplicationMgr::m_queueingProcessor
SmartIF< IQueueingEventProcessor > m_queueingProcessor
Reference to a queueing processing manager object.
Definition: ApplicationMgr.h:236
ApplicationMgr::m_outputLevel
Gaudi::Property< int > m_outputLevel
Definition: ApplicationMgr.h:261
ApplicationMgr::m_messageSvc
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
Definition: ApplicationMgr.h:232
ApplicationMgr::m_managers
ManagersMap m_managers
Map of known component managers.
Definition: ApplicationMgr.h:178
std::string::empty
T empty(T... args)
ApplicationMgr::m_state
Gaudi::StateMachine::State m_state
Internal State.
Definition: ApplicationMgr.h:225
ApplicationMgr::sysStart
StatusCode sysStart() override
Definition: ApplicationMgr.h:103
ApplicationMgr::m_jobOptionsPath
Gaudi::Property< std::string > m_jobOptionsPath
Definition: ApplicationMgr.h:252
ApplicationMgr::m_printAlgsSequence
Gaudi::Property< bool > m_printAlgsSequence
Definition: ApplicationMgr.h:311
std::stringstream::str
T str(T... args)
System::hostName
GAUDI_API const std::string & hostName()
Host name.
Definition: System.cpp:313
ApplicationMgr::extSvcNameListHandler
void extSvcNameListHandler(Gaudi::Details::PropertyBase &theProp)
Definition: ApplicationMgr.cpp:919
std::map::end
T end(T... args)
ApplicationMgr::GoToState
StatusCode GoToState(Gaudi::StateMachine::State state, bool ignoreFailures=false)
Reach a state from current state (whichever it is) going through the correct transitions.
Definition: ApplicationMgr.cpp:646
GAUDI_MAJOR_VERSION
#define GAUDI_MAJOR_VERSION
Definition: GAUDI_VERSION.h:8
ApplicationMgr::reinitialize
StatusCode reinitialize() override
Definition: ApplicationMgr.cpp:826
ApplicationMgr::m_loopCheck
Gaudi::Property< bool > m_loopCheck
Definition: ApplicationMgr.h:290
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
Gaudi::Interfaces::IQueueingEventProcessor::empty
virtual bool empty() const =0
Tell if the processor has events in the queues.
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:106
ApplicationMgr::m_environment
Gaudi::Property< std::map< std::string, std::string > > m_environment
Definition: ApplicationMgr.h:287
AlgorithmManager::typeAliases
AlgTypeAliasesMap & typeAliases()
Definition: AlgorithmManager.h:92
ApplicationMgr::m_pluginDebugLevel
Gaudi::Property< int > m_pluginDebugLevel
Definition: ApplicationMgr.h:266
ApplicationMgr::algManager
SmartIF< IAlgManager > & algManager()
Definition: ApplicationMgr.h:142
std::numeric_limits
Gaudi::Property< bool >
ApplicationMgr::m_classManager
SmartIF< DLLClassManager > m_classManager
Reference to the class manager.
Definition: ApplicationMgr.h:191
ApplicationMgr::start
StatusCode start() override
Definition: ApplicationMgr.cpp:460
ON_VERBOSE
#define ON_VERBOSE
Definition: ApplicationMgr.cpp:46
std::vector::rbegin
T rbegin(T... args)
ApplicationMgr::m_evtMax
Gaudi::Property< int > m_evtMax
Definition: ApplicationMgr.h:244
ApplicationMgr::m_targetState
Gaudi::StateMachine::State m_targetState
Internal State.
Definition: ApplicationMgr.h:226
ApplicationMgr::initialize
StatusCode initialize() override
Definition: ApplicationMgr.cpp:399
IProperty::setProperty
StatusCode setProperty(const Gaudi::Details::PropertyBase &p)
Set the property from a property.
Definition: IProperty.h:39
GAUDI_PATCH_VERSION
#define GAUDI_PATCH_VERSION
Definition: GAUDI_VERSION.h:10