The Gaudi Framework
v25r5
|
The DataOnDemandSvc listens to incidents typically triggered by the data service of the configurable name "IncidentName". More...
#include <src/IncidentSvc/DataOnDemandSvc.h>
Classes | |
struct | Leaf |
struct | Node |
Helper class of the DataOnDemandSvc. More... | |
struct | Protection |
Helper class of the DataOnDemandSvc. More... | |
Public Types | |
typedef std::vector< std::string > | Setup |
typedef TClass * | ClassH |
typedef GaudiUtils::HashMap < Gaudi::StringKey, Node > | NodeMap |
typedef GaudiUtils::HashMap < Gaudi::StringKey, Leaf > | AlgMap |
![]() | |
typedef extends1 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces1 < IIncidentListener > | 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... | |
![]() | |
typedef Gaudi::PluginService::Factory < IService *, const std::string &, ISvcLocator * > | Factory |
![]() | |
typedef CommonMessaging | base_class |
![]() | |
typedef implements3 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces3 < IService, IProperty, 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... | |
![]() | |
typedef mpl::fold< typename IService::iid::iids::type, typename mpl::fold< typename IProperty::iid::iids::type, typename IStateful::iid::iids::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... | |
![]() | |
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< iid > | ext_iids |
Extra interfaces. More... | |
![]() | |
typedef IIncidentListener::iid::iids::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
Public Member Functions | |
virtual StatusCode | initialize () |
Inherited Service overrides: Service initialization. More... | |
virtual StatusCode | finalize () |
Inherited Service overrides: Service finalization. More... | |
virtual StatusCode | reinitialize () |
Inherited Service overrides: Service reinitialization. More... | |
virtual void | handle (const Incident &incident) |
IIncidentListener interfaces overrides: incident handling. More... | |
DataOnDemandSvc (const std::string &name, ISvcLocator *svc) | |
Standard initializing service constructor. More... | |
virtual | ~DataOnDemandSvc () |
Standard destructor. More... | |
void | update_1 (Property &p) |
void | update_2 (Property &p) |
void | update_3 (Property &p) |
void | update_dump (Property &) |
update handler for 'Dump' property More... | |
![]() | |
extends1 (A1 a1, A2 a2, A3 a3) | |
Templated constructor with 3 arguments. More... | |
extends1 (A1 a1, A2 a2) | |
Templated constructor with 2 arguments. More... | |
extends1 (A1 a1) | |
Templated constructor with 1 argument. More... | |
extends1 () | |
Default constructor. More... | |
virtual void * | i_cast (const InterfaceID &tid) const |
Implementation of IInterface::i_cast. More... | |
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp) |
Implementation of IInterface::queryInterface. More... | |
virtual std::vector< std::string > | getInterfaceNames () const |
Implementation of IInterface::getInterfaceNames. More... | |
virtual | ~extends1 () |
Virtual destructor. More... | |
![]() | |
virtual unsigned long | release () |
Release Interface instance. More... | |
virtual const std::string & | name () const |
Retrieve name of the service. More... | |
virtual StatusCode | configure () |
Configuration (from OFFLINE to CONFIGURED). More... | |
virtual StatusCode | start () |
Start (from INITIALIZED to RUNNING). More... | |
virtual StatusCode | stop () |
Stop (from RUNNING to INITIALIZED). More... | |
virtual StatusCode | terminate () |
Initialization (from CONFIGURED to OFFLINE). 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 | restart () |
Initialization (from RUNNING to RUNNING, via INITIALIZED). More... | |
virtual StatusCode | sysInitialize () |
Initialize Service. More... | |
virtual StatusCode | sysStart () |
Initialize Service. More... | |
virtual StatusCode | sysStop () |
Initialize Service. More... | |
virtual StatusCode | sysFinalize () |
Finalize Service. More... | |
virtual StatusCode | sysReinitialize () |
Re-initialize the Service. More... | |
virtual StatusCode | sysRestart () |
Re-initialize the Service. More... | |
virtual StatusCode | setProperty (const Property &p) |
Set the property by property. More... | |
virtual StatusCode | setProperty (const std::string &s) |
Set the property by string. More... | |
virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
Set the property by std::string. More... | |
virtual StatusCode | getProperty (Property *p) const |
Get the property by property. More... | |
virtual const Property & | getProperty (const std::string &name) const |
Get the property by name. More... | |
virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
Get the property by std::string. More... | |
virtual const std::vector < Property * > & | getProperties () const |
Get list of properties. More... | |
template<class TYPE > | |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
set the property form the value More... | |
Service (const std::string &name, ISvcLocator *svcloc) | |
Standard Constructor. More... | |
SmartIF< ISvcLocator > & | serviceLocator () const |
Retrieve pointer to service locator. More... | |
StatusCode | setProperties () |
Method for setting declared properties to the values specified for the job. More... | |
template<class T > | |
StatusCode | service (const std::string &name, const T *&psvc, bool createIf=true) const |
Access a service by name, creating it if it doesn't already exist. More... | |
template<class T > | |
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const |
template<class T > | |
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const |
Access a service by name and type, creating it if it doesn't already exist. More... | |
template<class T > | |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Declare the named property. More... | |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
Declare remote named properties. More... | |
SmartIF< IAuditorSvc > & | auditorSvc () const |
The standard auditor service.May not be invoked before sysInitialize() has been invoked. More... | |
![]() | |
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... | |
MsgStream & | msgStream () const |
Return an uninitialized MsgStream. More... | |
MsgStream & | msgStream (const MSG::Level level) const |
Predefined configurable message stream for the efficient printouts. More... | |
MsgStream & | always () const |
shortcut for the method msgStream(MSG::ALWAYS) More... | |
MsgStream & | fatal () const |
shortcut for the method msgStream(MSG::FATAL) More... | |
MsgStream & | err () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | error () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | warning () const |
shortcut for the method msgStream(MSG::WARNING) More... | |
MsgStream & | info () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MsgStream & | debug () const |
shortcut for the method msgStream(MSG::DEBUG) More... | |
MsgStream & | verbose () const |
shortcut for the method msgStream(MSG::VERBOSE) More... | |
MsgStream & | msg () 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... | |
![]() | |
virtual | ~extend_interfaces3 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IService, 3, 0) | |
InterfaceID. More... | |
virtual | ~IService () |
virtual destructor More... | |
![]() | |
DeclareInterfaceID (INamedInterface, 1, 0) | |
InterfaceID. More... | |
virtual | ~INamedInterface () |
Virtual destructor (always needed for abstract classes). More... | |
![]() | |
virtual unsigned long | addRef ()=0 |
Increment the reference count of Interface instance. More... | |
virtual unsigned long | refCount () const =0 |
Current reference count. More... | |
virtual | ~IInterface () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IProperty, 2, 0) | |
InterfaceID. More... | |
![]() | |
DeclareInterfaceID (IStateful, 1, 0) | |
InterfaceID. More... | |
virtual | ~IStateful () |
![]() | |
virtual | ~extend_interfaces1 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IIncidentListener, 2, 0) | |
InterfaceID. More... | |
Protected Member Functions | |
StatusCode | configureHandler (Leaf &leaf) |
Configure handler for leaf. More... | |
StatusCode | execHandler (const std::string &tag, Leaf &leaf) |
Execute leaf handler (algorithm) More... | |
StatusCode | execHandler (const std::string &tag, Node &node) |
Execute node handler (simple object creation using seal reflection) More... | |
StatusCode | setupNodeHandlers () |
Initialize node handlers. More... | |
StatusCode | setupAlgHandlers () |
Initialize leaf handlers. More... | |
StatusCode | setup () |
Setup routine (called by (re-) initialize. More... | |
void | i_setNodeHandler (const std::string &name, const std::string &type) |
Internal method to initialize a node handler. More... | |
StatusCode | i_setAlgHandler (const std::string &name, const Gaudi::Utils::TypeNameString &alg) |
Internal method to initialize an algorithm handler. More... | |
StatusCode | update () |
update the handlers More... | |
MsgStream & | stream () const |
get the message stream More... | |
void | dump (const MSG::Level level, const bool mode=true) const |
dump the content of DataOnDemand service More... | |
![]() | |
virtual | ~Service () |
Standard Destructor. More... | |
int | outputLevel () const |
get the Service's output level More... | |
![]() | |
void | updateMsgStreamOutputLevel (int level) |
Update the output level of the cached MsgStream. More... | |
Private Types | |
typedef std::map< std::string, std::string > | Map |
Private Attributes | |
SmartIF< IIncidentSvc > | m_incSvc |
Incident service. More... | |
SmartIF< IAlgManager > | m_algMgr |
Algorithm manager. More... | |
SmartIF< IDataProviderSvc > | m_dataSvc |
Data provider reference. More... | |
SmartIF< IToolSvc > | m_toolSvc |
Data provider reference. More... | |
std::string | m_trapType |
Trap name. More... | |
std::string | m_dataSvcName |
Data service name. More... | |
bool | m_partialPath |
Flag to allow for the creation of partial leaves. More... | |
bool | m_dump |
flag to force the printout More... | |
bool | m_init |
flag to warm up the configuration More... | |
bool | m_allowInitFailure |
flag to allow DataOnDemand initialization to succeed even if the (pre)initialization of the algorithms fails (m_init). More... | |
Setup | m_algMapping |
Mapping to algorithms. More... | |
Setup | m_nodeMapping |
Mapping to nodes. More... | |
AlgMap | m_algs |
Map of algorithms to handle incidents. More... | |
NodeMap | m_nodes |
Map of "empty" objects to be placed as intermediate nodes. More... | |
Map | m_algMap |
the major configuration property { 'data' : 'algorithm' } More... | |
Map | m_nodeMap |
the major configuration property { 'data' : 'type' } More... | |
bool | m_updateRequired |
std::string | m_prefix |
MsgStream * | m_log |
ChronoEntity | m_total |
ulonglong | m_statAlg |
ulonglong | m_statNode |
ulonglong | m_stat |
ChronoEntity | m_timer_nodes |
ChronoEntity | m_timer_algs |
ChronoEntity | m_timer_all |
bool | m_locked_nodes |
bool | m_locked_algs |
bool | m_locked_all |
std::vector< std::string > | m_nodeMapTools |
std::list< IDODNodeMapper * > | m_nodeMappers |
std::vector< std::string > | m_algMapTools |
std::list< IDODAlgMapper * > | m_algMappers |
Additional Inherited Members | |
![]() | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
![]() | |
IntegerProperty | m_outputLevel |
Service output level. More... | |
Gaudi::StateMachine::State | m_state |
Service state. More... | |
Gaudi::StateMachine::State | m_targetState |
Service state. More... | |
![]() | |
SmartIF< IMessageSvc > | m_msgsvc |
Pointer to the message service;. More... | |
std::auto_ptr< MsgStream > | m_msgStream |
The predefined message stream. More... | |
bool | m_streamWithService |
Flag to create a new MsgStream if it was created without the message service. More... | |
The DataOnDemandSvc listens to incidents typically triggered by the data service of the configurable name "IncidentName".
In the job options handlers can be declared, which allow to configure this service. Such handlers are either:
The handlers only get called if the exact path matches. In the event already the partial path to any handler is missing a leaf handler may be triggered, which includes the partial paths ( DataOnDemandSvc.UsePreceedingPath = true )
2006-10-15: New options (using map-like semantics:)
New treatment of preceding paths. for each registered leaf or node the all parent nodes are added into the node-map with default directory type 'DataObject'
The major properties are equipped with handlers (more or less mandatory for interactive work in python)
From now the default prefix ( "/Event/" ) could be omitted from any data-item. It will be added automatically.
Definition at line 90 of file DataOnDemandSvc.h.
Definition at line 172 of file DataOnDemandSvc.h.
typedef TClass* DataOnDemandSvc::ClassH |
Definition at line 96 of file DataOnDemandSvc.h.
|
private |
Definition at line 283 of file DataOnDemandSvc.h.
Definition at line 171 of file DataOnDemandSvc.h.
typedef std::vector<std::string> DataOnDemandSvc::Setup |
Definition at line 95 of file DataOnDemandSvc.h.
DataOnDemandSvc::DataOnDemandSvc | ( | const std::string & | name, |
ISvcLocator * | svc | ||
) |
Standard initializing service constructor.
name | [IN] Service instance name |
svc | [IN] Pointer to service locator |
Definition at line 46 of file DataOnDemandSvc.cpp.
|
virtual |
|
protected |
Configure handler for leaf.
leaf | [IN] Reference to leaf handler |
Definition at line 590 of file DataOnDemandSvc.cpp.
|
protected |
dump the content of DataOnDemand service
level | the printout level |
mode | the printout mode |
Definition at line 868 of file DataOnDemandSvc.cpp.
|
protected |
Execute leaf handler (algorithm)
tag | [IN] Path to requested leaf |
leaf | [IN] Reference to leaf handler |
Definition at line 827 of file DataOnDemandSvc.cpp.
|
protected |
Execute node handler (simple object creation using seal reflection)
tag | [IN] Path to requested leaf |
node | [IN] Reference to node handler |
Definition at line 771 of file DataOnDemandSvc.cpp.
|
virtual |
Inherited Service overrides: Service finalization.
Reimplemented from Service.
Definition at line 364 of file DataOnDemandSvc.cpp.
|
virtual |
IIncidentListener interfaces overrides: incident handling.
Implements IIncidentListener.
Definition at line 698 of file DataOnDemandSvc.cpp.
|
protected |
Internal method to initialize an algorithm handler.
Definition at line 257 of file DataOnDemandSvc.cpp.
|
protected |
Internal method to initialize a node handler.
Definition at line 247 of file DataOnDemandSvc.cpp.
|
virtual |
Inherited Service overrides: Service initialization.
Reimplemented from Service.
Definition at line 346 of file DataOnDemandSvc.cpp.
|
virtual |
Inherited Service overrides: Service reinitialization.
re-initialization of the service
Reimplemented from Service.
Definition at line 425 of file DataOnDemandSvc.cpp.
|
protected |
Setup routine (called by (re-) initialize.
Definition at line 458 of file DataOnDemandSvc.cpp.
|
protected |
Initialize leaf handlers.
Definition at line 551 of file DataOnDemandSvc.cpp.
|
protected |
Initialize node handlers.
Definition at line 509 of file DataOnDemandSvc.cpp.
|
inlineprotected |
get the message stream
Definition at line 240 of file DataOnDemandSvc.h.
|
protected |
update the handlers
convert obsolete "Nodes" into new "NodeMap"
convert obsolete "Algorithms" into new "AlgMap"
add the default prefix
add the default prefix
get all directories
setup algorithms
setup nodes
Definition at line 279 of file DataOnDemandSvc.cpp.
void DataOnDemandSvc::update_1 | ( | Property & | p | ) |
Definition at line 126 of file DataOnDemandSvc.cpp.
void DataOnDemandSvc::update_2 | ( | Property & | p | ) |
Definition at line 147 of file DataOnDemandSvc.cpp.
void DataOnDemandSvc::update_3 | ( | Property & | p | ) |
Definition at line 135 of file DataOnDemandSvc.cpp.
void DataOnDemandSvc::update_dump | ( | Property & | ) |
update handler for 'Dump' property
Definition at line 159 of file DataOnDemandSvc.cpp.
|
private |
the major configuration property { 'data' : 'algorithm' }
Definition at line 285 of file DataOnDemandSvc.h.
|
private |
Definition at line 307 of file DataOnDemandSvc.h.
|
private |
Mapping to algorithms.
Definition at line 275 of file DataOnDemandSvc.h.
|
private |
Definition at line 306 of file DataOnDemandSvc.h.
|
private |
Algorithm manager.
Definition at line 256 of file DataOnDemandSvc.h.
|
private |
Map of algorithms to handle incidents.
Definition at line 279 of file DataOnDemandSvc.h.
|
private |
flag to allow DataOnDemand initialization to succeed even if the (pre)initialization of the algorithms fails (m_init).
Definition at line 273 of file DataOnDemandSvc.h.
|
private |
Data provider reference.
Definition at line 258 of file DataOnDemandSvc.h.
|
private |
Data service name.
Definition at line 264 of file DataOnDemandSvc.h.
|
private |
flag to force the printout
Definition at line 268 of file DataOnDemandSvc.h.
|
private |
Incident service.
Definition at line 254 of file DataOnDemandSvc.h.
|
private |
flag to warm up the configuration
Definition at line 270 of file DataOnDemandSvc.h.
|
private |
Definition at line 301 of file DataOnDemandSvc.h.
|
private |
Definition at line 302 of file DataOnDemandSvc.h.
|
private |
Definition at line 300 of file DataOnDemandSvc.h.
|
mutableprivate |
Definition at line 290 of file DataOnDemandSvc.h.
|
private |
the major configuration property { 'data' : 'type' }
Definition at line 287 of file DataOnDemandSvc.h.
|
private |
Definition at line 305 of file DataOnDemandSvc.h.
|
private |
Mapping to nodes.
Definition at line 277 of file DataOnDemandSvc.h.
|
private |
Definition at line 304 of file DataOnDemandSvc.h.
|
private |
Map of "empty" objects to be placed as intermediate nodes.
Definition at line 281 of file DataOnDemandSvc.h.
|
private |
Flag to allow for the creation of partial leaves.
Definition at line 266 of file DataOnDemandSvc.h.
|
private |
Definition at line 289 of file DataOnDemandSvc.h.
|
private |
Definition at line 295 of file DataOnDemandSvc.h.
|
private |
Definition at line 293 of file DataOnDemandSvc.h.
|
private |
Definition at line 294 of file DataOnDemandSvc.h.
|
private |
Definition at line 298 of file DataOnDemandSvc.h.
|
private |
Definition at line 299 of file DataOnDemandSvc.h.
|
private |
Definition at line 297 of file DataOnDemandSvc.h.
Data provider reference.
Definition at line 260 of file DataOnDemandSvc.h.
|
private |
Definition at line 292 of file DataOnDemandSvc.h.
|
private |
Trap name.
Definition at line 262 of file DataOnDemandSvc.h.
|
private |
Definition at line 288 of file DataOnDemandSvc.h.