All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ApplicationMgr Class Reference

The Application Manager class. More...

#include <src/ApplicationMgr/ApplicationMgr.h>

Inheritance diagram for ApplicationMgr:
Collaboration diagram for ApplicationMgr:

Public Types

typedef std::list< std::pair
< IService *, int > > 
ListSvc
 
typedef std::list< std::string > ListName
 
typedef std::vector< std::string > VectorName
 
- Public Types inherited from CommonMessaging< implements4< IAppMgrUI, IEventProcessor, IService, IStateful > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements4< IAppMgrUI, IEventProcessor, IService, IStateful >
typedef implements4 base_class
 Typedef to this class. More...
 
typedef extend_interfaces4
< IAppMgrUI, IEventProcessor,
IService, IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces4< IAppMgrUI, IEventProcessor, IService, IStateful >
typedef mpl::fold< typename
IAppMgrUI::iid::iids::type,
typename mpl::fold< typename
IEventProcessor::iid::iids::type,
typename mpl::fold< typename
IService::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type, mpl::insert
< mpl::_1, mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 

Public Member Functions

 ApplicationMgr (IInterface *=0)
 
virtual ~ApplicationMgr ()
 
virtual StatusCode queryInterface (const InterfaceID &iid, void **pinterface)
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual StatusCode run ()
 Run the complete job (from initialize to terminate) More...
 
virtual StatusCode configure ()
 Configure the job. More...
 
virtual StatusCode terminate ()
 Terminate the job. More...
 
virtual StatusCode initialize ()
 Initialize the job. More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode finalize ()
 Finalize the job. More...
 
virtual StatusCode nextEvent (int maxevt)
 Process the next maxevt events. More...
 
virtual const std::string & name () const
 This is needed to avoid ambiguous calls to name() More...
 
virtual StatusCode executeEvent (void *par)
 implementation of IEventProcessor::executeEvent(void*) More...
 
virtual StatusCode executeRun (int evtmax)
 implementation of IEventProcessor::executeRun(int) More...
 
virtual StatusCode stopRun ()
 implementation of IEventProcessor::stopRun() More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Start Service. More...
 
virtual StatusCode sysStop ()
 Stop Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-start the Service. More...
 
void SIGoHandler (Property &theProp)
 
void SIExitHandler (Property &theProp)
 
template<class I >
SmartIF< IComponentManager > & getManager ()
 
SmartIF< ISvcManager > & svcManager ()
 
SmartIF< IAlgManager > & algManager ()
 
virtual SmartIF< ISvcLocator > & serviceLocator () const
 Needed to locate the message service. More...
 
Property handlers
void evtLoopPropertyHandler (Property &theProp)
 
StatusCode decodeExtSvcNameList ()
 
StatusCode decodeCreateSvcNameList ()
 
void createSvcNameListHandler (Property &)
 
void extSvcNameListHandler (Property &theProp)
 
StatusCode decodeMultiThreadSvcNameList ()
 
void multiThreadSvcNameListHandler (Property &theProp)
 
StatusCode decodeDllNameList ()
 
void dllNameListHandler (Property &theProp)
 
void pluginDebugPropertyHandler (Property &theProp)
 
void initLoopCheckHndlr (Property &)
 
- Public Member Functions inherited from CommonMessaging< implements4< IAppMgrUI, IEventProcessor, IService, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces4< IAppMgrUI, IEventProcessor, IService, IStateful >
virtual ~extend_interfaces4 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IAppMgrUI
 DeclareInterfaceID (IAppMgrUI, 3, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IInterface
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IEventProcessor
 DeclareInterfaceID (IEventProcessor, 3, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 

Protected Types

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

Protected Member Functions

StatusCode declareMultiSvcType (const std::string &name, const std::string &type)
 declare one or more copies of svc type/name as determined by NoOfThreads More...
 
StatusCode addMultiSvc (const Gaudi::Utils::TypeNameString &typeName, int prio)
 add one or more copies of svc type/name as determined by NoOfThreads More...
 
void setServiceManager (ISvcManager *)
 
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...
 
- Protected Member Functions inherited from CommonMessaging< implements4< IAppMgrUI, IEventProcessor, IService, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Protected Attributes

ManagersMap m_managers
 Map of known component managers. More...
 
StringArrayProperty 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...
 
DLLClassManagerm_classManager
 Reference to the class manager. More...
 
SmartIF< ISvcLocatorm_svcLocator
 Reference to its own service locator. More...
 
IntegerProperty m_SIGo
 For SI's "Go" command via callback. More...
 
IntegerProperty m_SIExit
 For SI's "Exit" command via callback. More...
 
StringArrayProperty m_topAlgNameList
 List of top level algorithms names. More...
 
StringArrayProperty m_outStreamNameList
 List of output stream names. More...
 
StringProperty m_outStreamType
 Output stream type (obsolete?) More...
 
StringProperty m_messageSvcType
 MessageSvc type. More...
 
StringProperty m_jobOptionsSvcType
 JobOptionsSvc type. More...
 
ListSvc m_topSvcList
 List of top level services. More...
 
ListName m_topSvcNameList
 List of top level services names. More...
 
std::string m_name
 Name. More...
 
Gaudi::StateMachine::State m_state
 Internal State. More...
 
Gaudi::StateMachine::State m_targetState
 Internal State. More...
 
VectorName m_defServices
 Vector default services names. More...
 
VectorName m_svcMapping
 Default mapping of services. More...
 
VectorName m_svcOptMapping
 Default mapping of services. More...
 
PropertyMgrm_propertyMgr
 Reference to Property Manager. More...
 
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< IJobOptionsSvcm_jobOptionsSvc
 Reference to JobOption service. More...
 
int m_evtMax
 Number of events to be processed. More...
 
StringArrayProperty m_extSvcNameList
 List of external services names. More...
 
BooleanProperty m_extSvcCreates
 LHCb or ATLAS defn of "ExtSvc". More...
 
StringArrayProperty m_multiThreadSvcNameList
 List of external services names for which we want a copy per evt thread. More...
 
int m_noOfEvtThreads
 no of multiThreadSvc copies More...
 
StringArrayProperty m_dllNameList
 List of DDL's names. More...
 
std::string m_jobOptionsType
 Source type (e.g. dbase, file...) More...
 
std::string m_jobOptionsPath
 The "file" to look for properties. More...
 
std::string m_runableType
 Runable type. More...
 
std::string m_eventLoopMgr
 Processing manager type. More...
 
std::string m_evtsel
 Event selection. More...
 
std::string m_histPersName
 CGL: Name of the Hist Pers Svc. More...
 
int m_outputLevel
 Message output level. More...
 
std::string m_appName
 The name of the application. More...
 
std::string m_appVersion
 The version of the application. More...
 
bool m_actHistory
 Activate HistorySvc. More...
 
bool m_codeCheck
 Activate StatusCode checking. More...
 
IntegerProperty m_pluginDebugLevel
 Debug level for the plugin system. More...
 
StringArrayProperty m_createSvcNameList
 
BooleanProperty m_auditTools
 Defaults for auditors. More...
 
BooleanProperty m_auditSvcs
 
BooleanProperty m_auditAlgs
 
std::map< std::string,
std::string > 
m_environment
 Environment variables to set. More...
 
BooleanProperty m_loopCheck
 For ServiceMgr initialization loop checking. More...
 
BooleanProperty m_stopOnSignal
 Property to enable/disable the "stop on signal" service (enabled by default). More...
 
BooleanProperty m_stalledEventMonitoring
 Property to enable/disable the monitoring and reporting of stalled events (enabled by default). More...
 
bool m_propertiesPrint
 flag to activate the printout of properties More...
 
IntegerProperty m_returnCode
 Property to record the error conditions occurring during the running. More...
 
- Protected Attributes inherited from CommonMessaging< implements4< IAppMgrUI, IEventProcessor, IService, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Private Types

typedef CommonMessaging
< implements4< IAppMgrUI,
IEventProcessor, IService,
IStateful > > 
base_class
 

Private Attributes

std::vector< std::string > m_okDlls
 names of successfully loaded dlls More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. 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 46 of file ApplicationMgr.h.

Member Typedef Documentation

typedef std::list<std::string> ApplicationMgr::ListName

Definition at line 56 of file ApplicationMgr.h.

typedef std::list<std::pair<IService*,int> > ApplicationMgr::ListSvc

Definition at line 55 of file ApplicationMgr.h.

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 183 of file ApplicationMgr.h.

typedef std::vector<std::string> ApplicationMgr::VectorName

Definition at line 57 of file ApplicationMgr.h.

Constructor & Destructor Documentation

ApplicationMgr::ApplicationMgr ( IInterface = 0)

Definition at line 54 of file ApplicationMgr.cpp.

54  : base_class() {
55  // IInterface initialization
56  addRef(); // Initial count set to 1
57 
58  // Initialize two basic services: messagesvc & joboptions
59  m_messageSvc = 0;
60  m_jobOptionsSvc = 0;
61 
62  // Instantiate component managers
64  AlgorithmManager *algMgr = new AlgorithmManager(this);
66 
68 
69  // Instantiate internal services
70  // SvcLocator/Factory HAS to be already instantiated
71  m_classManager = new DLLClassManager(this);
72  m_propertyMgr = new PropertyMgr(this);
73 
74  m_name = "ApplicationMgr";
77 
79  m_propertyMgr->declareProperty("Exit", m_SIExit = 0 );
83  m_propertyMgr->declareProperty("ExtSvcCreates", m_extSvcCreates=true );
84 
86  m_propertyMgr->declareProperty("SvcOptMapping", m_svcOptMapping );
87 
90  m_propertyMgr->declareProperty("OutStreamType", m_outStreamType = "OutputStream" );
91  m_propertyMgr->declareProperty("MessageSvcType",m_messageSvcType= "MessageSvc" );
92  m_propertyMgr->declareProperty("JobOptionsSvcType",
93  m_jobOptionsSvcType = "JobOptionsSvc" );
94  m_propertyMgr->declareProperty( s_runable, m_runableType = "AppMgrRunable");
95  m_propertyMgr->declareProperty( s_eventloop, m_eventLoopMgr = "EventLoopMgr");
96 
97  m_propertyMgr->declareProperty("HistogramPersistency", m_histPersName="NONE");
98 
99  // Declare Job Options Service properties and set default
100  m_propertyMgr->declareProperty("JobOptionsType", m_jobOptionsType = "FILE");
101  m_propertyMgr->declareProperty("JobOptionsPath", m_jobOptionsPath = "");
102  m_propertyMgr->declareProperty("EvtMax", m_evtMax = -1);
105 
107  m_propertyMgr->declareProperty("NoOfThreads", m_noOfEvtThreads = 0);
108  m_propertyMgr->declareProperty("AppName", m_appName = "ApplicationMgr");
109  m_propertyMgr->declareProperty("AppVersion", m_appVersion = "");
110 
111  m_propertyMgr->declareProperty("AuditTools", m_auditTools = false);
112  m_propertyMgr->declareProperty("AuditServices", m_auditSvcs = false);
113  m_propertyMgr->declareProperty("AuditAlgorithms", m_auditAlgs = false);
114 
115  m_propertyMgr->declareProperty("ActivateHistory", m_actHistory = false);
116  m_propertyMgr->declareProperty("StatusCodeCheck", m_codeCheck = false);
117 
119 
120  // ServiceMgr Initialization loop checking
121  m_propertyMgr->declareProperty("InitializationLoopCheck", m_loopCheck = true)
123  svcManager()->setLoopCheckEnabled(m_loopCheck);
124 
125  // Flag to activate the printout of properties
127  ( "PropertiesPrint",
128  m_propertiesPrint = false,
129  "Flag to activate the printout of properties" );
130 
131  m_propertyMgr->declareProperty("PluginDebugLevel", m_pluginDebugLevel = 0 );
132 
133  m_propertyMgr->declareProperty("StopOnSignal", m_stopOnSignal = false,
134  "Flag to enable/disable the signal handler that schedule a stop of the event loop");
135 
136  m_propertyMgr->declareProperty("StalledEventMonitoring", m_stalledEventMonitoring = false,
137  "Flag to enable/disable the monitoring and reporting of stalled events");
138 
140  "Return code of the application. Set internally in case of error conditions.");
141 
142  m_propertyMgr->declareProperty("AlgTypeAliases", algMgr->typeAliases(),
143  "Aliases of algorithm types, to replace an algorithm type for every instance");
144 
145  // Add action handlers to the appropriate properties
152  m_svcMapping.push_back("EvtDataSvc/EventDataSvc");
153  m_svcMapping.push_back("DetDataSvc/DetectorDataSvc");
154  m_svcMapping.push_back("HistogramSvc/HistogramDataSvc");
155  m_svcMapping.push_back("HbookCnv::PersSvc/HbookHistSvc");
156  m_svcMapping.push_back("RootHistCnv::PersSvc/RootHistSvc");
157  m_svcMapping.push_back("EvtPersistencySvc/EventPersistencySvc");
158  m_svcMapping.push_back("DetPersistencySvc/DetectorPersistencySvc");
159  m_svcMapping.push_back("HistogramPersistencySvc/HistogramPersistencySvc");
160 }
Gaudi::StateMachine::State m_targetState
Internal State.
The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms.
std::string m_jobOptionsType
Source type (e.g. dbase, file...)
StringArrayProperty m_createSvcNameList
StringArrayProperty m_outStreamNameList
List of output stream names.
StringProperty m_messageSvcType
MessageSvc type.
int m_noOfEvtThreads
no of multiThreadSvc copies
ManagersMap m_managers
Map of known component managers.
unsigned long id() const
get the interface identifier
Definition: IInterface.h:78
std::string m_histPersName
CGL: Name of the Hist Pers Svc.
bool m_codeCheck
Activate StatusCode checking.
friend class ServiceManager
Definition: IService.h:20
StringProperty m_outStreamType
Output stream type (obsolete?)
std::string m_appName
The name of the application.
IntegerProperty m_pluginDebugLevel
Debug level for the plugin system.
std::map< std::string, std::string > m_environment
Environment variables to set.
StringArrayProperty m_dllNameList
List of DDL's names.
SmartIF< IJobOptionsSvc > m_jobOptionsSvc
Reference to JobOption service.
AlgTypeAliasesMap & typeAliases()
Property manager helper class.
Definition: PropertyMgr.h:38
CommonMessaging< implements4< IAppMgrUI, IEventProcessor, IService, IStateful > > base_class
SmartIF< ISvcManager > & svcManager()
int m_outputLevel
Message output level.
DLLClassManager * m_classManager
Reference to the class manager.
PropertyMgr * m_propertyMgr
Reference to Property Manager.
int m_evtMax
Number of events to be processed.
virtual void declareUpdateHandler(PropertyCallbackFunctor *pf)
set new callback for update
Definition: Property.cpp:141
IntegerProperty m_returnCode
Property to record the error conditions occurring during the running.
std::string m_jobOptionsPath
The "file" to look for properties.
Property * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
Definition: PropertyMgr.h:177
BooleanProperty m_extSvcCreates
LHCb or ATLAS defn of "ExtSvc".
VectorName m_svcMapping
Default mapping of services.
SmartIF< ISvcLocator > m_svcLocator
Reference to its own service locator.
bool m_actHistory
Activate HistorySvc.
BooleanProperty m_loopCheck
For ServiceMgr initialization loop checking.
StringArrayProperty m_topAlgNameList
List of top level algorithms names.
std::string m_evtsel
Event selection.
StringArrayProperty m_multiThreadSvcNameList
List of external services names for which we want a copy per evt thread.
VectorName m_svcOptMapping
Default mapping of services.
std::string m_runableType
Runable type.
void initLoopCheckHndlr(Property &)
bool m_propertiesPrint
flag to activate the printout of properties
void SIGoHandler(Property &theProp)
StringArrayProperty m_extSvcNameList
List of external services names.
StringProperty m_jobOptionsSvcType
JobOptionsSvc type.
void evtLoopPropertyHandler(Property &theProp)
BooleanProperty m_stalledEventMonitoring
Property to enable/disable the monitoring and reporting of stalled events (enabled by default)...
std::string m_eventLoopMgr
Processing manager type.
void SIExitHandler(Property &theProp)
std::string m_name
Name.
IntegerProperty m_SIGo
For SI's "Go" command via callback.
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
BooleanProperty m_auditTools
Defaults for auditors.
BooleanProperty m_auditAlgs
Gaudi::StateMachine::State m_state
Internal State.
void pluginDebugPropertyHandler(Property &theProp)
BooleanProperty m_stopOnSignal
Property to enable/disable the "stop on signal" service (enabled by default).
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
Definition: IInterface.h:171
std::string m_appVersion
The version of the application.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
BooleanProperty m_auditSvcs
IntegerProperty m_SIExit
For SI's "Exit" command via callback.
ApplicationMgr::~ApplicationMgr ( )
virtual

Definition at line 165 of file ApplicationMgr.cpp.

165  {
168  if( m_messageSvc ) m_messageSvc->release();
169  if( m_jobOptionsSvc ) m_jobOptionsSvc->release();
170 }
SmartIF< IJobOptionsSvc > m_jobOptionsSvc
Reference to JobOption service.
DLLClassManager * m_classManager
Reference to the class manager.
PropertyMgr * m_propertyMgr
Reference to Property Manager.
virtual unsigned long release()=0
Release Interface instance.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.

Member Function Documentation

StatusCode ApplicationMgr::addMultiSvc ( const Gaudi::Utils::TypeNameString typeName,
int  prio 
)
protected

add one or more copies of svc type/name as determined by NoOfThreads

Definition at line 1171 of file ApplicationMgr.cpp.

1172  {
1176  if (0 == m_noOfEvtThreads) {
1177  result = svcManager()->addService(typeName, prio);
1178  // result = svcManager()->addService(name, type, prio); // CHECKME???
1179  if( result.isFailure() ) {
1180  log << MSG::ERROR << "addMultiSvc: Cannot add service "
1181  << typeName.type() << "/" << typeName.name() << endmsg;
1182  } else {
1183  ON_VERBOSE
1184  log << MSG::VERBOSE << "addMultiSvc: added service "
1185  << typeName.type() << "/" << typeName.name() << endmsg;
1186  }
1187  } else {
1188  for(int iCopy=0; iCopy<m_noOfEvtThreads; ++iCopy) {
1189  const std::string &type = typeName.type();
1190  std::string thrName(typeName.name() + getGaudiThreadIDfromID(iCopy));
1191  result = svcManager()->addService(TypeNameString(thrName, type), prio);
1192  if( result.isFailure() ) {
1193  log << MSG::ERROR << "addMultiSvc: Cannot add service "
1194  << type << "/" << thrName << endmsg;
1195  } else {
1196  ON_VERBOSE
1197  log << MSG::VERBOSE << "addMultiSvc: added service "
1198  << type << "/" << thrName << endmsg;
1199  }
1200  }
1201  }
1202  return result;
1203 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
int m_noOfEvtThreads
no of multiThreadSvc copies
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
SmartIF< ISvcManager > & svcManager()
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
string type
Definition: gaudirun.py:126
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
GAUDI_API std::string getGaudiThreadIDfromID(int iCopy)
helper function to extract Gaudi Thread ID from thread copy number
Definition: ThreadGaudi.cpp:18
const std::string & type() const
std::string m_name
Name.
#define ON_VERBOSE
const std::string & name() const
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
SmartIF<IAlgManager>& ApplicationMgr::algManager ( )
inline

Definition at line 148 of file ApplicationMgr.h.

148  {
149  // Cache the casted pointer to IAlgManager
150  if (!m_algManager) {
151  m_algManager = getManager<IAlgorithm>();
152  }
153  return m_algManager;
154  }
SmartIF< IAlgManager > m_algManager
Cached pointer to the manager of algorithms.
StatusCode ApplicationMgr::configure ( )
virtual

Configure the job.

Implements IAppMgrUI.

Definition at line 307 of file ApplicationMgr.cpp.

307  {
308  // Check if the state is compatible with the transition
309  MsgStream tlog( m_messageSvc, name() );
311  tlog << MSG::INFO << "Already Configured" << endmsg;
312  return StatusCode::SUCCESS;
313  }
314  else if( Gaudi::StateMachine::OFFLINE != m_state ) {
315  tlog << MSG::FATAL
316  << "configure: Invalid state \"" << m_state << "\"" << endmsg;
317  return StatusCode::FAILURE;
318  }
320 
321  // Reset application return code.
323 
324  StatusCode sc;
325  sc = i_startup();
326  if ( !sc.isSuccess() ) {
327  return sc;
328  }
329 
331 
332  // Get my own options using the Job options service
333  if (log.level() <= MSG::DEBUG)
334  log << MSG::DEBUG << "Getting my own properties" << endmsg;
335  sc = m_jobOptionsSvc->setMyProperties( name(), m_propertyMgr );
336  if( !sc.isSuccess() ) {
337  log << MSG::WARNING << "Problems getting my properties from JobOptionsSvc"
338  << endmsg;
339  return sc;
340  }
341 
342  // Check current outputLevel to eventually inform the MessageSvc
343  if( m_outputLevel != MSG::NIL && !m_appName.empty() ) {
344  assert(m_messageSvc != 0);
345  m_messageSvc->setOutputLevel( name(), m_outputLevel );
346  // Print a welcome message
347  log << MSG::ALWAYS
348  << std::endl
349  << "=================================================================="
350  << "=================================================================="
351  << std::endl
352  << " "
353  << " Welcome to " << m_appName;
354 
355  if( "" != m_appVersion ) {
356  log << MSG::ALWAYS << " version " << m_appVersion;
357  }
358  else {
359  log << MSG::ALWAYS
360  << " (GaudiCoreSvc "
361  << "v" << GAUDICORESVC_MAJOR_VERSION
362  << "r" << GAUDICORESVC_MINOR_VERSION
363 #if GAUDICORESVC_PATCH_VERSION
364  << "p" << GAUDICORESVC_PATCH_VERSION
365 #endif
366  << ")";
367  }
368 
369  // Add the host name and current time to the message
370  log << MSG::ALWAYS
371  << std::endl
372  << " "
373  << " running on " << System::hostName()
374  << " on " << Gaudi::Time::current().format(true) << std::endl
375  << "=================================================================="
376  << "=================================================================="
377  << endmsg;
378  }
379 
380  // print all own properties if the options "PropertiesPrint" is set to true
381  if ( m_propertiesPrint )
382  {
383  typedef std::vector<Property*> Properties;
384  const Properties& properties = m_propertyMgr->getProperties() ;
385  log << MSG::ALWAYS
386  << "List of ALL properties of "
387  << System::typeinfoName ( typeid( *this ) ) << "/" << this->name()
388  << " #properties = " << properties.size() << endmsg ;
389  for ( Properties::const_iterator property = properties.begin() ;
390  properties.end() != property ; ++property )
391  { log << "Property ['Name': Value] = " << ( **property) << endmsg ; }
392  }
393 
394  // Check if StatusCode need to be checked
395  if (m_codeCheck) {
397  sc = addMultiSvc("StatusCodeSvc", -9999);
398  if ( sc.isFailure() ) {
399  log << MSG::FATAL << "Error adding StatusCodeSvc for multiple threads" << endmsg;
400  return StatusCode::FAILURE;
401  }
402  } else {
404  }
405 
406  // set the requested environment variables
407  std::map<std::string,std::string>::iterator var;
408  for ( var = m_environment.begin(); var != m_environment.end(); ++var ) {
409  const std::string &name = var->first;
410  const std::string &value = var->second;
411  std::string old = System::getEnv(name.c_str());
412  const MSG::Level lvl = (!old.empty() && (old != "UNKNOWN" ))
413  ? MSG::WARNING
414  : MSG::DEBUG;
415  if (UNLIKELY(m_outputLevel <= lvl))
416  log << lvl << "Setting " << name << " = " << value << endmsg;
417  System::setEnv(name,value);
418  }
419 
420  //Declare Service Types
421  VectorName::const_iterator j;
422  for(j=m_svcMapping.begin(); j != m_svcMapping.end(); ++j) {
424  if ( declareMultiSvcType(itm.name(), itm.type()).isFailure() ) {
425  log << MSG::ERROR << "configure: declaring svc type:'" << *j << "' failed." << endmsg;
426  return StatusCode::FAILURE;
427  }
428  }
429  for(j=m_svcOptMapping.begin(); j != m_svcOptMapping.end(); ++j) {
431  if ( declareMultiSvcType(itm.name(), itm.type()).isFailure() ) {
432  log << MSG::ERROR << "configure: declaring svc type:'" << *j << "' failed." << endmsg;
433  return StatusCode::FAILURE;
434  }
435  }
436 
437  //--------------------------------------------------------------------------
438  // Declare other Services and Algorithms by loading DLL's
439  sc = decodeDllNameList( );
440  if ( sc.isFailure( ) ) {
441  log << MSG::ERROR << "Failure loading declared DLL's" << endmsg;
442  return sc;
443  }
444 
445  //--------------------------------------------------------------------------
446  // Deal with the services explicitly declared by the user.
447  sc = decodeExtSvcNameList();
448  if ( sc.isFailure( ) ) {
449  log << MSG::ERROR << "Failure during external service association" << endmsg;
450  return sc;
451  }
452 
454  if ( sc.isFailure( ) ) {
455  log << MSG::ERROR << "Failure during multi thread service creation"
456  << endmsg;
457  return sc;
458  }
459 
461  if ( sc.isFailure( ) ) {
462  log << MSG::ERROR << "Failure during external service creation" << endmsg;
463  return sc;
464  }
465 
466 
467  //--------------------------------------------------------------------------
468  // Retrieve intrinsic services. If needed configure them.
469  //--------------------------------------------------------------------------
471  sc = addMultiSvc(evtloop_item, ServiceManager::DEFAULT_SVC_PRIORITY*10);
472  if( !sc.isSuccess() ) {
473  log << MSG::FATAL << "Error adding :" << m_eventLoopMgr << endmsg;
474  return sc;
475  }
476 
477  if (m_noOfEvtThreads == 0) {
479  if( !m_runable.isValid() ) {
480  log << MSG::FATAL
481  << "Error retrieving Runable:" << m_runableType
482  << "\n Check option ApplicationMgr." << s_runable << endmsg;
483  return sc;
484  }
485  m_processingMgr = m_svcLocator->service(evtloop_item);
486  if( !m_processingMgr.isValid() ) {
487  log << MSG::FATAL
488  << "Error retrieving Processing manager:" << m_eventLoopMgr
489  << "\n Check option ApplicationMgr." << s_eventloop
490  << "\n No events will be processed." << endmsg;
491  return sc;
492  }
493  }
494 
495  // Establish Update Handlers for ExtSvc and DLLs Properties
497  this);
499  this);
503  this );
504 
505  if (m_actHistory) {
506  // Create HistorySvc with a priority to ensure it's initialized last, finalized first
507  sc = svcManager()->addService("HistorySvc",std::numeric_limits<int>::max());
508  if ( sc.isFailure() ) {
509  log << MSG::FATAL << "Error adding HistorySvc" << endmsg;
510  return StatusCode::FAILURE;
511  }
512 
513  if (m_noOfEvtThreads > 0) {
514  sc = addMultiSvc("HistorySvc",std::numeric_limits<int>::max());
515  if ( sc.isFailure() ) {
516  log << MSG::FATAL << "Error adding HistorySvc for multiple threads"
517  << endmsg;
518  return StatusCode::FAILURE;
519  }
520  }
521  }
522 
523  log << MSG::INFO << "Application Manager Configured successfully" << endmsg;
525  return StatusCode::SUCCESS;
526 }
void dllNameListHandler(Property &theProp)
Gaudi::StateMachine::State m_targetState
Internal State.
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:608
StringArrayProperty m_createSvcNameList
#define UNLIKELY(x)
Definition: Kernel.h:127
void createSvcNameListHandler(Property &)
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
StatusCode decodeDllNameList()
GAUDI_API int setEnv(const std::string &name, const std::string &value, int overwrite=1)
Set an environment variables.
Definition: System.cpp:746
SmartIF< IRunable > m_runable
Reference to the runable object.
tuple itm
Definition: ana.py:57
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
int m_noOfEvtThreads
no of multiThreadSvc copies
bool m_codeCheck
Activate StatusCode checking.
static Time current(void)
Returns the current time.
Definition: Time.cpp:114
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
std::string m_appName
The name of the application.
static GAUDI_API void enableChecking()
Definition: StatusCode.cpp:19
std::map< std::string, std::string > m_environment
Environment variables to set.
StringArrayProperty m_dllNameList
List of DDL's names.
SmartIF< IJobOptionsSvc > m_jobOptionsSvc
Reference to JobOption service.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
SmartIF< IEventProcessor > m_processingMgr
Reference to processing manager object.
SmartIF< ISvcManager > & svcManager()
int m_outputLevel
Message output level.
PropertyMgr * m_propertyMgr
Reference to Property Manager.
StatusCode addMultiSvc(const Gaudi::Utils::TypeNameString &typeName, int prio)
add one or more copies of svc type/name as determined by NoOfThreads
virtual void declareUpdateHandler(PropertyCallbackFunctor *pf)
set new callback for update
Definition: Property.cpp:141
IntegerProperty m_returnCode
Property to record the error conditions occurring during the running.
void multiThreadSvcNameListHandler(Property &theProp)
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
VectorName m_svcMapping
Default mapping of services.
SmartIF< ISvcLocator > m_svcLocator
Reference to its own service locator.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
bool m_actHistory
Activate HistorySvc.
static const int DEFAULT_SVC_PRIORITY
Definition: ISvcManager.h:34
StringArrayProperty m_multiThreadSvcNameList
List of external services names for which we want a copy per evt thread.
VectorName m_svcOptMapping
Default mapping of services.
std::string m_runableType
Runable type.
StatusCode decodeExtSvcNameList()
const std::vector< Property * > & getProperties() const
get all properties
GAUDI_API const std::string & hostName()
Host name.
Definition: System.cpp:427
bool m_propertiesPrint
flag to activate the printout of properties
StringArrayProperty m_extSvcNameList
List of external services names.
StatusCode decodeCreateSvcNameList()
std::string m_eventLoopMgr
Processing manager type.
StatusCode i_startup()
Internal startup routine.
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:23
Gaudi::StateMachine::State m_state
Internal State.
StatusCode decodeMultiThreadSvcNameList()
void extSvcNameListHandler(Property &theProp)
std::string m_appVersion
The version of the application.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:280
StatusCode declareMultiSvcType(const std::string &name, const std::string &type)
declare one or more copies of svc type/name as determined by NoOfThreads
void ApplicationMgr::createSvcNameListHandler ( Property )

Definition at line 1020 of file ApplicationMgr.cpp.

1020  {
1021  if ( !(decodeCreateSvcNameList()).isSuccess() ) {
1022  throw GaudiException("Failed to create ext services",
1023  "MinimalEventLoopMgr::createSvcNameListHandler",
1025  }
1026 }
Define general base for Gaudi exception.
StatusCode decodeCreateSvcNameList()
StatusCode ApplicationMgr::declareMultiSvcType ( const std::string &  name,
const std::string &  type 
)
protected

declare one or more copies of svc type/name as determined by NoOfThreads

Definition at line 1138 of file ApplicationMgr.cpp.

1139  {
1142  if (0 == m_noOfEvtThreads) {
1143  result = svcManager()->declareSvcType(name, type);
1144  if( result.isFailure() ) {
1145  log << MSG::ERROR << "declareMultiSvcType: Cannot declare service "
1146  << type << "/" << name << endmsg;
1147  } else {
1148  ON_VERBOSE
1149  log << MSG::VERBOSE << "declareMultiSvcType: declared service "
1150  << type << "/" << name << endmsg;
1151  }
1152  } else {
1153  for(int iCopy=0; iCopy<m_noOfEvtThreads; ++iCopy) {
1154  std::string thrName(name + getGaudiThreadIDfromID(iCopy));
1155  result = svcManager()->declareSvcType(thrName, type);
1156  if( result.isFailure() ) {
1157  log << MSG::ERROR << "declareMultiSvcType: Cannot declare service "
1158  << type << "/" << thrName << endmsg;
1159  } else {
1160  ON_VERBOSE
1161  log << MSG::VERBOSE << "declareMultiSvcType: declared service "
1162  << type << "/" << thrName << endmsg;
1163  }
1164  }
1165  }
1166  return result;
1167 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
int m_noOfEvtThreads
no of multiThreadSvc copies
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
SmartIF< ISvcManager > & svcManager()
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
string type
Definition: gaudirun.py:126
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
GAUDI_API std::string getGaudiThreadIDfromID(int iCopy)
helper function to extract Gaudi Thread ID from thread copy number
Definition: ThreadGaudi.cpp:18
std::string m_name
Name.
#define ON_VERBOSE
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode ApplicationMgr::decodeCreateSvcNameList ( )

Definition at line 1030 of file ApplicationMgr.cpp.

1030  {
1032  const std::vector<std::string>& theNames = m_createSvcNameList.value( );
1033  VectorName::const_iterator it(theNames.begin());
1034  VectorName::const_iterator et(theNames.end());
1035  while(result.isSuccess() && it != et) {
1037  if( (result = svcManager()->addService(item, ServiceManager::DEFAULT_SVC_PRIORITY) ).isFailure()) {
1039  log << MSG::ERROR << "decodeCreateSvcNameList: Cannot create service "
1040  << item.type() << "/" << item.name() << endmsg;
1041  } else {
1042  ON_DEBUG {
1044  log << MSG::DEBUG << "decodeCreateSvcNameList: Created service "
1045  << item.type() << "/" << item.name() << endmsg;
1046  }
1047  }
1048  }
1049  return result;
1050 }
StringArrayProperty m_createSvcNameList
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
SmartIF< ISvcManager > & svcManager()
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
#define ON_DEBUG
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
static const int DEFAULT_SVC_PRIORITY
Definition: ISvcManager.h:34
const TYPE & value() const
explicit conversion
Definition: Property.h:355
tuple item
print s1,s2
Definition: ana.py:146
std::string m_name
Name.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode ApplicationMgr::decodeDllNameList ( )

Definition at line 1219 of file ApplicationMgr.cpp.

1219  {
1220 
1223 
1224  // Clean up multiple entries from DLL list
1225  // -------------------------------------------------------------------------
1226  std::vector<std::string> newList;
1227  std::map<std::string,unsigned int> dllInList, duplicateList;
1228  {for ( std::vector<std::string>::const_iterator it = m_dllNameList.value().begin();
1229  it != m_dllNameList.value().end(); ++it ) {
1230  if ( 0 == dllInList[*it] ) {
1231  newList.push_back(*it); // first instance of this module
1232  } else { ++duplicateList[*it]; } // module listed multiple times
1233  ++dllInList[*it]; // increment count for this module
1234  }}
1235  //m_dllNameList = newList; // update primary list to new, filtered list (do not use the
1236  // property itself otherwise we get called again infinitely)
1237  // List modules that were in there twice..
1238  ON_DEBUG if ( !duplicateList.empty() ) {
1239  log << MSG::DEBUG << "Removed duplicate entries for modules : ";
1240  for ( std::map<std::string,unsigned int>::const_iterator it = duplicateList.begin();
1241  it != duplicateList.end(); ++it ) {
1242  log << it->first << "(" << 1+it->second << ")";
1243  if ( it != --duplicateList.end() ) log << ", ";
1244  }
1245  log << endmsg;
1246  }
1247  // -------------------------------------------------------------------------
1248 
1249  const std::vector<std::string>& theNames = newList;
1250 
1251  // only load the new dlls or previously failed dlls
1252  ON_DEBUG log << MSG::DEBUG << "Loading declared DLL's" << endmsg;
1253 
1254  std::vector<std::string> successNames, failNames;
1255  std::vector<std::string>::const_iterator it;
1256 
1257  for (it = theNames.begin(); it != theNames.end(); it++) {
1258  if (std::find (m_okDlls.rbegin(), m_okDlls.rend(), *it) == m_okDlls.rend()){
1259  // found a new module name
1260  StatusCode status = m_classManager->loadModule( (*it) );
1261  if( status.isFailure() ) {
1262  failNames.push_back(*it);
1263  result = StatusCode::FAILURE;
1264  }
1265  else {
1266  successNames.push_back(*it);
1267  }
1268  }
1269  }
1270 
1271  // report back to the user and store the names of the succesfully loaded dlls
1272  if ( !successNames.empty() ) {
1273  log << MSG::INFO << "Successfully loaded modules : ";
1274  for (it = successNames.begin(); it != successNames.end(); it++) {
1275  log<< (*it);
1276  if( (it+1) != successNames.end()) log << ", ";
1277  // save name
1278  m_okDlls.push_back( *it );
1279  }
1280  log << endmsg;
1281  }
1282 
1283  if ( result == StatusCode::FAILURE ) {
1284  log << MSG::WARNING << "Failed to load modules: ";
1285  for (it = failNames.begin(); it != failNames.end(); it++) {
1286  log<< (*it);
1287  if( (it+1) != failNames.end()) log << ", ";
1288  }
1289  log << endmsg;
1290  }
1291  return result;
1292 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
std::vector< std::string > m_okDlls
names of successfully loaded dlls
StringArrayProperty m_dllNameList
List of DDL's names.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
DLLClassManager * m_classManager
Reference to the class manager.
#define ON_DEBUG
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
const TYPE & value() const
explicit conversion
Definition: Property.h:355
std::string m_name
Name.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
virtual StatusCode loadModule(const std::string &module, bool fireIncident=true)
Declare a sharable library to be used for creating instances of a given algorithm type...
StatusCode ApplicationMgr::decodeExtSvcNameList ( )

Definition at line 1066 of file ApplicationMgr.cpp.

1066  {
1068 
1069  std::vector<std::string> theNames = m_extSvcNameList.value( );
1070 
1071  VectorName::const_iterator it(theNames.begin());
1072  VectorName::const_iterator et(theNames.end());
1073  while(result.isSuccess() && it != et) {
1075  if (m_extSvcCreates == true) {
1076  if ( (result = svcManager()->addService(item, ServiceManager::DEFAULT_SVC_PRIORITY)).isFailure()) {
1078  log << MSG::ERROR << "decodeExtSvcNameList: Cannot create service "
1079  << item.type() << "/" << item.name() << endmsg;
1080  }
1081  } else {
1082  if( ( result = svcManager()->declareSvcType(item.name(),
1083  item.type()) ).isFailure()) {
1085  log << MSG::ERROR << "decodeExtSvcNameList: Cannot declare service "
1086  << item.type() << "/" << item.name() << endmsg;
1087  }
1088  }
1089  }
1090  return result;
1091 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
SmartIF< ISvcManager > & svcManager()
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
BooleanProperty m_extSvcCreates
LHCb or ATLAS defn of "ExtSvc".
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
static const int DEFAULT_SVC_PRIORITY
Definition: ISvcManager.h:34
const TYPE & value() const
explicit conversion
Definition: Property.h:355
StringArrayProperty m_extSvcNameList
List of external services names.
tuple item
print s1,s2
Definition: ana.py:146
std::string m_name
Name.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode ApplicationMgr::decodeMultiThreadSvcNameList ( )

Definition at line 1108 of file ApplicationMgr.cpp.

1108  {
1110  const std::vector<std::string>& theNames = m_multiThreadSvcNameList.value( );
1111  for(int iCopy=0; iCopy<m_noOfEvtThreads; ++iCopy) {
1112  for (VectorName::const_iterator it = theNames.begin();
1113  it != theNames.end();
1114  ++it) {
1117  //FIXME SHOULD CLONE?
1118  if( result.isFailure() ) {
1120  log << MSG::ERROR
1121  << "decodeMultiThreadSvcNameList: Cannot create service "
1122  << item.type() << "/" << item.name() << endmsg;
1123  } else {
1124  ON_VERBOSE {
1126  log << MSG::VERBOSE
1127  << "decodeMultiThreadSvcNameList: created service "
1128  << item.type() << "/" << item.name() << endmsg;
1129  }
1130  }
1131  }
1132  }
1133  return result;
1134 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
int m_noOfEvtThreads
no of multiThreadSvc copies
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
StatusCode addMultiSvc(const Gaudi::Utils::TypeNameString &typeName, int prio)
add one or more copies of svc type/name as determined by NoOfThreads
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
static const int DEFAULT_SVC_PRIORITY
Definition: ISvcManager.h:34
const TYPE & value() const
explicit conversion
Definition: Property.h:355
StringArrayProperty m_multiThreadSvcNameList
List of external services names for which we want a copy per evt thread.
tuple item
print s1,s2
Definition: ana.py:146
std::string m_name
Name.
#define ON_VERBOSE
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
void ApplicationMgr::dllNameListHandler ( Property theProp)

Definition at line 1208 of file ApplicationMgr.cpp.

1208  {
1209  if ( !(decodeDllNameList( )).isSuccess() ) {
1210  throw GaudiException("Failed to load DLLs.",
1211  "MinimalEventLoopMgr::dllNameListHandler",
1213  }
1214 }
Define general base for Gaudi exception.
StatusCode decodeDllNameList()
void ApplicationMgr::evtLoopPropertyHandler ( Property theProp)

Definition at line 1008 of file ApplicationMgr.cpp.

1008  {
1009  if ( m_processingMgr.isValid() ) {
1011  if ( props.isValid() ) {
1012  props->setProperty( p ).ignore();
1013  }
1014  }
1015 }
SmartIF< IEventProcessor > m_processingMgr
Reference to processing manager object.
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
StatusCode ApplicationMgr::executeEvent ( void *  par)
virtual

implementation of IEventProcessor::executeEvent(void*)

Implements IEventProcessor.

Definition at line 882 of file ApplicationMgr.cpp.

882  {
885  if ( m_processingMgr.isValid() ) {
886  return m_processingMgr->executeEvent(par);
887  }
888  }
889  log << MSG::FATAL << "executeEvent: Invalid state \"" << FSMState() << "\""
890  <<endmsg;
891  return StatusCode::FAILURE;
892 }
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IEventProcessor > m_processingMgr
Reference to processing manager object.
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode ApplicationMgr::executeRun ( int  evtmax)
virtual

implementation of IEventProcessor::executeRun(int)

Implements IEventProcessor.

Definition at line 897 of file ApplicationMgr.cpp.

897  {
900  if ( m_processingMgr.isValid() ) {
901  return m_processingMgr->executeRun(evtmax);
902  }
903  log << MSG::WARNING << "No EventLoop Manager specified " << endmsg;
904  return StatusCode::SUCCESS;
905  }
906  log << MSG::FATAL << "executeRun: Invalid state \"" << FSMState() << "\""
907  << endmsg;
908  return StatusCode::FAILURE;
909 }
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IEventProcessor > m_processingMgr
Reference to processing manager object.
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
void ApplicationMgr::extSvcNameListHandler ( Property theProp)

Definition at line 1055 of file ApplicationMgr.cpp.

1055  {
1056  if ( !(decodeExtSvcNameList( )).isSuccess() ) {
1057  throw GaudiException("Failed to declare ext services",
1058  "MinimalEventLoopMgr::extSvcNameListHandler",
1060  }
1061 }
Define general base for Gaudi exception.
StatusCode decodeExtSvcNameList()
StatusCode ApplicationMgr::finalize ( )
virtual

Finalize the job.

Implements IAppMgrUI.

Definition at line 676 of file ApplicationMgr.cpp.

676  {
679  log << MSG::INFO << "Already Finalized" << endmsg;
680  return StatusCode::SUCCESS;
681  }
683  log << MSG::FATAL << "finalize: Invalid state \"" << m_state << "\""
684  << endmsg;
685  return StatusCode::FAILURE;
686  }
688 
689  // disable message suppression in finalize
690  m_svcLocator->service<IProperty>("MessageSvc")->setProperty(BooleanProperty("enableSuppression", false)).ignore();
691 
692  // Finalize independently managed Algorithms
693  StatusCode sc = algManager()->finalize();
694  if (sc.isFailure()) {
695  log << MSG::WARNING << "Failed to finalize an algorithm." << endmsg;
697  }
698 
699  // Finalize all Services
700  sc = svcManager()->finalize();
701  if (sc.isFailure()) {
702  log << MSG::WARNING << "Failed to finalize a service." << endmsg;
704  }
705 
706  //svcManager()->removeService( (IService*) m_processingMgr.get() );
707  //svcManager()->removeService( (IService*) m_runable.get() );
708 
709  if (m_codeCheck) {
711  }
712 
713  if (sc.isSuccess()) {
714  log << MSG::INFO << "Application Manager Finalized successfully" << endmsg;
715  } else {
716  log << MSG::ERROR << "Application Manager failed to finalize" << endmsg;
717  }
718 
720  return sc;
721 }
Gaudi::StateMachine::State m_targetState
Internal State.
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1212
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
bool m_codeCheck
Activate StatusCode checking.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
SimpleProperty< bool > BooleanProperty
Definition: Property.h:727
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
SmartIF< ISvcManager > & svcManager()
const int FinalizationFailure
Error codes for operation failures.
Definition: AppReturnCode.h:32
IntegerProperty m_returnCode
Property to record the error conditions occurring during the running.
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
SmartIF< ISvcLocator > m_svcLocator
Reference to its own service locator.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:23
Gaudi::StateMachine::State m_state
Internal State.
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:22
SmartIF< IAlgManager > & algManager()
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
Gaudi::StateMachine::State ApplicationMgr::FSMState ( ) const
virtual

Get the current state.

Implements IAppMgrUI.

Definition at line 933 of file ApplicationMgr.cpp.

933  {
934  return m_state;
935 }
Gaudi::StateMachine::State m_state
Internal State.
template<class I >
SmartIF<IComponentManager>& ApplicationMgr::getManager ( )
inline

Definition at line 136 of file ApplicationMgr.h.

136  {
137  return m_managers[I::interfaceID().id()];
138  }
ManagersMap m_managers
Map of known component managers.
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 785 of file ApplicationMgr.cpp.

785  {
787 
788  switch (state) {
789 
791  switch (m_state) {
793  case Gaudi::StateMachine::CONFIGURED : return terminate(); break;
794  default: // Gaudi::StateMachine::INITIALIZED or Gaudi::StateMachine::RUNNING
796  if (sc.isSuccess()) {
797  return terminate();
798  } break;
799  } break;
800 
802  switch (m_state) {
804  case Gaudi::StateMachine::OFFLINE : return configure(); break;
805  case Gaudi::StateMachine::INITIALIZED : return finalize(); break;
806  default: // Gaudi::StateMachine::RUNNING
808  if (sc.isSuccess()) {
809  return finalize();
810  } break;
811  } break;
812 
814  switch (m_state) {
816  case Gaudi::StateMachine::CONFIGURED : return initialize(); break;
817  case Gaudi::StateMachine::RUNNING : return stop(); break;
818  default: // Gaudi::StateMachine::OFFLINE
820  if (sc.isSuccess()) {
821  return initialize();
822  } break;
823  } break;
824 
826  switch (m_state) {
828  case Gaudi::StateMachine::INITIALIZED : return start(); break;
829  default: // Gaudi::StateMachine::OFFLINE or Gaudi::StateMachine::CONFIGURED
831  if (sc.isSuccess()) {
832  return start();
833  } break;
834  } break;
835 
836  }
837 
838  // If I get here, there has been a problem in the recursion
839 
840  if (ignoreFailures){
841  // force the new state
842  m_state = state;
843  return StatusCode::SUCCESS;
844  }
845 
846  return sc;
847 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual StatusCode start()
Start (from INITIALIZED to RUNNING).
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode GoToState(Gaudi::StateMachine::State state, bool ignoreFailures=false)
Reach a state from current state (whichever it is) going through the correct transitions.
virtual StatusCode stop()
Stop (from RUNNING to INITIALIZED).
virtual StatusCode finalize()
Finalize the job.
virtual StatusCode initialize()
Initialize the job.
Gaudi::StateMachine::State m_state
Internal State.
virtual StatusCode terminate()
Terminate the job.
virtual StatusCode configure()
Configure the job.
StatusCode ApplicationMgr::i_startup ( )
protected

Internal startup routine.

Definition at line 213 of file ApplicationMgr.cpp.

213  {
214  StatusCode sc;
215 
216  // declare factories in current module
218 
219  // Create the Message service
220  SmartIF<IService> msgsvc = svcManager()->createService(Gaudi::Utils::TypeNameString("MessageSvc", m_messageSvcType));
221  if( !msgsvc.isValid() ) {
222  fatal() << "Error creating MessageSvc of type " << m_messageSvcType << endmsg;
223  return sc;
224  }
225  // Create the Job Options service
226  SmartIF<IService> jobsvc = svcManager()->createService(Gaudi::Utils::TypeNameString("JobOptionsSvc", m_jobOptionsSvcType));
227  if( !jobsvc.isValid() ) {
228  fatal() << "Error creating JobOptionsSvc" << endmsg;
229  return sc;
230  }
231 
232  SmartIF<IProperty> jobOptsIProp(jobsvc);
233  if ( !jobOptsIProp.isValid() ) {
234  fatal() << "Error locating JobOptionsSvc" << endmsg;
235  return sc;
236  }
237  sc = jobOptsIProp->setProperty( StringProperty("TYPE", m_jobOptionsType) );
238  if( !sc.isSuccess() ) {
239  fatal() << "Error setting TYPE option in JobOptionsSvc" << endmsg;
240  return sc;
241  }
242 
243  if ( m_jobOptionsPath != "") { // The command line takes precedence
244  sc = jobOptsIProp->setProperty( StringProperty("PATH", m_jobOptionsPath) );
245  if( !sc.isSuccess() ) {
246  fatal() << "Error setting PATH option in JobOptionsSvc" << endmsg;
247  return sc;
248  }
249  }
250  else if ( isEnvSet("JOBOPTPATH") ) {// Otherwise the Environment JOBOPTPATH
251  sc = jobOptsIProp->setProperty (StringProperty("PATH",
252  getEnv("JOBOPTPATH")));
253  if( !sc.isSuccess() ) {
254  fatal()
255  << "Error setting PATH option in JobOptionsSvc from env"
256  << endmsg;
257  return sc;
258  }
259  }
260  else { // Otherwise the default
261  sc = jobOptsIProp->setProperty (StringProperty("PATH",
262  "../options/job.opts"));
263  if( !sc.isSuccess() ) {
264  fatal()
265  << "Error setting PATH option in JobOptionsSvc to default"
266  << endmsg;
267  return sc;
268  }
269  }
270  jobOptsIProp->release();
271 
272  // Sets my default the Output Level of the Message service to be
273  // the same as this
274  SmartIF<IProperty> msgSvcIProp(msgsvc);
275  msgSvcIProp->setProperty( IntegerProperty("OutputLevel", m_outputLevel)).ignore();
276  msgSvcIProp->release();
277 
278  sc = jobsvc->sysInitialize();
279  if( !sc.isSuccess() ) {
280  fatal() << "Error initializing JobOptionsSvc" << endmsg;
281  return sc;
282  }
283  sc = msgsvc->sysInitialize();
284  if( !sc.isSuccess() ) {
285  fatal() << "Error initializing MessageSvc" << endmsg;
286  return sc;
287  }
288 
289  // Get the useful interface from Message and JobOptions services
290  m_messageSvc = m_svcLocator->service("MessageSvc");
291  if( !m_messageSvc.isValid() ) {
292  fatal() << "Error retrieving MessageSvc." << endmsg;
293  return sc;
294  }
295  m_jobOptionsSvc = m_svcLocator->service("JobOptionsSvc");
296  if( !m_jobOptionsSvc.isValid() ) {
297  fatal() << "Error retrieving JobOptionsSvc." << endmsg;
298  return sc;
299  }
300 
301  return sc;
302 }
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:608
std::string m_jobOptionsType
Source type (e.g. dbase, file...)
StringProperty m_messageSvcType
MessageSvc type.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
SmartIF< IJobOptionsSvc > m_jobOptionsSvc
Reference to JobOption service.
SmartIF< ISvcManager > & svcManager()
SimpleProperty< std::string > StringProperty
Definition: Property.h:743
int m_outputLevel
Message output level.
DLLClassManager * m_classManager
Reference to the class manager.
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
std::string m_jobOptionsPath
The "file" to look for properties.
SmartIF< ISvcLocator > m_svcLocator
Reference to its own service locator.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
SimpleProperty< int > IntegerProperty
Definition: Property.h:733
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
Definition: System.cpp:628
StringProperty m_jobOptionsSvcType
JobOptionsSvc type.
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
void ignore() const
Definition: StatusCode.h:94
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
virtual StatusCode loadModule(const std::string &module, bool fireIncident=true)
Declare a sharable library to be used for creating instances of a given algorithm type...
StatusCode ApplicationMgr::initialize ( )
virtual

Initialize the job.

Implements IAppMgrUI.

Definition at line 531 of file ApplicationMgr.cpp.

531  {
532 
534  StatusCode sc;
535 
536  // I cannot add these services in configure() because they are coming from GaudiUtils
537  // and it messes up genconf when rebuilding it.
538  if (m_stopOnSignal) {
539  // Instantiate the service that schedules a stop when a signal is received
540  std::string svcname("Gaudi::Utils::StopSignalHandler");
541  sc = svcManager()->addService(svcname);
542  if ( sc.isFailure() ) {
543  log << MSG::INFO << "Cannot instantiate " << svcname << "signals will be ignored" << endmsg;
544  }
545  }
546 
548  // Instantiate the service that schedules a stop when a signal is received
549  std::string svcname("StalledEventMonitor");
550  sc = svcManager()->addService(svcname);
551  if ( sc.isFailure() ) {
552  log << MSG::INFO << "Cannot instantiate " << svcname << "signals will be ignored" << endmsg;
553  }
554  }
555 
557  log << MSG::INFO << "Already Initialized!" << endmsg;
558  return StatusCode::SUCCESS;
559  }
561  log << MSG::FATAL
562  << "initialize: Invalid state \"" << m_state << "\"" << endmsg;
563  return StatusCode::FAILURE;
564  }
566 
567  //--------------------------------------------------------------------------
568  // Initialize the list of top Services
569  //--------------------------------------------------------------------------
570  sc = svcManager()->initialize();
571  if( !sc.isSuccess() ) return sc;
572 
573  //--------------------------------------------------------------------------
574  // Final steps: Inform user and change internal state
575  //--------------------------------------------------------------------------
576  log << MSG::INFO << "Application Manager Initialized successfully" << endmsg;
578 
579  return sc;
580 }
Gaudi::StateMachine::State m_targetState
Internal State.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
SmartIF< ISvcManager > & svcManager()
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
BooleanProperty m_stalledEventMonitoring
Property to enable/disable the monitoring and reporting of stalled events (enabled by default)...
Gaudi::StateMachine::State m_state
Internal State.
BooleanProperty m_stopOnSignal
Property to enable/disable the "stop on signal" service (enabled by default).
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
void ApplicationMgr::initLoopCheckHndlr ( Property )

Definition at line 1311 of file ApplicationMgr.cpp.

1311  {
1312  svcManager()->setLoopCheckEnabled(m_loopCheck);
1313 }
SmartIF< ISvcManager > & svcManager()
BooleanProperty m_loopCheck
For ServiceMgr initialization loop checking.
void ApplicationMgr::multiThreadSvcNameListHandler ( Property theProp)

Definition at line 1096 of file ApplicationMgr.cpp.

1096  {
1097  if ( !(decodeMultiThreadSvcNameList( )).isSuccess() ) {
1098  throw GaudiException("Failed to create copies of mt services",
1099  "MinimalEventLoopMgr::multiThreadSvcNameListHandler",
1101  }
1102 
1103 }
Define general base for Gaudi exception.
StatusCode decodeMultiThreadSvcNameList()
const std::string & ApplicationMgr::name ( ) const
virtual

This is needed to avoid ambiguous calls to name()

Implements CommonMessaging< implements4< IAppMgrUI, IEventProcessor, IService, IStateful > >.

Definition at line 928 of file ApplicationMgr.cpp.

928  {
929  return m_name;
930 }
std::string m_name
Name.
StatusCode ApplicationMgr::nextEvent ( int  maxevt)
virtual

Process the next maxevt events.

Implements IAppMgrUI.

Definition at line 619 of file ApplicationMgr.cpp.

619  {
622  log << MSG::FATAL << "nextEvent: Invalid state \"" << m_state << "\""
623  << endmsg;
624  return StatusCode::FAILURE;
625  }
626  if (!m_processingMgr.isValid()) {
628  log << MSG::FATAL << "No event processing manager specified. Check option:"
629  << s_eventloop << endmsg;
630  return StatusCode::FAILURE;
631  }
632  return m_processingMgr->nextEvent(maxevt);
633 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IEventProcessor > m_processingMgr
Reference to processing manager object.
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
void ApplicationMgr::pluginDebugPropertyHandler ( Property theProp)

Definition at line 1297 of file ApplicationMgr.cpp.

1298 {
1299  // Setup debug level for the plugin system
1301  log << MSG::INFO
1302  << "Updating Gaudi::PluginService::SetDebug(level) to level="
1303  << (int)m_pluginDebugLevel
1304  << endmsg;
1306 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
IntegerProperty m_pluginDebugLevel
Debug level for the plugin system.
GAUDIPS_API void SetDebug(int debugLevel)
Backward compatibility with Reflex.
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode ApplicationMgr::queryInterface ( const InterfaceID ti,
void **  pp 
)
virtual

Set the void** to the pointer to the requested interface of the instance.

Implements IInterface.

Definition at line 176 of file ApplicationMgr.cpp.

178 {
179  if ( 0 == ppvi ) { return StatusCode::FAILURE ; }
180 
181  // try to find own/direct interfaces:
183  if (sc.isSuccess()) return sc;
184 
185  // find indirect interfaces :
186  if ( ISvcLocator ::interfaceID() . versionMatch ( iid ) )
187  { return serviceLocator()-> queryInterface ( iid , ppvi ) ; }
188  else if ( ISvcManager ::interfaceID() . versionMatch ( iid ) )
189  { return svcManager() -> queryInterface ( iid , ppvi ) ; }
190  else if ( IAlgManager ::interfaceID() . versionMatch ( iid ) )
191  { return algManager() -> queryInterface ( iid , ppvi ) ; }
192  else if ( IClassManager ::interfaceID() . versionMatch ( iid ) )
193  { return m_classManager -> queryInterface ( iid , ppvi ) ; }
194  else if ( IProperty ::interfaceID() . versionMatch ( iid ) )
195  { return m_propertyMgr -> queryInterface ( iid , ppvi ) ; }
196  else if ( IMessageSvc ::interfaceID() . versionMatch ( iid ) )
197  {
198  *ppvi = reinterpret_cast<void*>(m_messageSvc.get());
199  if (m_messageSvc) {
200  m_messageSvc->addRef();
201  }
202  // Note that 0 can be a valid IMessageSvc pointer value (when used for
203  // MsgStream).
204  return StatusCode::SUCCESS;
205  }
206  *ppvi = 0;
207  return StatusCode::FAILURE;
208 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual SmartIF< ISvcLocator > & serviceLocator() const
Needed to locate the message service.
SmartIF< ISvcManager > & svcManager()
DLLClassManager * m_classManager
Reference to the class manager.
PropertyMgr * m_propertyMgr
Reference to Property Manager.
Gaudi::InterfaceId< IInterface, 0, 0 > iid
Interface ID.
Definition: IInterface.h:164
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:62
virtual StatusCode queryInterface(const InterfaceID &iid, void **pinterface)
Set the void** to the pointer to the requested interface of the instance.
SmartIF< IAlgManager > & algManager()
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
Definition: IInterface.h:171
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.
StatusCode ApplicationMgr::reinitialize ( )
virtual

Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).

Implements IAppMgrUI.

Definition at line 945 of file ApplicationMgr.cpp.

945  {
947  StatusCode sc;
949  throw GaudiException("Cannot reinitialize application if not INITIALIZED or RUNNING",
950  "ApplicationMgr::reinitialize", StatusCode::FAILURE);
951  }
954  }
955  sc = svcManager()->reinitialize();
956  if (sc.isFailure()) retval = sc;
957  sc = algManager()->reinitialize();
958  if (sc.isFailure()) retval = sc;
959  return retval;
960 }
Define general base for Gaudi exception.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
SmartIF< ISvcManager > & svcManager()
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode GoToState(Gaudi::StateMachine::State state, bool ignoreFailures=false)
Reach a state from current state (whichever it is) going through the correct transitions.
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IAlgManager > & algManager()
StatusCode ApplicationMgr::restart ( )
virtual

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Implements IAppMgrUI.

Definition at line 965 of file ApplicationMgr.cpp.

965  {
967  StatusCode sc;
969  throw GaudiException("Cannot restart application if not RUNNING",
970  "ApplicationMgr::restart", StatusCode::FAILURE);
971  }
972  sc = svcManager()->restart();
973  if (sc.isFailure()) retval = sc;
974  sc = algManager()->restart();
975  if (sc.isFailure()) retval = sc;
976  return retval;
977 }
Define general base for Gaudi exception.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
SmartIF< ISvcManager > & svcManager()
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IAlgManager > & algManager()
StatusCode ApplicationMgr::run ( )
virtual

Run the complete job (from initialize to terminate)

Implements IAppMgrUI.

Definition at line 852 of file ApplicationMgr.cpp.

852  {
854 
856  if ( sc.isSuccess() ) {
858  if ( m_runable != 0 ) { // loop over the events
859  sc = m_runable->run();
860  if ( !sc.isSuccess() ) {
861  log << MSG::FATAL << "Application execution failed. Ending the job."
862  << endmsg;
863  }
864  } else {
865  log << MSG::FATAL << "Application has no runable object. Check option:"
866  << s_runable << endmsg;
867  }
868  }
869  if (sc.isSuccess()) { // try to close cleanly
871  }
872  // either the runable failed of the stut-down
873  if (sc.isFailure()) { // try to close anyway (but keep the StatusCode unchanged)
875  }
876  return sc;
877 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IRunable > m_runable
Reference to the runable object.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode GoToState(Gaudi::StateMachine::State state, bool ignoreFailures=false)
Reach a state from current state (whichever it is) going through the correct transitions.
void ignore() const
Definition: StatusCode.h:94
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
virtual SmartIF<ISvcLocator>& ApplicationMgr::serviceLocator ( ) const
inlinevirtual

Needed to locate the message service.

Implements CommonMessaging< implements4< IAppMgrUI, IEventProcessor, IService, IStateful > >.

Definition at line 157 of file ApplicationMgr.h.

157  {
158  return m_svcLocator;
159  }
SmartIF< ISvcLocator > m_svcLocator
Reference to its own service locator.
void ApplicationMgr::setServiceManager ( ISvcManager )
inlineprotectedvirtual

Implements IService.

Definition at line 170 of file ApplicationMgr.h.

170 {}
void ApplicationMgr::SIExitHandler ( Property theProp)

Definition at line 998 of file ApplicationMgr.cpp.

998  {
999  StatusCode status;
1000  status = finalize();
1001  status = terminate();
1002  ::exit( 0 );
1003 }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode finalize()
Finalize the job.
virtual StatusCode terminate()
Terminate the job.
void ApplicationMgr::SIGoHandler ( Property theProp)

Definition at line 982 of file ApplicationMgr.cpp.

982  {
983 
985  StatusCode sc;
986 
987  // Re-initialize everything
988  sc = reinitialize();
989  // Execute a number of events
991 
992  return;
993 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
int m_evtMax
Number of events to be processed.
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
virtual StatusCode executeRun(int evtmax)
implementation of IEventProcessor::executeRun(int)
StatusCode ApplicationMgr::start ( )
virtual

Start (from INITIALIZED to RUNNING).

Implements IAppMgrUI.

Definition at line 585 of file ApplicationMgr.cpp.

585  {
586 
588  StatusCode sc;
589 
591  log << MSG::INFO << "Already Initialized!" << endmsg;
592  return StatusCode::SUCCESS;
593  }
595  log << MSG::FATAL
596  << "start: Invalid state \"" << m_state << "\"" << endmsg;
597  return StatusCode::FAILURE;
598  }
600 
601  //--------------------------------------------------------------------------
602  // Initialize the list of top Services
603  //--------------------------------------------------------------------------
604  sc = svcManager()->start();
605  if( !sc.isSuccess() ) return sc;
606 
607  //--------------------------------------------------------------------------
608  // Final steps: Inform user and change internal state
609  //--------------------------------------------------------------------------
610  log << MSG::INFO << "Application Manager Started successfully" << endmsg;
612 
613  return sc;
614 }
Gaudi::StateMachine::State m_targetState
Internal State.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
SmartIF< ISvcManager > & svcManager()
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode ApplicationMgr::stop ( )
virtual

Stop (from RUNNING to INITIALIZED).

Implements IAppMgrUI.

Definition at line 638 of file ApplicationMgr.cpp.

638  {
639 
641  StatusCode sc;
642 
644  log << MSG::INFO << "Already Initialized!" << endmsg;
645  return StatusCode::SUCCESS;
646  }
647  else if( m_state != Gaudi::StateMachine::RUNNING ) {
648  log << MSG::FATAL
649  << "stop: Invalid state \"" << m_state << "\"" << endmsg;
650  return StatusCode::FAILURE;
651  }
653 
654  // Stop independently managed Algorithms
655  sc = algManager()->stop();
656  if( !sc.isSuccess() ) return sc;
657 
658  //--------------------------------------------------------------------------
659  // Stop the list of top Services
660  //--------------------------------------------------------------------------
661  sc = svcManager()->stop();
662  if( !sc.isSuccess() ) return sc;
663 
664  //--------------------------------------------------------------------------
665  // Final steps: Inform user and change internal state
666  //--------------------------------------------------------------------------
667  log << MSG::INFO << "Application Manager Stopped successfully" << endmsg;
669 
670  return sc;
671 }
Gaudi::StateMachine::State m_targetState
Internal State.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
SmartIF< ISvcManager > & svcManager()
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IAlgManager > & algManager()
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode ApplicationMgr::stopRun ( )
virtual

implementation of IEventProcessor::stopRun()

Implements IEventProcessor.

Definition at line 914 of file ApplicationMgr.cpp.

914  {
917  if ( m_processingMgr.isValid() ) {
918  return m_processingMgr->stopRun();
919  }
920  log << MSG::WARNING << "No EventLoop Manager specified " << endmsg;
921  return StatusCode::SUCCESS;
922  }
923  log << MSG::FATAL << "stopRun: Invalid state \"" << FSMState() << "\""
924  << endmsg;
925  return StatusCode::FAILURE;
926 }
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IEventProcessor > m_processingMgr
Reference to processing manager object.
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
SmartIF<ISvcManager>& ApplicationMgr::svcManager ( )
inline

Definition at line 140 of file ApplicationMgr.h.

140  {
141  // Cache the casted pointer to ISvcManager
142  if (!m_svcManager) {
143  m_svcManager = getManager<IService>();
144  }
145  return m_svcManager;
146  }
SmartIF< ISvcManager > m_svcManager
Cached pointer to the manager of services.
virtual StatusCode ApplicationMgr::sysFinalize ( )
inlinevirtual

Finalize Service.

Implements IService.

Definition at line 109 of file ApplicationMgr.h.

virtual StatusCode ApplicationMgr::sysInitialize ( )
inlinevirtual

Initialize Service.

Implements IService.

Definition at line 103 of file ApplicationMgr.h.

virtual StatusCode ApplicationMgr::sysReinitialize ( )
inlinevirtual

Re-initialize the Service.

Implements IService.

Definition at line 111 of file ApplicationMgr.h.

virtual StatusCode ApplicationMgr::sysRestart ( )
inlinevirtual

Re-start the Service.

Implements IService.

Definition at line 113 of file ApplicationMgr.h.

virtual StatusCode ApplicationMgr::sysStart ( )
inlinevirtual

Start Service.

Implements IService.

Definition at line 105 of file ApplicationMgr.h.

virtual StatusCode ApplicationMgr::sysStop ( )
inlinevirtual

Stop Service.

Implements IService.

Definition at line 107 of file ApplicationMgr.h.

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

When we are in the middle of a transition, get the state where the transition is leading us.

Otherwise it returns the same state as state().

Implements IService.

Definition at line 937 of file ApplicationMgr.cpp.

937  {
938  return m_targetState;
939 }
Gaudi::StateMachine::State m_targetState
Internal State.
StatusCode ApplicationMgr::terminate ( )
virtual

Terminate the job.

Implements IAppMgrUI.

Definition at line 726 of file ApplicationMgr.cpp.

726  {
728 
730  log << MSG::INFO << "Already Offline" << endmsg;
731  return StatusCode::SUCCESS;
732  }
734  log << MSG::FATAL << "terminate: Invalid state \"" << m_state << "\""
735  << endmsg;
736  return StatusCode::FAILURE;
737  }
738  // release all Services
740 
742  log << MSG::INFO << "Application Manager Terminated successfully" << endmsg;
744  log << MSG::INFO << "Application Manager Terminated successfully with a user requested ScheduledStop" << endmsg;
745  } else {
746  log << MSG::ERROR << "Application Manager Terminated with error code " << m_returnCode.value() << endmsg;
747  }
748 
749  { // Force a disable the auditing of finalize for MessageSvc
751  if (prop.isValid()) {
752  prop->setProperty(BooleanProperty("AuditFinalize", false)).ignore();
753  }
754  }
755  { // Force a disable the auditing of finalize for JobOptionsSvc
757  if (prop.isValid()) {
758  prop->setProperty(BooleanProperty("AuditFinalize", false)).ignore();
759  }
760  }
761 
762  // finalize MessageSvc
764  if ( !svc.isValid() ) {
765  log << MSG::ERROR << "Could not get the IService interface of the MessageSvc" << endmsg;
766  } else {
767  svc->sysFinalize().ignore();
768  }
769 
770  // finalize JobOptionsSvc
771  svc = m_jobOptionsSvc;
772  if ( !svc.isValid() ) {
773  log << MSG::ERROR << "Could not get the IService interface of the JobOptionsSvc" << endmsg;
774  } else {
775  svc->sysFinalize().ignore();
776  }
777 
779  return StatusCode::SUCCESS;
780 }
Gaudi::StateMachine::State m_targetState
Internal State.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SimpleProperty< bool > BooleanProperty
Definition: Property.h:727
SmartIF< IJobOptionsSvc > m_jobOptionsSvc
Reference to JobOption service.
IntegerProperty m_returnCode
Property to record the error conditions occurring during the running.
virtual const std::string & name() const
This is needed to avoid ambiguous calls to name()
const TYPE & value() const
explicit conversion
Definition: Property.h:355
const int ScheduledStop
Definition: AppReturnCode.h:25
Gaudi::StateMachine::State m_state
Internal State.
SmartIF< IMessageSvc > m_messageSvc
Reference to the message service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243

Member Data Documentation

bool ApplicationMgr::m_actHistory
protected

Activate HistorySvc.

Definition at line 250 of file ApplicationMgr.h.

SmartIF<IAlgManager> ApplicationMgr::m_algManager
protected

Cached pointer to the manager of algorithms.

Definition at line 195 of file ApplicationMgr.h.

std::string ApplicationMgr::m_appName
protected

The name of the application.

Definition at line 248 of file ApplicationMgr.h.

std::string ApplicationMgr::m_appVersion
protected

The version of the application.

Definition at line 249 of file ApplicationMgr.h.

BooleanProperty ApplicationMgr::m_auditAlgs
protected

Definition at line 259 of file ApplicationMgr.h.

BooleanProperty ApplicationMgr::m_auditSvcs
protected

Definition at line 258 of file ApplicationMgr.h.

BooleanProperty ApplicationMgr::m_auditTools
protected

Defaults for auditors.

Definition at line 257 of file ApplicationMgr.h.

DLLClassManager* ApplicationMgr::m_classManager
protected

Reference to the class manager.

Definition at line 199 of file ApplicationMgr.h.

bool ApplicationMgr::m_codeCheck
protected

Activate StatusCode checking.

Definition at line 251 of file ApplicationMgr.h.

StringArrayProperty ApplicationMgr::m_createSvcNameList
protected

Definition at line 254 of file ApplicationMgr.h.

StringArrayProperty ApplicationMgr::m_declaredManagers
protected

Property to declare the list of known managers.

Definition at line 189 of file ApplicationMgr.h.

VectorName ApplicationMgr::m_defServices
protected

Vector default services names.

Definition at line 218 of file ApplicationMgr.h.

StringArrayProperty ApplicationMgr::m_dllNameList
protected

List of DDL's names.

Definition at line 240 of file ApplicationMgr.h.

std::map<std::string,std::string> ApplicationMgr::m_environment
protected

Environment variables to set.

Definition at line 261 of file ApplicationMgr.h.

std::string ApplicationMgr::m_eventLoopMgr
protected

Processing manager type.

Definition at line 244 of file ApplicationMgr.h.

int ApplicationMgr::m_evtMax
protected

Number of events to be processed.

Definition at line 232 of file ApplicationMgr.h.

std::string ApplicationMgr::m_evtsel
protected

Event selection.

Definition at line 245 of file ApplicationMgr.h.

BooleanProperty ApplicationMgr::m_extSvcCreates
protected

LHCb or ATLAS defn of "ExtSvc".

Definition at line 234 of file ApplicationMgr.h.

StringArrayProperty ApplicationMgr::m_extSvcNameList
protected

List of external services names.

Definition at line 233 of file ApplicationMgr.h.

std::string ApplicationMgr::m_histPersName
protected

CGL: Name of the Hist Pers Svc.

Definition at line 246 of file ApplicationMgr.h.

std::string ApplicationMgr::m_jobOptionsPath
protected

The "file" to look for properties.

Definition at line 242 of file ApplicationMgr.h.

SmartIF<IJobOptionsSvc> ApplicationMgr::m_jobOptionsSvc
protected

Reference to JobOption service.

Definition at line 226 of file ApplicationMgr.h.

StringProperty ApplicationMgr::m_jobOptionsSvcType
protected

JobOptionsSvc type.

Definition at line 208 of file ApplicationMgr.h.

std::string ApplicationMgr::m_jobOptionsType
protected

Source type (e.g. dbase, file...)

Definition at line 241 of file ApplicationMgr.h.

BooleanProperty ApplicationMgr::m_loopCheck
protected

For ServiceMgr initialization loop checking.

Definition at line 264 of file ApplicationMgr.h.

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 187 of file ApplicationMgr.h.

SmartIF<IMessageSvc> ApplicationMgr::m_messageSvc
protected

Reference to the message service.

Definition at line 223 of file ApplicationMgr.h.

StringProperty ApplicationMgr::m_messageSvcType
protected

MessageSvc type.

Definition at line 207 of file ApplicationMgr.h.

StringArrayProperty ApplicationMgr::m_multiThreadSvcNameList
protected

List of external services names for which we want a copy per evt thread.

Definition at line 237 of file ApplicationMgr.h.

std::string ApplicationMgr::m_name
protected

Name.

Definition at line 214 of file ApplicationMgr.h.

int ApplicationMgr::m_noOfEvtThreads
protected

no of multiThreadSvc copies

Definition at line 238 of file ApplicationMgr.h.

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

names of successfully loaded dlls

Definition at line 281 of file ApplicationMgr.h.

int ApplicationMgr::m_outputLevel
protected

Message output level.

Definition at line 247 of file ApplicationMgr.h.

StringArrayProperty ApplicationMgr::m_outStreamNameList
protected

List of output stream names.

Definition at line 205 of file ApplicationMgr.h.

StringProperty ApplicationMgr::m_outStreamType
protected

Output stream type (obsolete?)

Definition at line 206 of file ApplicationMgr.h.

IntegerProperty ApplicationMgr::m_pluginDebugLevel
protected

Debug level for the plugin system.

Definition at line 252 of file ApplicationMgr.h.

SmartIF<IEventProcessor> ApplicationMgr::m_processingMgr
protected

Reference to processing manager object.

Definition at line 225 of file ApplicationMgr.h.

bool ApplicationMgr::m_propertiesPrint
protected

flag to activate the printout of properties

Definition at line 275 of file ApplicationMgr.h.

PropertyMgr* ApplicationMgr::m_propertyMgr
protected

Reference to Property Manager.

Definition at line 222 of file ApplicationMgr.h.

IntegerProperty ApplicationMgr::m_returnCode
protected

Property to record the error conditions occurring during the running.

Definition at line 278 of file ApplicationMgr.h.

SmartIF<IRunable> ApplicationMgr::m_runable
protected

Reference to the runable object.

Definition at line 224 of file ApplicationMgr.h.

std::string ApplicationMgr::m_runableType
protected

Runable type.

Definition at line 243 of file ApplicationMgr.h.

IntegerProperty ApplicationMgr::m_SIExit
protected

For SI's "Exit" command via callback.

Definition at line 203 of file ApplicationMgr.h.

IntegerProperty ApplicationMgr::m_SIGo
protected

For SI's "Go" command via callback.

Definition at line 202 of file ApplicationMgr.h.

BooleanProperty ApplicationMgr::m_stalledEventMonitoring
protected

Property to enable/disable the monitoring and reporting of stalled events (enabled by default).

See also
StalledEventMonitor

Definition at line 272 of file ApplicationMgr.h.

Gaudi::StateMachine::State ApplicationMgr::m_state
protected

Internal State.

Definition at line 215 of file ApplicationMgr.h.

BooleanProperty ApplicationMgr::m_stopOnSignal
protected

Property to enable/disable the "stop on signal" service (enabled by default).

See also
Gaudi::Utils::StopSignalHandler

Definition at line 268 of file ApplicationMgr.h.

SmartIF<ISvcLocator> ApplicationMgr::m_svcLocator
mutableprotected

Reference to its own service locator.

Definition at line 200 of file ApplicationMgr.h.

SmartIF<ISvcManager> ApplicationMgr::m_svcManager
protected

Cached pointer to the manager of services.

Definition at line 192 of file ApplicationMgr.h.

VectorName ApplicationMgr::m_svcMapping
protected

Default mapping of services.

Definition at line 219 of file ApplicationMgr.h.

VectorName ApplicationMgr::m_svcOptMapping
protected

Default mapping of services.

Definition at line 220 of file ApplicationMgr.h.

Gaudi::StateMachine::State ApplicationMgr::m_targetState
protected

Internal State.

Definition at line 216 of file ApplicationMgr.h.

StringArrayProperty ApplicationMgr::m_topAlgNameList
protected

List of top level algorithms names.

Definition at line 204 of file ApplicationMgr.h.

ListSvc ApplicationMgr::m_topSvcList
protected

List of top level services.

Definition at line 211 of file ApplicationMgr.h.

ListName ApplicationMgr::m_topSvcNameList
protected

List of top level services names.

Definition at line 212 of file ApplicationMgr.h.


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