| The Gaudi Framework v32r1 (f65d50dc)

Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DataOnDemandSvc Class Reference

The DataOnDemandSvc listens to incidents typically triggered by the data service of the configurable name "IncidentName". More...

`#include <src/IncidentSvc/DataOnDemandSvc.h>`

Inheritance diagram for DataOnDemandSvc:
[legend]
Collaboration diagram for DataOnDemandSvc:
[legend]

## 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
Public Types inherited from extends< Service, IIncidentListener >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from Service
using | Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...

## Public Member Functions
StatusCode | initialize () override
| Inherited Service overrides: Service initialization. More...
StatusCode | finalize () override
| Inherited Service overrides: Service finalization. More...
StatusCode | reinitialize () override
| Inherited Service overrides: Service reinitialization. More...
void | handle (const Incident &incident) override
| IIncidentListener interfaces overrides: incident handling. More...
Public Member Functions inherited from extends< Service, IIncidentListener >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| 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<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, 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 >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
| Declare used tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| PropertyHolder ()=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const
| Backward compatibility function for getting the output level. More...
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const 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...

## 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...
void | dump (const MSG::Level level, const bool mode=true) const
| dump the content of DataOnDemand service More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | setUpMessaging () const
| Set up local caches. More...
MSG::Level | resetMessaging ()
| Reinitialize internal states. More...
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...

## Private Types
typedef std::map< std::string, std::string > | Map

## Private Member Functions
void | force_update (Gaudi::Details::PropertyBase &p)
void | deprecated_property (Gaudi::Details::PropertyBase &p)

## Private Attributes
SmartIF< IIncidentSvc > | m_incSvc = nullptr
| Incident service. More...
SmartIF< IAlgManager > | m_algMgr = nullptr
| Algorithm manager. More...
SmartIF< IDataProviderSvc > | m_dataSvc = nullptr
| Data provider reference. More...
SmartIF< IToolSvc > | m_toolSvc
| Data provider reference. 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...
bool | m_updateRequired = true
ChronoEntity | m_total
unsigned long long | m_statAlg = 0
unsigned long long | m_statNode = 0
unsigned long long | m_stat = 0
ChronoEntity | m_timer_nodes
ChronoEntity | m_timer_algs
ChronoEntity | m_timer_all
bool | m_locked_nodes = false
bool | m_locked_algs = false
bool | m_locked_all = false
std::vector< IDODNodeMapper * > | m_nodeMappers
std::vector< IDODAlgMapper * > | m_algMappers
Gaudi::Property< std::string > | m_trapType {this, "IncidentName", "DataFault", "the type of handled Incident"}
Gaudi::Property< std::string > | m_dataSvcName {this, "DataSvc", "EventDataSvc", "DataSvc name"}
Gaudi::Property< bool > | m_partialPath {this, "UsePreceedingPath", true, "allow creation of partial leaves"}
Gaudi::Property< bool > | m_dump
Gaudi::Property< bool > | m_init {this, "PreInitialize", false, "(pre)initialize all algorithms"}
Gaudi::Property< bool > | m_allowInitFailure
Gaudi::Property< Setup > | m_algMapping
Gaudi::Property< Setup > | m_nodeMapping
Gaudi::Property< Map > | m_algMap {this, "AlgMap", {}, &DataOnDemandSvc::force_update, "mapping {'data': 'algorithm'}"}
Gaudi::Property< Map > | m_nodeMap {this, "NodeMap", {}, &DataOnDemandSvc::force_update, "mapping {'data': 'type'}"}
Gaudi::Property< std::string > | m_prefix {this, "Prefix", "/Event/"}
Gaudi::Property< std::vector< std::string > > | m_nodeMapTools
Gaudi::Property< std::vector< std::string > > | m_algMapTools

## Additional Inherited Members
Protected Attributes inherited from Service
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_auditInit {this, "AuditServices", false, " unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Detailed Description

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:

- Node handlers, if objects other than the default object type have to be instantiated. DataOnDemandSvc.Nodes = { "DATA='/Event/Rec' TYPE='DataObject'", "DATA='/Event/Rec/Muon' TYPE='DataObject'" };
- Leaf handlers (Algorithms), which get instantiated and executed on demand. DataOnDemandSvc.Algorithms = { "DATA='/Event/Rec/Muon/Digits' TYPE='MuonDigitAlg/MyMuonDigits'" }; If the algorithm name is omitted the class name will be the instance name.

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:)

DataOnDemandSvc.AlgMap +=
{ "Phys/StdLoosePions/Particles" : "PreLoadParticles/StdLoosePions" ,
"Phys/StdLoosePions/Vertioces" : "PreLoadParticles/StdLoosePions" } ;
DataOnDemandSvc.NodeMap +=
{ "Phys" : "DataObject" ,
"MC" : "DataObject" } ;

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.

Author
  M.Frank

Version
  1.0

Definition at line 90 of file DataOnDemandSvc.h.

## Member Typedef Documentation

## ◆ AlgMap

typedef GaudiUtils::HashMap<Gaudi::StringKey, Leaf> DataOnDemandSvc::AlgMap

Definition at line 147 of file DataOnDemandSvc.h.

## ◆ ClassH

typedef TClass* DataOnDemandSvc::ClassH

Definition at line 95 of file DataOnDemandSvc.h.

## ◆ Map

typedef std::map<std::string, std::string> DataOnDemandSvc::Map
| private

Definition at line 267 of file DataOnDemandSvc.h.

## ◆ NodeMap

typedef GaudiUtils::HashMap<Gaudi::StringKey, Node> DataOnDemandSvc::NodeMap

Definition at line 146 of file DataOnDemandSvc.h.

## ◆ Setup

typedef std::vector<std::string> DataOnDemandSvc::Setup

Definition at line 94 of file DataOnDemandSvc.h.

## Member Function Documentation

## ◆ configureHandler()

StatusCode DataOnDemandSvc::configureHandler | ( | Leaf & | leaf | ) |
| protected

Configure handler for leaf.

Parameters

  leaf | [IN] Reference to leaf handler

Returns
  StatusCode indicating success or failure

Definition at line 385 of file DataOnDemandSvc.cpp.

385 {
386 if ( l.algorithm ) { return StatusCode::SUCCESS; }
387 if ( !m_algMgr ) { return StatusCode::FAILURE; }
388 l.algorithm = m_algMgr->algorithm( l.name, false );
389 if ( l.algorithm ) { return StatusCode::SUCCESS; }
390 // create it!
391 StatusCode sc = m_algMgr->createAlgorithm( l.type, l.name, l.algorithm, true );
392 if ( sc.isFailure() ) {
393 error() << "Failed to create algorithm " << l.type << "('" << l.name << "')" << endmsg;
394 l.algorithm = nullptr;
395 return sc; // RETURN
396 }
397 if ( l.algorithm->isInitialized() ) { return StatusCode::SUCCESS; }
398 // initialize it!
399 sc = l.algorithm->sysInitialize();
400 if ( sc.isFailure() ) {
401 error() << "Failed to initialize algorithm " << l.type << "('" << l.name << "')" << endmsg;
402 l.algorithm = nullptr;
403 return sc; // RETURN
404 }
405 if ( Gaudi::StateMachine::RUNNING == l.algorithm->FSMState() ) { return StatusCode::SUCCESS; }
406 // run it!
407 sc = l.algorithm->sysStart();
408 if ( sc.isFailure() ) {
409 error() << "Failed to 'run' algorithm " << l.type << "('" << l.name << "')" << endmsg;
410 l.algorithm = nullptr;
411 return sc; // RETURN
412 }
413 return StatusCode::SUCCESS;
414 }
IAlgManager::algorithm
virtual SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
IAlgManager::createAlgorithm
virtual StatusCode createAlgorithm(const std::string &algtype, const std::string &algname, IAlgorithm *&alg, bool managed=false, bool checkIfExists=true)=0
Create an instance of a algorithm type that has been declared beforehand and assigns to it a name.
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
gaudirun.l
dictionary l
Definition: gaudirun.py:521
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:16
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:219
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ deprecated_property()

void DataOnDemandSvc::deprecated_property | ( | Gaudi::Details::PropertyBase & | p | ) |
| inline private

Definition at line 210 of file DataOnDemandSvc.h.

210 {
211 warning() << p.name() << " " << p.documentation() << endmsg;
212 force_update( p );
213 };
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: Property.h:36
DataOnDemandSvc::force_update
void force_update(Gaudi::Details::PropertyBase &p)
Definition: DataOnDemandSvc.h:206
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi::Details::PropertyBase::documentation
std::string documentation() const
property documentation
Definition: Property.h:38

## ◆ dump()

void DataOnDemandSvc::dump | ( | const MSG::Level | level,
|  | const bool | mode = `true`
| ) |  | const
| protected

dump the content of DataOnDemand service

Parameters

  level | the printout level
  mode | the printout mode

Definition at line 605 of file DataOnDemandSvc.cpp.

605 {
606 if ( m_algs.empty() && m_nodes.empty() ) { return; }
607
608 typedef std::pair<std::string, std::string> Pair;
609 std::map<std::string, Pair> _m;
610 for ( auto& alg : m_algs ) {
611 auto check = _m.find( alg.first );
612 if ( _m.end() != check ) {
613 warning() << " The data item is activated for '" << check->first << "' as '" << check->second.first << "'"
614 << endmsg;
615 }
616 const Leaf& l = alg.second;
617 std::string nam = ( l.name == l.type ? l.type : ( l.type + "/" + l.name ) );
618 //
619 if ( !mode && 0 == l.num ) { continue; }
620 //
621 std::string val;
622 if ( mode ) {
623 val = ( !l.algorithm ) ? "F" : "T";
624 } else {
625 val = std::to_string( l.num );
626 }
627 //
628 _m[no_prefix( alg.first, m_prefix )] = {nam, val};
629 }
630 // nodes:
631 for ( const auto& node : m_nodes ) {
632 auto check = _m.find( node.first );
633 if ( _m.end() != check ) {
634 warning() << " The data item is already activated for '" << check->first << "' as '" << check->second.first << "'"
635 << endmsg;
636 }
637 const Node& n = node.second;
638 std::string nam = "'" + n.name + "'";
639 //
640 std::string val;
641
642 if ( !mode && 0 == n.num ) { continue; }
643
644 if ( mode ) {
645 val = ( 0 == n.clazz ) ? "F" : "T";
646 } else {
647 val = std::to_string( n.num );
648 }
649 //
650 _m[no_prefix( node.first, m_prefix )] = {nam, val};
651 }
652 //
653 if ( _m.empty() ) { return; }
654
655 // find the correct formats
656 size_t n1 = 0;
657 size_t n2 = 0;
658 size_t n3 = 0;
659 for ( const auto& i : _m ) {
660 n1 = std::max( n1, i.first.size() );
661 n2 = std::max( n2, i.second.first.size() );
662 n3 = std::max( n3, i.second.second.size() );
663 }
664 if ( 10 > n1 ) { n1 = 10; }
665 if ( 10 > n2 ) { n2 = 10; }
666 if ( 60 < n1 ) { n1 = 60; }
667 if ( 60 < n2 ) { n2 = 60; }
668 //
669
670 const std::string _f = " | %%1$-%1%.%1%s | %%2$-%2%.%2%s | %%3$%3%.%3%s |";
671 boost::format _ff( _f );
672 _ff % n1 % n2 % n3;
673
674 const std::string _format = _ff.str();
675
676 auto& msg = msgStream( level );
677
678 if ( mode ) {
679 msg << "Data-On-Demand Actions enabled for:";
680 } else {
681 msg << "Data-On-Demand Actions has been used for:";
682 }
683
684 boost::format fmt1( _format );
685 fmt1 % "Address" % "Creator" % ( mode ? "S" : "#" );
686 //
687 const std::string header = fmt1.str();
688 std::string line = std::string( header.size(), '-' );
689 line[0] = ' ';
690
691 msg << '\n' << line << '\n' << header << '\n' << line;
692
693 // make the actual printout:
694 for ( const auto& item : _m ) {
695 boost::format fmt( _format );
696 msg << '\n' << ( fmt % item.first % item.second.first % item.second.second );
697 }
698
699 msg << '\n' << line << endmsg;
700 }
std::map::empty
T empty(T... args)
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
std::to_string
T to_string(T... args)
std::map::end
T end(T... args)
std::map
STL class.
Gaudi::Utils::Histos::Formats::header
GAUDI_API std::string header(const int ID=Default)
get the recommended header by enum
Definition: HistoTableFormat.cpp:187
std::string
STL class.
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:210
DataOnDemandSvc::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: DataOnDemandSvc.h:271
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:227
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:71
std::max
T max(T... args)
gaudirun.l
dictionary l
Definition: gaudirun.py:521
std::pair< std::string, std::string >
std::map::find
T find(T... args)
std::string::size
T size(T... args)
CommonMessagingBase::msg
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:113
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:225
GaudiUtils::Map::empty
bool empty() const
Definition: Map.h:191
gaudirun.level
level
Definition: gaudirun.py:334
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
plotSpeedupsPyRoot.line
line
Definition: plotSpeedupsPyRoot.py:170

## ◆ execHandler() [1/2]

StatusCode DataOnDemandSvc::execHandler | ( | const std::string & | tag,
|  | Leaf & | leaf
| ) |  |
| protected

Execute leaf handler (algorithm)

Parameters

  tag | [IN] Path to requested leaf
  leaf | [IN] Reference to leaf handler

Returns
  StatusCode indicating success or failure

Definition at line 569 of file DataOnDemandSvc.cpp.

569 {
570 Gaudi::Utils::LockedChrono timer( m_timer_algs, m_locked_algs );
571 //
572 if ( l.executing ) { return StatusCode::FAILURE; } // RETURN
573 //
574 if ( !l.algorithm ) {
575 StatusCode sc = configureHandler( l );
576 if ( sc.isFailure() ) {
577 error() << "Failed to configure handler for: " << l.name << "[" << l.type << "] " << tag << endmsg;
578 return sc; // RETURN
579 }
580 }
581 //
582 Chrono atimer( m_total );
583 //
584 Protection p( l.executing );
585 // FIXME: this will cause problems for Hive, as we need to set
586 // the EventContext of the called Algorithm.
587 // if (!l.algorithm->getContext()) {
588 // l.algorithm->setContext( &Gaudi::Hive::currentContext() );
589 // }
590 StatusCode sc = l.algorithm->sysExecute( Gaudi::Hive::currentContext() );
591 if ( sc.isFailure() ) {
592 error() << "Failed to execute the algorithm:" << l.algorithm->name() << " for location:" << tag << endmsg;
593 return sc; // RETURN
594 }
595 ++l.num;
596 //
597 return StatusCode::SUCCESS;
598 }
DataOnDemandSvc::m_timer_algs
ChronoEntity m_timer_algs
Definition: DataOnDemandSvc.h:237
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Chrono
A small utility class for chronometry of user codes.
Definition: Chrono.h:25
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Gaudi::Hive::currentContext
GAUDI_API const EventContext & currentContext()
Definition: ThreadLocalContext.cpp:20
gaudirun.l
dictionary l
Definition: gaudirun.py:521
Gaudi::Utils::LockedChrono
Helper object, useful for measurement of CPU-performance of highly-recursive structures,...
Definition: LockedChrono.h:50
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
DataOnDemandSvc::m_total
ChronoEntity m_total
Definition: DataOnDemandSvc.h:231
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
DataOnDemandSvc::configureHandler
StatusCode configureHandler(Leaf &leaf)
Configure handler for leaf.
Definition: DataOnDemandSvc.cpp:385
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
DataOnDemandSvc::m_locked_algs
bool m_locked_algs
Definition: DataOnDemandSvc.h:240

## ◆ execHandler() [2/2]

StatusCode DataOnDemandSvc::execHandler | ( | const std::string & | tag,
|  | Node & | node
| ) |  |
| protected

Execute node handler (simple object creation using seal reflection)

Parameters

  tag | [IN] Path to requested leaf
  node | [IN] Reference to node handler

Returns
  StatusCode indicating success or failure

Definition at line 529 of file DataOnDemandSvc.cpp.

529 {
530
531 Gaudi::Utils::LockedChrono timer( m_timer_nodes, m_locked_nodes );
532
533 if ( n.executing ) { return StatusCode::FAILURE; } // RETURN
534
535 Protection p( n.executing );
536
537 std::unique_ptr<DataObject> object;
538
539 if ( n.dataObject ) {
540 object.reset( new DataObject() );
541 } else {
542 // try to recover the handler
543 if ( !n.clazz ) { n.clazz = TClass::GetClass( n.name.c_str() ); }
544 if ( !n.clazz ) {
545 error() << "Failed to get dictionary for class '" << n.name << "' for location:" << tag << endmsg;
546 return StatusCode::FAILURE; // RETURN
547 }
548
549 object.reset( reinterpret_cast<DataObject*>( n.clazz->New() ) );
550
551 if ( !object ) {
552 error() << "Failed to create an object of type:" << n.clazz->GetName() << " for location:" << tag << endmsg;
553 return StatusCode::FAILURE; // RETURN
554 }
555 }
556 //
557 StatusCode sc = m_dataSvc->registerObject( tag, object.release() );
558 if ( sc.isFailure() ) {
559 error() << "Failed to register an object of type:" << n.name << " at location:" << tag << endmsg;
560 return sc; // RETURN
561 }
562 ++n.num;
563 //
564 return StatusCode::SUCCESS;
565 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DataOnDemandSvc::m_locked_nodes
bool m_locked_nodes
Definition: DataOnDemandSvc.h:239
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:221
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:210
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
std::unique_ptr::reset
T reset(T... args)
GaudiPython.Bindings.DataObject
DataObject
Definition: Bindings.py:55
std::unique_ptr
STL class.
IDataProviderSvc::registerObject
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
Definition: IDataProviderSvc.h:62
Gaudi::Utils::LockedChrono
Helper object, useful for measurement of CPU-performance of highly-recursive structures,...
Definition: LockedChrono.h:50
DataOnDemandSvc::m_timer_nodes
ChronoEntity m_timer_nodes
Definition: DataOnDemandSvc.h:236
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ finalize()

StatusCode DataOnDemandSvc::finalize | ( |  | ) |
| override

Inherited Service overrides: Service finalization.

Definition at line 201 of file DataOnDemandSvc.cpp.

201 {
202 //
203 info() << "Handled \"" << m_trapType.value() << "\" incidents: " << m_statAlg << "/" << m_statNode << "/" << m_stat
204 << "(Alg/Node/Total)." << endmsg;
205 if ( m_dump || msgLevel( MSG::DEBUG ) ) {
206 info() << m_total.outputUserTime( "Algorithm timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
207 System::milliSec )
208 << m_total.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
209 info() << m_timer_nodes.outputUserTime( "Nodes timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
210 System::milliSec )
211 << m_timer_nodes.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
212 info() << m_timer_algs.outputUserTime( "Algs timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
213 System::milliSec )
214 << m_timer_algs.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
215 info() << m_timer_all.outputUserTime( "All timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
216 System::milliSec )
217 << m_timer_all.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
218 }
219 // dump it!
220 if ( m_dump ) {
221 dump( MSG::INFO, false );
222 } else if ( msgLevel( MSG::DEBUG ) ) {
223 dump( MSG::DEBUG, false );
224 }
225 //
226 if ( m_incSvc ) {
227 m_incSvc->removeListener( this, m_trapType );
228 m_incSvc.reset();
229 }
230 m_algMgr.reset();
231 m_dataSvc.reset();
232 if ( m_toolSvc ) { // we may not have retrieved the ToolSvc
233 // Do not call releaseTool if the ToolSvc was already finalized.
234 if ( SmartIF<IStateful>( m_toolSvc )->FSMState() > Gaudi::StateMachine::CONFIGURED ) {
235 for ( const auto& i : m_nodeMappers ) m_toolSvc->releaseTool( i ).ignore();
236 for ( const auto& i : m_algMappers ) m_toolSvc->releaseTool( i ).ignore();
237 } else {
238 warning() << "ToolSvc already finalized: cannot release tools. Check options." << endmsg;
239 }
240 m_nodeMappers.clear();
241 m_algMappers.clear();
242 m_toolSvc.reset();
243 }
244 return Service::finalize();
245 }
DataOnDemandSvc::m_timer_all
ChronoEntity m_timer_all
Definition: DataOnDemandSvc.h:238
SmartIF< IStateful >
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:14
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:164
DataOnDemandSvc::m_timer_algs
ChronoEntity m_timer_algs
Definition: DataOnDemandSvc.h:237
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:52
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:217
MSG::DEBUG
Definition: IMessageSvc.h:15
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:247
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:104
System::milliSec
Definition: Timing.h:57
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:605
System::Sec
Definition: Timing.h:57
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:221
DataOnDemandSvc::m_stat
unsigned long long m_stat
Definition: DataOnDemandSvc.h:234
std::vector::clear
T clear(T... args)
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:243
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:219
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:223
DataOnDemandSvc::m_timer_nodes
ChronoEntity m_timer_nodes
Definition: DataOnDemandSvc.h:236
IToolSvc::releaseTool
virtual StatusCode releaseTool(IAlgTool *tool)=0
Release the tool.
DataOnDemandSvc::m_total
ChronoEntity m_total
Definition: DataOnDemandSvc.h:231
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:86
IIncidentSvc::removeListener
virtual void removeListener(IIncidentListener *lis, const std::string &type="")=0
Remove listener.
MSG::INFO
Definition: IMessageSvc.h:15
DataOnDemandSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: DataOnDemandSvc.h:251
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:244
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
DataOnDemandSvc::m_statNode
unsigned long long m_statNode
Definition: DataOnDemandSvc.h:233
DataOnDemandSvc::m_statAlg
unsigned long long m_statAlg
Definition: DataOnDemandSvc.h:232
ChronoEntity::outputUserTime
std::string outputUserTime() const
print the chrono ;
Definition: ChronoEntity.cpp:82

## ◆ force_update()

void DataOnDemandSvc::force_update | ( | Gaudi::Details::PropertyBase & | p | ) |
| inline private

Definition at line 206 of file DataOnDemandSvc.h.

206 {
207 verbose() << "updated property " << p.name() << ", forcing update" << endmsg;
208 m_updateRequired = true;
209 };
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: Property.h:36
CommonMessagingBase::verbose
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Definition: CommonMessaging.h:110
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:229
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ handle()

void DataOnDemandSvc::handle | ( | const Incident & | incident | ) |
| override

IIncidentListener interfaces overrides: incident handling.

Definition at line 467 of file DataOnDemandSvc.cpp.

467 {
468
469 Gaudi::Utils::LockedChrono timer( m_timer_all, m_locked_all );
470
471 ++m_stat;
472 // proper incident type?
473 if ( incident.type() != m_trapType ) { return; } // RETURN
474 const DataIncident* inc = dynamic_cast<const DataIncident*>( &incident );
475 if ( !inc ) { return; } // RETURN
476 // update if needed!
477 if ( m_updateRequired ) { update(); }
478
479 if ( msgLevel( MSG::VERBOSE ) ) {
480 verbose() << "Incident: [" << incident.type() << "] "
481 << " = " << incident.source() << " Location:" << inc->tag() << endmsg;
482 }
483 // ==========================================================================
484 Gaudi::StringKey tag( inc->tag() );
485 // ==========================================================================
486 auto icl = m_nodes.find( tag );
487 if ( icl != m_nodes.end() ) {
488 StatusCode sc = execHandler( tag, icl->second );
489 if ( sc.isSuccess() ) { ++m_statNode; }
490 return; // RETURN
491 }
492 // ==========================================================================
493 auto ialg = m_algs.find( tag );
494 if ( ialg != m_algs.end() ) {
495 StatusCode sc = execHandler( tag, ialg->second );
496 if ( sc.isSuccess() ) { ++m_statAlg; }
497 return; // RETURN
498 }
499 // ==========================================================================
500 // Fall back on the tools
501 if ( m_toolSvc ) {
502 if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Try to find mapping with mapping tools" << endmsg;
503 Finder finder( no_prefix( inc->tag(), m_prefix ), m_nodeMappers, m_algMappers );
504 // - try the node mappers
505 std::string node = finder.node();
506 if ( isGood( node ) ) {
507 // if one is found update the internal node mapping and try again.
508 if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Found Node handler: " << node << endmsg;
509 i_setNodeHandler( inc->tag(), node );
510 handle( incident );
511 --m_stat; // avoid double counting because of recursion
512 return;
513 }
514 // - try alg mappings
515 Gaudi::Utils::TypeNameString alg = finder.alg();
516 if ( isGood( alg ) ) {
517 // we got an algorithm, update alg map and try to handle again
518 if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Found Algorithm handler: " << alg << endmsg;
519 i_setAlgHandler( inc->tag(), alg ).ignore();
520 handle( incident );
521 --m_stat; // avoid double counting because of recursion
522 return;
523 }
524 }
525 }
DataOnDemandSvc::i_setNodeHandler
void i_setNodeHandler(const std::string &name, const std::string &type)
Internal method to initialize a node handler.
Definition: DataOnDemandSvc.cpp:106
DataOnDemandSvc::m_timer_all
ChronoEntity m_timer_all
Definition: DataOnDemandSvc.h:238
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
Incident::type
const std::string & type() const
Access to the incident type.
Definition: Incident.h:38
DataOnDemandSvc::handle
void handle(const Incident &incident) override
IIncidentListener interfaces overrides: incident handling.
Definition: DataOnDemandSvc.cpp:467
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:247
MSG::VERBOSE
Definition: IMessageSvc.h:15
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:34
Incident::source
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:44
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
std::string
STL class.
DataOnDemandSvc::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: DataOnDemandSvc.h:271
DataOnDemandSvc::m_stat
unsigned long long m_stat
Definition: DataOnDemandSvc.h:234
GaudiUtils::Map::end
iterator end()
Definition: Map.h:130
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:10
DataOnDemandSvc::execHandler
StatusCode execHandler(const std::string &tag, Leaf &leaf)
Execute leaf handler (algorithm)
Definition: DataOnDemandSvc.cpp:569
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
GaudiUtils::Map::find
iterator find(const key_type &key)
Definition: Map.h:147
CommonMessagingBase::verbose
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Definition: CommonMessaging.h:110
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:227
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:243
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:223
Gaudi::Utils::LockedChrono
Helper object, useful for measurement of CPU-performance of highly-recursive structures,...
Definition: LockedChrono.h:50
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:225
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:229
DataIncident
Data service incident class.
DataOnDemandSvc::i_setAlgHandler
StatusCode i_setAlgHandler(const std::string &name, const Gaudi::Utils::TypeNameString &alg)
Internal method to initialize an algorithm handler.
Definition: DataOnDemandSvc.cpp:112
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:244
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
DataOnDemandSvc::m_statNode
unsigned long long m_statNode
Definition: DataOnDemandSvc.h:233
DataOnDemandSvc::m_statAlg
unsigned long long m_statAlg
Definition: DataOnDemandSvc.h:232
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:132
DataOnDemandSvc::m_locked_all
bool m_locked_all
Definition: DataOnDemandSvc.h:241

## ◆ i_setAlgHandler()

StatusCode DataOnDemandSvc::i_setAlgHandler | ( | const std::string & | name,
|  | const Gaudi::Utils::TypeNameString & | alg
| ) |  |
| protected

Internal method to initialize an algorithm handler.

Definition at line 112 of file DataOnDemandSvc.cpp.

112 {
113 Leaf leaf( alg.type(), alg.name() );
114 if ( m_init ) {
115 StatusCode sc = configureHandler( leaf );
116 if ( sc.isFailure() ) {
117 if ( m_allowInitFailure ) {
118 // re-store the content of the leaf object to try again to initialize
119 // the algorithm later (on demand)
120 leaf = Leaf( alg.type(), alg.name() );
121 } else
122 return sc;
123 }
124 }
125 m_algs[name] = leaf;
126 return StatusCode::SUCCESS;
127 }
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DataOnDemandSvc::m_init
Gaudi::Property< bool > m_init
Definition: DataOnDemandSvc.h:257
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:225
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
DataOnDemandSvc::configureHandler
StatusCode configureHandler(Leaf &leaf)
Configure handler for leaf.
Definition: DataOnDemandSvc.cpp:385
DataOnDemandSvc::m_allowInitFailure
Gaudi::Property< bool > m_allowInitFailure
Definition: DataOnDemandSvc.h:258

## ◆ i_setNodeHandler()

void DataOnDemandSvc::i_setNodeHandler | ( | const std::string & | name,
|  | const std::string & | type
| ) |  |
| protected

Internal method to initialize a node handler.

Definition at line 106 of file DataOnDemandSvc.cpp.

106 {
107 ClassH cl = TClass::GetClass( type.c_str() );
108 if ( !cl ) { warning() << "Failed to access dictionary class for " << name << " of type:" << type << endmsg; }
109 m_nodes[name] = Node( cl, false, type );
110 }
DataOnDemandSvc::ClassH
TClass * ClassH
Definition: DataOnDemandSvc.h:95
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
gaudirun.type
type
Definition: gaudirun.py:142
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:227
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ initialize()

StatusCode DataOnDemandSvc::initialize | ( |  | ) |
| override

Inherited Service overrides: Service initialization.

Definition at line 181 of file DataOnDemandSvc.cpp.

181 {
182 // initialize the Service Base class
183 StatusCode sc = Service::initialize();
184 if ( sc.isFailure() ) { return sc; }
185 sc = setup();
186 if ( sc.isFailure() ) { return sc; }
187 //
188 if ( m_dump ) {
189 dump( MSG::INFO );
190 } else if ( msgLevel( MSG::DEBUG ) ) {
191 dump( MSG::DEBUG );
192 }
193 //
194 if ( m_init ) { return update(); }
195 //
196 return StatusCode::SUCCESS;
197 }
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:60
MSG::DEBUG
Definition: IMessageSvc.h:15
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DataOnDemandSvc::m_init
Gaudi::Property< bool > m_init
Definition: DataOnDemandSvc.h:257
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:605
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
DataOnDemandSvc::setup
StatusCode setup()
Setup routine (called by (re-) initialize.
Definition: DataOnDemandSvc.cpp:280
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
MSG::INFO
Definition: IMessageSvc.h:15
DataOnDemandSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: DataOnDemandSvc.h:251
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:132

## ◆ reinitialize()

StatusCode DataOnDemandSvc::reinitialize | ( |  | ) |
| override

Inherited Service overrides: Service reinitialization.

re-initialization of the service

Definition at line 249 of file DataOnDemandSvc.cpp.

249 {
250 // reinitialize the Service Base class
251 if ( m_incSvc ) {
252 m_incSvc->removeListener( this, m_trapType );
253 m_incSvc.reset();
254 }
255 m_algMgr.reset();
256 m_dataSvc.reset();
257 for ( const auto& i : m_nodeMappers ) m_toolSvc->releaseTool( i ).ignore();
258 m_nodeMappers.clear();
259 for ( const auto& i : m_algMappers ) m_toolSvc->releaseTool( i ).ignore();
260 m_algMappers.clear();
261 m_toolSvc.reset();
262 //
263 StatusCode sc = Service::reinitialize();
264 if ( sc.isFailure() ) { return sc; }
265 //
266 sc = setup();
267 if ( sc.isFailure() ) { return sc; }
268 //
269 if ( m_dump ) {
270 dump( MSG::INFO );
271 } else if ( msgLevel( MSG::DEBUG ) ) {
272 dump( MSG::DEBUG );
273 }
274 //
275 return StatusCode::SUCCESS;
276 }
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:217
MSG::DEBUG
Definition: IMessageSvc.h:15
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:247
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:605
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:221
DataOnDemandSvc::setup
StatusCode setup()
Setup routine (called by (re-) initialize.
Definition: DataOnDemandSvc.cpp:280
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Service::reinitialize
StatusCode reinitialize() override
Definition: Service.cpp:237
std::vector::clear
T clear(T... args)
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:243
StatusCode::ignore
const StatusCode & ignore() const
Ignore/check StatusCode.
Definition: StatusCode.h:153
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:219
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:223
IToolSvc::releaseTool
virtual StatusCode releaseTool(IAlgTool *tool)=0
Release the tool.
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:86
IIncidentSvc::removeListener
virtual void removeListener(IIncidentListener *lis, const std::string &type="")=0
Remove listener.
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
MSG::INFO
Definition: IMessageSvc.h:15
DataOnDemandSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: DataOnDemandSvc.h:251
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:244

## ◆ setup()

StatusCode DataOnDemandSvc::setup | ( |  | ) |
| protected

Setup routine (called by (re-) initialize.

Definition at line 280 of file DataOnDemandSvc.cpp.

280 {
281 if ( !( m_algMgr = serviceLocator() ) ) // assignment meant
282 {
283 error() << "Failed to retrieve the IAlgManager interface." << endmsg;
284 return StatusCode::FAILURE;
285 }
286
287 if ( !( m_incSvc = serviceLocator()->service( "IncidentSvc" ) ) ) // assignment meant
288 {
289 error() << "Failed to retrieve Incident service." << endmsg;
290 return StatusCode::FAILURE;
291 }
292 m_incSvc->addListener( this, m_trapType );
293
294 if ( !( m_dataSvc = serviceLocator()->service( m_dataSvcName ) ) ) // assignment meant
295 {
296 error() << "Failed to retrieve the data provider interface of " << m_dataSvcName << endmsg;
297 return StatusCode::FAILURE;
298 }
299
300 // No need to get the ToolSvc if we are not using tools
301 if ( !( m_nodeMapTools.empty() && m_algMapTools.empty() ) ) {
302 if ( !( m_toolSvc = serviceLocator()->service( "ToolSvc" ) ) ) // assignment meant
303 {
304 error() << "Failed to retrieve ToolSvc" << endmsg;
305 return StatusCode::FAILURE;
306 }
307
308 // load the node mapping tools
309 IDODNodeMapper* nodetool = nullptr;
310 for ( const auto& i : m_nodeMapTools ) {
311 const StatusCode sc = m_toolSvc->retrieveTool( i, nodetool );
312 if ( sc.isFailure() ) return sc;
313 m_nodeMappers.push_back( nodetool );
314 }
315 IDODAlgMapper* algtool = nullptr;
316 for ( const auto& i : m_algMapTools ) {
317 const StatusCode sc = m_toolSvc->retrieveTool( i, algtool );
318 if ( sc.isFailure() ) return sc;
319 m_algMappers.push_back( algtool );
320 }
321 }
322 return update();
323 }
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:277
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:217
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:247
IToolSvc::retrieveTool
StatusCode retrieveTool(const std::string &type, T *&tool, const IInterface *parent=nullptr, bool createIf=true)
Retrieve specified tool sub-type with tool dependent part of the name automatically assigned.
Definition: IToolSvc.h:138
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:221
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
DataOnDemandSvc::m_algMapTools
Gaudi::Property< std::vector< std::string > > m_algMapTools
Definition: DataOnDemandSvc.h:275
std::vector::push_back
T push_back(T... args)
IDODNodeMapper
Interface of tools used by the DataOnDemandSvc to choose the type of node to be created at a path.
Definition: IDODNodeMapper.h:17
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
DataOnDemandSvc::m_nodeMapTools
Gaudi::Property< std::vector< std::string > > m_nodeMapTools
Definition: DataOnDemandSvc.h:273
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:243
IDODAlgMapper
Interface of tools used by the DataOnDemandSvc to choose the algorithm to be run to produce the data ...
Definition: IDODAlgMapper.h:17
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:219
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:223
DataOnDemandSvc::m_dataSvcName
Gaudi::Property< std::string > m_dataSvcName
Definition: DataOnDemandSvc.h:248
IIncidentSvc::addListener
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
Service::service
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.
Definition: Service.h:83
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:244
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:132

## ◆ setupAlgHandlers()

StatusCode DataOnDemandSvc::setupAlgHandlers | ( |  | ) |
| protected

Initialize leaf handlers.

Definition at line 356 of file DataOnDemandSvc.cpp.

356 {
357 std::string typ, tag;
358
359 for ( auto alg : m_algMapping ) {
360 using Parser = Gaudi::Utils::AttribStringParser;
361 for ( auto attrib : Parser( alg ) ) {
362 switch ( ::toupper( attrib.tag[0] ) ) {
363 case 'D':
364 tag = std::move( attrib.value );
365 break;
366 case 'T':
367 typ = std::move( attrib.value );
368 break;
369 }
370 }
371 Gaudi::Utils::TypeNameString item( typ );
372 if ( m_algMap.end() != m_algMap.find( tag ) || m_nodeMap.end() != m_nodeMap.find( tag ) ) {
373 warning() << "The obsolete property 'Algorithms' redefines the action for '" + tag + "' to be '" + item.type() +
374 "/" + item.name() + "'"
375 << endmsg;
376 }
377 m_algMap[tag] = item.type() + "/" + item.name();
378 }
379 m_updateRequired = true;
380 return StatusCode::SUCCESS;
381 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DataOnDemandSvc::m_nodeMap
Gaudi::Property< Map > m_nodeMap
Definition: DataOnDemandSvc.h:269
std::string
STL class.
DataOnDemandSvc::m_algMapping
Gaudi::Property< Setup > m_algMapping
Definition: DataOnDemandSvc.h:262
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:10
DataOnDemandSvc::m_algMap
Gaudi::Property< Map > m_algMap
Definition: DataOnDemandSvc.h:268
std::move
T move(T... args)
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:229
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:7
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ setupNodeHandlers()

StatusCode DataOnDemandSvc::setupNodeHandlers | ( |  | ) |
| protected

Initialize node handlers.

Definition at line 327 of file DataOnDemandSvc.cpp.

327 {
328 std::string nam, typ, tag;
329 StatusCode sc = StatusCode::SUCCESS;
330 // Setup for node leafs, where simply a constructor is called...
331 for ( auto node : m_nodeMapping ) {
332 using Parser = Gaudi::Utils::AttribStringParser;
333 for ( auto attrib : Parser( node ) ) {
334 switch ( ::toupper( attrib.tag[0] ) ) {
335 case 'D':
336 tag = std::move( attrib.value );
337 break;
338 case 'T':
339 nam = std::move( attrib.value );
340 break;
341 }
342 }
343 if ( m_algMap.end() != m_algMap.find( tag ) || m_nodeMap.end() != m_nodeMap.find( tag ) ) {
344 warning() << "The obsolete property 'Nodes' redefines the action for '" + tag + "' to be '" + nam + "'" << endmsg;
345 }
346 m_nodeMap[tag] = nam;
347 }
348 //
349 m_updateRequired = true;
350 //
351 return sc;
352 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DataOnDemandSvc::m_nodeMap
Gaudi::Property< Map > m_nodeMap
Definition: DataOnDemandSvc.h:269
std::string
STL class.
DataOnDemandSvc::m_algMap
Gaudi::Property< Map > m_algMap
Definition: DataOnDemandSvc.h:268
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
std::move
T move(T... args)
DataOnDemandSvc::m_nodeMapping
Gaudi::Property< Setup > m_nodeMapping
Definition: DataOnDemandSvc.h:264
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:229
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:7
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ update()

StatusCode DataOnDemandSvc::update | ( |  | ) |
| 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 132 of file DataOnDemandSvc.cpp.

132 {
133 if ( !m_updateRequired ) { return StatusCode::SUCCESS; }
134
136 StatusCode sc = setupNodeHandlers(); // convert "Nodes" new "NodeMap"
137 if ( sc.isFailure() ) {
138 error() << "Failed to setup old \"Nodes\"" << endmsg;
139 return sc;
140 }
142 sc = setupAlgHandlers(); // convert "Algorithms" into "AlgMap"
143 if ( sc.isFailure() ) {
144 error() << "Failed to setup old \"Algorithms\"" << endmsg;
145 return sc;
146 }
148 add_prefix( m_algMap, m_prefix );
150 add_prefix( m_nodeMap, m_prefix );
152 std::set<std::string> dirs;
153 if ( m_partialPath ) { get_dirs( m_algMap, dirs ); }
154 if ( m_partialPath ) { get_dirs( m_nodeMap, dirs ); }
155 //
156 auto _e = dirs.find( "/Event" );
157 if ( dirs.end() != _e ) { dirs.erase( _e ); }
158 // add all directories as nodes
159 for ( const auto& dir : dirs ) {
160 if ( m_algMap.end() == m_algMap.find( dir ) && m_nodeMap.end() == m_nodeMap.find( dir ) )
161 m_nodeMap[dir] = "DataObject";
162 }
163 //
164 m_algs.clear();
165 m_nodes.clear();
166 //
168 for ( const auto& alg : m_algMap ) {
169 if ( i_setAlgHandler( alg.first, alg.second ).isFailure() ) return StatusCode::FAILURE;
170 }
172 for ( const auto& node : m_nodeMap ) { i_setNodeHandler( node.first, node.second ); }
174 m_updateRequired = false;
175 //
176 return StatusCode::SUCCESS;
177 }
DataOnDemandSvc::i_setNodeHandler
void i_setNodeHandler(const std::string &name, const std::string &type)
Internal method to initialize a node handler.
Definition: DataOnDemandSvc.cpp:106
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
DataOnDemandSvc::m_nodeMap
Gaudi::Property< Map > m_nodeMap
Definition: DataOnDemandSvc.h:269
std::set::end
T end(T... args)
DataOnDemandSvc::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: DataOnDemandSvc.h:271
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
DataOnDemandSvc::m_algMap
Gaudi::Property< Map > m_algMap
Definition: DataOnDemandSvc.h:268
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
DataOnDemandSvc::setupNodeHandlers
StatusCode setupNodeHandlers()
Initialize node handlers.
Definition: DataOnDemandSvc.cpp:327
std::set::erase
T erase(T... args)
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:227
DataOnDemandSvc::m_partialPath
Gaudi::Property< bool > m_partialPath
Definition: DataOnDemandSvc.h:250
std::set::find
T find(T... args)
std::set< std::string >
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:225
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:229
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
GaudiUtils::Map::clear
void clear()
Definition: Map.h:185
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
DataOnDemandSvc::setupAlgHandlers
StatusCode setupAlgHandlers()
Initialize leaf handlers.
Definition: DataOnDemandSvc.cpp:356
DataOnDemandSvc::i_setAlgHandler
StatusCode i_setAlgHandler(const std::string &name, const Gaudi::Utils::TypeNameString &alg)
Internal method to initialize an algorithm handler.
Definition: DataOnDemandSvc.cpp:112
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## Member Data Documentation

## ◆ m_algMap

Gaudi::Property<Map> DataOnDemandSvc::m_algMap {this, "AlgMap", {}, &DataOnDemandSvc::force_update, "mapping {'data': 'algorithm'}"}
| private

Definition at line 268 of file DataOnDemandSvc.h.

## ◆ m_algMappers

std::vector<IDODAlgMapper*> DataOnDemandSvc::m_algMappers
| private

Definition at line 244 of file DataOnDemandSvc.h.

## ◆ m_algMapping

Gaudi::Property<Setup> DataOnDemandSvc::m_algMapping
| private

Initial value:
{
this, "Algorithms", {}, &DataOnDemandSvc::deprecated_property, " use AlgMap"}

Definition at line 262 of file DataOnDemandSvc.h.

## ◆ m_algMapTools

Gaudi::Property<std::vector<std::string> > DataOnDemandSvc::m_algMapTools
| private

Initial value:
{
this, "AlgMappingTools", {}, "list of tools of type IDODAlgMapper"}

Definition at line 275 of file DataOnDemandSvc.h.

## ◆ m_algMgr

SmartIF<IAlgManager> DataOnDemandSvc::m_algMgr = nullptr
| private

Algorithm manager.

Definition at line 219 of file DataOnDemandSvc.h.

## ◆ m_algs

AlgMap DataOnDemandSvc::m_algs
| private

Map of algorithms to handle incidents.

Definition at line 225 of file DataOnDemandSvc.h.

## ◆ m_allowInitFailure

Gaudi::Property<bool> DataOnDemandSvc::m_allowInitFailure
| private

Initial value:
{
this, "AllowPreInitializeFailure", false,
"allow (pre)initialization of algorithms to fail without stopping the application"}

Definition at line 258 of file DataOnDemandSvc.h.

## ◆ m_dataSvc

SmartIF<IDataProviderSvc> DataOnDemandSvc::m_dataSvc = nullptr
| private

Data provider reference.

Definition at line 221 of file DataOnDemandSvc.h.

## ◆ m_dataSvcName

Gaudi::Property<std::string> DataOnDemandSvc::m_dataSvcName {this, "DataSvc", "EventDataSvc", "DataSvc name"}
| private

Definition at line 248 of file DataOnDemandSvc.h.

## ◆ m_dump

Gaudi::Property<bool> DataOnDemandSvc::m_dump
| private

Initial value:
{
this, "Dump", false,
[this]( auto& ) {
if ( m_dump && FSMState() >= Gaudi::StateMachine::INITIALIZED ) { dump( MSG::ALWAYS ); }
},
"dump configuration and stastics, if set to True after initialize it triggers a dump immediately"}

Definition at line 251 of file DataOnDemandSvc.h.

## ◆ m_incSvc

SmartIF<IIncidentSvc> DataOnDemandSvc::m_incSvc = nullptr
| private

Incident service.

Definition at line 217 of file DataOnDemandSvc.h.

## ◆ m_init

Gaudi::Property<bool> DataOnDemandSvc::m_init {this, "PreInitialize", false, "(pre)initialize all algorithms"}
| private

Definition at line 257 of file DataOnDemandSvc.h.

## ◆ m_locked_algs

bool DataOnDemandSvc::m_locked_algs = false
| private

Definition at line 240 of file DataOnDemandSvc.h.

## ◆ m_locked_all

bool DataOnDemandSvc::m_locked_all = false
| private

Definition at line 241 of file DataOnDemandSvc.h.

## ◆ m_locked_nodes

bool DataOnDemandSvc::m_locked_nodes = false
| private

Definition at line 239 of file DataOnDemandSvc.h.

## ◆ m_nodeMap

Gaudi::Property<Map> DataOnDemandSvc::m_nodeMap {this, "NodeMap", {}, &DataOnDemandSvc::force_update, "mapping {'data': 'type'}"}
| private

Definition at line 269 of file DataOnDemandSvc.h.

## ◆ m_nodeMappers

std::vector<IDODNodeMapper*> DataOnDemandSvc::m_nodeMappers
| private

Definition at line 243 of file DataOnDemandSvc.h.

## ◆ m_nodeMapping

Gaudi::Property<Setup> DataOnDemandSvc::m_nodeMapping
| private

Initial value:
{
this, "Nodes", {}, &DataOnDemandSvc::deprecated_property, " use NodeMap"}

Definition at line 264 of file DataOnDemandSvc.h.

## ◆ m_nodeMapTools

Gaudi::Property<std::vector<std::string> > DataOnDemandSvc::m_nodeMapTools
| private

Initial value:
{
this, "NodeMappingTools", {}, "list of tools of type IDODNodeMapper"}

Definition at line 273 of file DataOnDemandSvc.h.

## ◆ m_nodes

NodeMap DataOnDemandSvc::m_nodes
| private

Map of "empty" objects to be placed as intermediate nodes.

Definition at line 227 of file DataOnDemandSvc.h.

## ◆ m_partialPath

Gaudi::Property<bool> DataOnDemandSvc::m_partialPath {this, "UsePreceedingPath", true, "allow creation of partial leaves"}
| private

Definition at line 250 of file DataOnDemandSvc.h.

## ◆ m_prefix

Gaudi::Property<std::string> DataOnDemandSvc::m_prefix {this, "Prefix", "/Event/"}
| private

Definition at line 271 of file DataOnDemandSvc.h.

## ◆ m_stat

unsigned long long DataOnDemandSvc::m_stat = 0
| private

Definition at line 234 of file DataOnDemandSvc.h.

## ◆ m_statAlg

unsigned long long DataOnDemandSvc::m_statAlg = 0
| private

Definition at line 232 of file DataOnDemandSvc.h.

## ◆ m_statNode

unsigned long long DataOnDemandSvc::m_statNode = 0
| private

Definition at line 233 of file DataOnDemandSvc.h.

## ◆ m_timer_algs

ChronoEntity DataOnDemandSvc::m_timer_algs
| private

Definition at line 237 of file DataOnDemandSvc.h.

## ◆ m_timer_all

ChronoEntity DataOnDemandSvc::m_timer_all
| private

Definition at line 238 of file DataOnDemandSvc.h.

## ◆ m_timer_nodes

ChronoEntity DataOnDemandSvc::m_timer_nodes
| private

Definition at line 236 of file DataOnDemandSvc.h.

## ◆ m_toolSvc

SmartIF<IToolSvc> DataOnDemandSvc::m_toolSvc
| private

Data provider reference.

Definition at line 223 of file DataOnDemandSvc.h.

## ◆ m_total

ChronoEntity DataOnDemandSvc::m_total
| private

Definition at line 231 of file DataOnDemandSvc.h.

## ◆ m_trapType

Gaudi::Property<std::string> DataOnDemandSvc::m_trapType {this, "IncidentName", "DataFault", "the type of handled Incident"}
| private

Definition at line 247 of file DataOnDemandSvc.h.

## ◆ m_updateRequired

bool DataOnDemandSvc::m_updateRequired = true
| private

Definition at line 229 of file DataOnDemandSvc.h.

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

- GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.h
- GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.cpp