| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | 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
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory
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...
| DataOnDemandSvc (const std::string &name, ISvcLocator *svc)
| Standard initializing service constructor. More...
| ~DataOnDemandSvc () override=default
| Standard destructor. 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...
| ~extends () override=default
| Virtual destructor. 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
| ~PropertyHolder () override=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, TYPE &value, const std::string &doc="none") const
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
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| 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...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. 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 > >
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 = 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
ulonglong | m_statAlg = 0
ulonglong | m_statNode = 0
ulonglong | 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 {this, "Algorithms", {}, "[[deprecated]] use AlgMap"}
Gaudi::Property< Setup > | m_nodeMapping {this, "Nodes", {}, "[[deprecated]] use NodeMap"}
Gaudi::Property< Map > | m_algMap {this, "AlgMap", {}, "mapping {'data': 'algorithm'}"}
Gaudi::Property< Map > | m_nodeMap {this, "NodeMap", {}, "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, "[[deprecated]] 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

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

Definition at line 152 of file DataOnDemandSvc.h.

typedef TClass* DataOnDemandSvc::ClassH

Definition at line 96 of file DataOnDemandSvc.h.

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

Definition at line 264 of file DataOnDemandSvc.h.

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

Definition at line 151 of file DataOnDemandSvc.h.

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

Definition at line 95 of file DataOnDemandSvc.h.

## Constructor & Destructor Documentation

DataOnDemandSvc::DataOnDemandSvc | ( | const std::string & | name,
|  | ISvcLocator * | svc
| ) |  |

Standard initializing service constructor.

Parameters

  name | [IN] Service instance name
  svc | [IN] Pointer to service locator

Returns
  Reference to DataOnDemandSvc object.

Definition at line 41 of file DataOnDemandSvc.cpp.

41 : base_class( name, svc )
42 {
43 m_dump.declareUpdateHandler( [this]( Gaudi::Details::PropertyBase& ) {
44 if ( m_dump && FSMState() >= Gaudi::StateMachine::INITIALIZED ) {
45 dump( MSG::ALWAYS );
46 }
47 } );
48
49 auto force_update = [this]( Gaudi::Details::PropertyBase& p ) {
50 verbose() << "updated property " << p.name() << ", forcig update" << endmsg;
51 m_updateRequired = true;
52 };
53 m_algMap.declareUpdateHandler( force_update );
54 m_nodeMap.declareUpdateHandler( force_update );
55
56 auto deprecated_property = [this, force_update]( Gaudi::Details::PropertyBase& p ) {
57 warning() << p.name() << " " << p.documentation() << endmsg;
58 force_update( p );
59 };
60 m_algMapping.declareUpdateHandler( deprecated_property );
61 m_nodeMapping.declareUpdateHandler( deprecated_property );
62 // ==========================================================================
63 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:17
CommonMessagingBase::verbose
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Definition: CommonMessaging.h:123
DataOnDemandSvc::m_nodeMap
Gaudi::Property< Map > m_nodeMap
Definition: DataOnDemandSvc.h:266
extends< Service, IIncidentListener >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:15
DataOnDemandSvc::m_algMapping
Gaudi::Property< Setup > m_algMapping
Definition: DataOnDemandSvc.h:261
DataOnDemandSvc::m_algMap
Gaudi::Property< Map > m_algMap
Definition: DataOnDemandSvc.h:265
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:114
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:710
DataOnDemandSvc::m_nodeMapping
Gaudi::Property< Setup > m_nodeMapping
Definition: DataOnDemandSvc.h:262
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:231
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:54
DataOnDemandSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: DataOnDemandSvc.h:253
MSG::ALWAYS
Definition: IMessageSvc.h:16
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

DataOnDemandSvc::~DataOnDemandSvc | ( |  | ) |
| override default

Standard destructor.

## Member Function Documentation

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 455 of file DataOnDemandSvc.cpp.

456 {
457 if ( l.algorithm ) {
458 return StatusCode::SUCCESS;
459 }
460 if ( !m_algMgr ) {
461 return StatusCode::FAILURE;
462 }
463 l.algorithm = m_algMgr->algorithm( l.name, false );
464 if ( l.algorithm ) {
465 return StatusCode::SUCCESS;
466 }
467 // create it!
468 StatusCode sc = m_algMgr->createAlgorithm( l.type, l.name, l.algorithm, true );
469 if ( sc.isFailure() ) {
470 error() << "Failed to create algorithm " << l.type << "('" << l.name << "')" << endmsg;
471 l.algorithm = nullptr;
472 return sc; // RETURN
473 }
474 if ( l.algorithm->isInitialized() ) {
475 return StatusCode::SUCCESS;
476 }
477 // initialize it!
478 sc = l.algorithm->sysInitialize();
479 if ( sc.isFailure() ) {
480 error() << "Failed to initialize algorithm " << l.type << "('" << l.name << "')" << endmsg;
481 l.algorithm = nullptr;
482 return sc; // RETURN
483 }
484 if ( Gaudi::StateMachine::RUNNING == l.algorithm->FSMState() ) {
485 return StatusCode::SUCCESS;
486 }
487 // run it!
488 sc = l.algorithm->sysStart();
489 if ( sc.isFailure() ) {
490 error() << "Failed to 'run' algorithm " << l.type << "('" << l.name << "')" << endmsg;
491 l.algorithm = nullptr;
492 return sc; // RETURN
493 }
494 return StatusCode::SUCCESS;
495 }
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
Definition: StatusCode.h:31
StatusCode::FAILURE
Definition: StatusCode.h:31
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...
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:111
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
gaudirun.l
dictionary l
Definition: gaudirun.py:440
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:18
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:221
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

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 710 of file DataOnDemandSvc.cpp.

711 {
712 if ( m_algs.empty() && m_nodes.empty() ) {
713 return;
714 }
715
716 typedef std::pair<std::string, std::string> Pair;
717 std::map<std::string, Pair> _m;
718 for ( auto& alg : m_algs ) {
719 auto check = _m.find( alg.first );
720 if ( _m.end() != check ) {
721 warning() << " The data item is activated for '" << check->first << "' as '" << check->second.first << "'"
722 << endmsg;
723 }
724 const Leaf& l = alg.second;
725 std::string nam = ( l.name == l.type ? l.type : ( l.type + "/" + l.name ) );
726 //
727 if ( !mode && 0 == l.num ) {
728 continue;
729 }
730 //
731 std::string val;
732 if ( mode ) {
733 val = ( !l.algorithm ) ? "F" : "T";
734 } else {
735 val = std::to_string( l.num );
736 }
737 //
738 _m[no_prefix( alg.first, m_prefix )] = {nam, val};
739 }
740 // nodes:
741 for ( const auto& node : m_nodes ) {
742 auto check = _m.find( node.first );
743 if ( _m.end() != check ) {
744 warning() << " The data item is already activated for '" << check->first << "' as '" << check->second.first << "'"
745 << endmsg;
746 }
747 const Node& n = node.second;
748 std::string nam = "'" + n.name + "'";
749 //
750 std::string val;
751
752 if ( !mode && 0 == n.num ) {
753 continue;
754 }
755
756 if ( mode ) {
757 val = ( 0 == n.clazz ) ? "F" : "T";
758 } else {
759 val = std::to_string( n.num );
760 }
761 //
762 _m[no_prefix( node.first, m_prefix )] = {nam, val};
763 }
764 //
765 if ( _m.empty() ) {
766 return;
767 }
768
769 // find the correct formats
770 size_t n1 = 0;
771 size_t n2 = 0;
772 size_t n3 = 0;
773 for ( const auto& i : _m ) {
774 n1 = std::max( n1, i.first.size() );
775 n2 = std::max( n2, i.second.first.size() );
776 n3 = std::max( n3, i.second.second.size() );
777 }
778 if ( 10 > n1 ) {
779 n1 = 10;
780 }
781 if ( 10 > n2 ) {
782 n2 = 10;
783 }
784 if ( 60 < n1 ) {
785 n1 = 60;
786 }
787 if ( 60 < n2 ) {
788 n2 = 60;
789 }
790 //
791
792 const std::string _f = " | %%1$-%1%.%1%s | %%2$-%2%.%2%s | %%3$%3%.%3%s |";
793 boost::format _ff( _f );
794 _ff % n1 % n2 % n3;
795
796 const std::string _format = _ff.str();
797
798 auto& msg = msgStream( level );
799
800 if ( mode ) {
801 msg << "Data-On-Demand Actions enabled for:";
802 } else {
803 msg << "Data-On-Demand Actions has been used for:";
804 }
805
806 boost::format fmt1( _format );
807 fmt1 % "Address" % "Creator" % ( mode ? "S" : "#" );
808 //
809 const std::string header = fmt1.str();
810 std::string line = std::string( header.size(), '-' );
811 line[0] = ' ';
812
813 msg << '\n' << line << '\n' << header << '\n' << line;
814
815 // make the actual printout:
816 for ( const auto& item : _m ) {
817 boost::format fmt( _format );
818 msg << '\n' << ( fmt % item.first % item.second.first % item.second.second );
819 }
820
821 msg << '\n' << line << endmsg;
822 }
CommonMessagingBase::msg
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:126
std::map::empty
T empty(T...args)
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
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:176
std::string
STL class.
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:228
DataOnDemandSvc::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: DataOnDemandSvc.h:268
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:114
GaudiUtils::Map::empty
bool empty() const
Definition: Map.h:201
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:229
std::max
T max(T...args)
gaudirun.l
dictionary l
Definition: gaudirun.py:440
std::pair< std::string, std::string >
std::map::find
T find(T...args)
std::string::size
T size(T...args)
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:227
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:83
gaudirun.level
level
Definition: gaudirun.py:271
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
plotSpeedupsPyRoot.line
line
Definition: plotSpeedupsPyRoot.py:172

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 671 of file DataOnDemandSvc.cpp.

672 {
673 Gaudi::Utils::LockedChrono timer( m_timer_algs, m_locked_algs );
674 //
675 if ( l.executing ) {
676 return StatusCode::FAILURE;
677 } // RETURN
678 //
679 if ( !l.algorithm ) {
680 StatusCode sc = configureHandler( l );
681 if ( sc.isFailure() ) {
682 error() << "Failed to configure handler for: " << l.name << "[" << l.type << "] " << tag << endmsg;
683 return sc; // RETURN
684 }
685 }
686 //
687 Chrono atimer( m_total );
688 //
689 Protection p( l.executing );
690 // FIXME: this will cause problems for Hive, as we need to set
691 // the EventContext of the called Algorithm.
692 // if (!l.algorithm->getContext()) {
693 // l.algorithm->setContext( &Gaudi::Hive::currentContext() );
694 // }
695 StatusCode sc = l.algorithm->sysExecute( Gaudi::Hive::currentContext() );
696 if ( sc.isFailure() ) {
697 error() << "Failed to execute the algorithm:" << l.algorithm->name() << " for location:" << tag << endmsg;
698 return sc; // RETURN
699 }
700 ++l.num;
701 //
702 return StatusCode::SUCCESS;
703 }
StatusCode::SUCCESS
Definition: StatusCode.h:31
StatusCode::FAILURE
Definition: StatusCode.h:31
DataOnDemandSvc::m_timer_algs
ChronoEntity m_timer_algs
Definition: DataOnDemandSvc.h:239
Chrono
A small utility class for chronometry of user codes.
Definition: Chrono.h:25
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:111
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
Gaudi::Hive::currentContext
GAUDI_API const EventContext & currentContext()
Definition: ThreadLocalContext.cpp:24
gaudirun.l
dictionary l
Definition: gaudirun.py:440
Gaudi::Utils::LockedChrono
Helper object, useful for measurement of CPU-performance of highly-recursive structures, e.g.
Definition: LockedChrono.h:52
DataOnDemandSvc::m_total
ChronoEntity m_total
Definition: DataOnDemandSvc.h:233
DataOnDemandSvc::configureHandler
StatusCode configureHandler(Leaf &leaf)
Configure handler for leaf.
Definition: DataOnDemandSvc.cpp:455
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
DataOnDemandSvc::m_locked_algs
bool m_locked_algs
Definition: DataOnDemandSvc.h:242

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 626 of file DataOnDemandSvc.cpp.

627 {
628
629 Gaudi::Utils::LockedChrono timer( m_timer_nodes, m_locked_nodes );
630
631 if ( n.executing ) {
632 return StatusCode::FAILURE;
633 } // RETURN
634
635 Protection p( n.executing );
636
637 std::unique_ptr<DataObject> object;
638
639 if ( n.dataObject ) {
640 object.reset( new DataObject() );
641 } else {
642 // try to recover the handler
643 if ( !n.clazz ) {
644 n.clazz = TClass::GetClass( n.name.c_str() );
645 }
646 if ( !n.clazz ) {
647 error() << "Failed to get dictionary for class '" << n.name << "' for location:" << tag << endmsg;
648 return StatusCode::FAILURE; // RETURN
649 }
650
651 object.reset( reinterpret_cast<DataObject*>( n.clazz->New() ) );
652
653 if ( !object ) {
654 error() << "Failed to create an object of type:" << n.clazz->GetName() << " for location:" << tag << endmsg;
655 return StatusCode::FAILURE; // RETURN
656 }
657 }
658 //
659 StatusCode sc = m_dataSvc->registerObject( tag, object.release() );
660 if ( sc.isFailure() ) {
661 error() << "Failed to register an object of type:" << n.name << " at location:" << tag << endmsg;
662 return sc; // RETURN
663 }
664 ++n.num;
665 //
666 return StatusCode::SUCCESS;
667 }
StatusCode::SUCCESS
Definition: StatusCode.h:31
StatusCode::FAILURE
Definition: StatusCode.h:31
DataOnDemandSvc::m_locked_nodes
bool m_locked_nodes
Definition: DataOnDemandSvc.h:241
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:223
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:228
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:111
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
std::unique_ptr::reset
T reset(T...args)
GaudiPython.Bindings.DataObject
DataObject
Definition: Bindings.py:55
std::unique_ptr
STL class.
Gaudi::Utils::LockedChrono
Helper object, useful for measurement of CPU-performance of highly-recursive structures, e.g.
Definition: LockedChrono.h:52
DataOnDemandSvc::m_timer_nodes
ChronoEntity m_timer_nodes
Definition: DataOnDemandSvc.h:238
IDataProviderSvc::registerObject
virtual StatusCode registerObject(const std::string &fullPath, DataObject *pObject)=0
Register object with the data store.
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

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

Inherited Service overrides: Service finalization.

Definition at line 262 of file DataOnDemandSvc.cpp.

263 {
264 //
265 info() << "Handled \"" << m_trapType.value() << "\" incidents: " << m_statAlg << "/" << m_statNode << "/" << m_stat
266 << "(Alg/Node/Total)." << endmsg;
267 if ( m_dump || msgLevel( MSG::DEBUG ) ) {
268 info() << m_total.outputUserTime( "Algorithm timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
269 System::milliSec )
270 << m_total.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
271 info() << m_timer_nodes.outputUserTime( "Nodes timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
272 System::milliSec )
273 << m_timer_nodes.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
274 info() << m_timer_algs.outputUserTime( "Algs timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
275 System::milliSec )
276 << m_timer_algs.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
277 info() << m_timer_all.outputUserTime( "All timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
278 System::milliSec )
279 << m_timer_all.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
280 }
281 // dump it!
282 if ( m_dump ) {
283 dump( MSG::INFO, false );
284 } else if ( msgLevel( MSG::DEBUG ) ) {
285 dump( MSG::DEBUG, false );
286 }
287 //
288 if ( m_incSvc ) {
289 m_incSvc->removeListener( this, m_trapType );
290 m_incSvc.reset();
291 }
292 m_algMgr.reset();
293 m_dataSvc.reset();
294 if ( m_toolSvc ) { // we may not have retrieved the ToolSvc
295 // Do not call releaseTool if the ToolSvc was already finalized.
296 if ( SmartIF<IStateful>( m_toolSvc )->FSMState() > Gaudi::StateMachine::CONFIGURED ) {
297 for ( const auto& i : m_nodeMappers ) m_toolSvc->releaseTool( i ).ignore();
298 for ( const auto& i : m_algMappers ) m_toolSvc->releaseTool( i ).ignore();
299 } else {
300 warning() << "ToolSvc already finalized: cannot release tools. Check options." << endmsg;
301 }
302 m_nodeMappers.clear();
303 m_algMappers.clear();
304 m_toolSvc.reset();
305 }
306 return Service::finalize();
307 }
DataOnDemandSvc::m_timer_all
ChronoEntity m_timer_all
Definition: DataOnDemandSvc.h:240
SmartIF< IStateful >
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:16
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:174
DataOnDemandSvc::m_timer_algs
ChronoEntity m_timer_algs
Definition: DataOnDemandSvc.h:239
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:117
DataOnDemandSvc::m_stat
ulonglong m_stat
Definition: DataOnDemandSvc.h:236
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:219
MSG::DEBUG
Definition: IMessageSvc.h:16
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:249
DataOnDemandSvc::m_statAlg
ulonglong m_statAlg
Definition: DataOnDemandSvc.h:234
System::milliSec
Definition: Timing.h:58
System::Sec
Definition: Timing.h:58
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:223
DataOnDemandSvc::m_statNode
ulonglong m_statNode
Definition: DataOnDemandSvc.h:235
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:114
MsgStream::clear
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:187
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:710
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:245
ChronoEntity::outputUserTime
std::string outputUserTime() const
print the chrono ;
Definition: ChronoEntity.cpp:89
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:221
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:225
DataOnDemandSvc::m_timer_nodes
ChronoEntity m_timer_nodes
Definition: DataOnDemandSvc.h:238
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:54
IToolSvc::releaseTool
virtual StatusCode releaseTool(IAlgTool *tool)=0
Release the tool.
DataOnDemandSvc::m_total
ChronoEntity m_total
Definition: DataOnDemandSvc.h:233
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:92
IIncidentSvc::removeListener
virtual void removeListener(IIncidentListener *lis, const std::string &type="")=0
Remove listener.
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:109
MSG::INFO
Definition: IMessageSvc.h:16
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:129
DataOnDemandSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: DataOnDemandSvc.h:253
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:246
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

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

IIncidentListener interfaces overrides: incident handling.

Definition at line 553 of file DataOnDemandSvc.cpp.

554 {
555
556 Gaudi::Utils::LockedChrono timer( m_timer_all, m_locked_all );
557
558 ++m_stat;
559 // proper incident type?
560 if ( incident.type() != m_trapType ) {
561 return;
562 } // RETURN
563 const DataIncident* inc = dynamic_cast<const DataIncident*>( &incident );
564 if ( !inc ) {
565 return;
566 } // RETURN
567 // update if needed!
568 if ( m_updateRequired ) {
569 update();
570 }
571
572 if ( msgLevel( MSG::VERBOSE ) ) {
573 verbose() << "Incident: [" << incident.type() << "] "
574 << " = " << incident.source() << " Location:" << inc->tag() << endmsg;
575 }
576 // ==========================================================================
577 Gaudi::StringKey tag( inc->tag() );
578 // ==========================================================================
579 auto icl = m_nodes.find( tag );
580 if ( icl != m_nodes.end() ) {
581 StatusCode sc = execHandler( tag, icl->second );
582 if ( sc.isSuccess() ) {
583 ++m_statNode;
584 }
585 return; // RETURN
586 }
587 // ==========================================================================
588 auto ialg = m_algs.find( tag );
589 if ( ialg != m_algs.end() ) {
590 StatusCode sc = execHandler( tag, ialg->second );
591 if ( sc.isSuccess() ) {
592 ++m_statAlg;
593 }
594 return; // RETURN
595 }
596 // ==========================================================================
597 // Fall back on the tools
598 if ( m_toolSvc ) {
599 if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Try to find mapping with mapping tools" << endmsg;
600 Finder finder( no_prefix( inc->tag(), m_prefix ), m_nodeMappers, m_algMappers );
601 // - try the node mappers
602 std::string node = finder.node();
603 if ( isGood( node ) ) {
604 // if one is found update the internal node mapping and try again.
605 if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Found Node handler: " << node << endmsg;
606 i_setNodeHandler( inc->tag(), node );
607 handle( incident );
608 --m_stat; // avoid double counting because of recursion
609 return;
610 }
611 // - try alg mappings
612 Gaudi::Utils::TypeNameString alg = finder.alg();
613 if ( isGood( alg ) ) {
614 // we got an algorithm, update alg map and try to handle again
615 if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Found Algorithm handler: " << alg << endmsg;
616 i_setAlgHandler( inc->tag(), alg ).ignore();
617 handle( incident );
618 --m_stat; // avoid double counting because of recursion
619 return;
620 }
621 }
622 }
DataOnDemandSvc::i_setNodeHandler
void i_setNodeHandler(const std::string &name, const std::string &type)
Internal method to initialize a node handler.
Definition: DataOnDemandSvc.cpp:145
DataOnDemandSvc::m_timer_all
ChronoEntity m_timer_all
Definition: DataOnDemandSvc.h:240
Incident::type
const std::string & type() const
Access to the incident type.
Definition: Incident.h:41
DataOnDemandSvc::m_stat
ulonglong m_stat
Definition: DataOnDemandSvc.h:236
Incident::source
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:47
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
DataOnDemandSvc::handle
void handle(const Incident &incident) override
IIncidentListener interfaces overrides: incident handling.
Definition: DataOnDemandSvc.cpp:553
CommonMessagingBase::verbose
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Definition: CommonMessaging.h:123
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:249
DataOnDemandSvc::m_statAlg
ulonglong m_statAlg
Definition: DataOnDemandSvc.h:234
MSG::VERBOSE
Definition: IMessageSvc.h:16
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:35
std::string
STL class.
DataOnDemandSvc::m_statNode
ulonglong m_statNode
Definition: DataOnDemandSvc.h:235
DataOnDemandSvc::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: DataOnDemandSvc.h:268
GaudiUtils::Map::end
iterator end()
Definition: Map.h:134
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:12
DataOnDemandSvc::execHandler
StatusCode execHandler(const std::string &tag, Leaf &leaf)
Execute leaf handler (algorithm)
Definition: DataOnDemandSvc.cpp:671
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
GaudiUtils::Map::find
iterator find(const key_type &key)
Definition: Map.h:151
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:229
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:245
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:225
Gaudi::Utils::LockedChrono
Helper object, useful for measurement of CPU-performance of highly-recursive structures, e.g.
Definition: LockedChrono.h:52
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:227
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:231
DataIncident
Data service incident class.
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:129
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:154
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:246
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:175
DataOnDemandSvc::m_locked_all
bool m_locked_all
Definition: DataOnDemandSvc.h:243

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

Internal method to initialize an algorithm handler.

Definition at line 154 of file DataOnDemandSvc.cpp.

155 {
156 Leaf leaf( alg.type(), alg.name() );
157 if ( m_init ) {
158 StatusCode sc = configureHandler( leaf );
159 if ( sc.isFailure() ) {
160 if ( m_allowInitFailure ) {
161 // re-store the content of the leaf object to try again to initialize
162 // the algorithm later (on demand)
163 leaf = Leaf( alg.type(), alg.name() );
164 } else
165 return sc;
166 }
167 }
168 m_algs[name] = leaf;
169 return StatusCode::SUCCESS;
170 }
StatusCode::SUCCESS
Definition: StatusCode.h:31
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:289
DataOnDemandSvc::m_init
Gaudi::Property< bool > m_init
Definition: DataOnDemandSvc.h:256
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:227
Gaudi::Utils::TypeNameString::type
const std::string & type() const
Definition: TypeNameString.h:39
Gaudi::Utils::TypeNameString::name
const std::string & name() const
Definition: TypeNameString.h:40
DataOnDemandSvc::configureHandler
StatusCode configureHandler(Leaf &leaf)
Configure handler for leaf.
Definition: DataOnDemandSvc.cpp:455
DataOnDemandSvc::m_allowInitFailure
Gaudi::Property< bool > m_allowInitFailure
Definition: DataOnDemandSvc.h:257

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

Internal method to initialize a node handler.

Definition at line 145 of file DataOnDemandSvc.cpp.

146 {
147 ClassH cl = TClass::GetClass( type.c_str() );
148 if ( !cl ) {
149 warning() << "Failed to access dictionary class for " << name << " of type:" << type << endmsg;
150 }
151 m_nodes[name] = Node( cl, false, type );
152 }
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:289
DataOnDemandSvc::ClassH
TClass * ClassH
Definition: DataOnDemandSvc.h:96
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:114
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:229
std::string::c_str
T c_str(T...args)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

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

Inherited Service overrides: Service initialization.

Definition at line 235 of file DataOnDemandSvc.cpp.

236 {
237 // initialize the Service Base class
238 StatusCode sc = Service::initialize();
239 if ( sc.isFailure() ) {
240 return sc;
241 }
242 sc = setup();
243 if ( sc.isFailure() ) {
244 return sc;
245 }
246 //
247 if ( m_dump ) {
248 dump( MSG::INFO );
249 } else if ( msgLevel( MSG::DEBUG ) ) {
250 dump( MSG::DEBUG );
251 }
252 //
253 if ( m_init ) {
254 return update();
255 }
256 //
257 return StatusCode::SUCCESS;
258 }
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:64
StatusCode::SUCCESS
Definition: StatusCode.h:31
MSG::DEBUG
Definition: IMessageSvc.h:16
DataOnDemandSvc::m_init
Gaudi::Property< bool > m_init
Definition: DataOnDemandSvc.h:256
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
DataOnDemandSvc::setup
StatusCode setup()
Setup routine (called by (re-) initialize.
Definition: DataOnDemandSvc.cpp:347
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:710
MSG::INFO
Definition: IMessageSvc.h:16
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:129
DataOnDemandSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: DataOnDemandSvc.h:253
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:175

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

Inherited Service overrides: Service reinitialization.

re-initialization of the service

Definition at line 311 of file DataOnDemandSvc.cpp.

312 {
313 // reinitialize the Service Base class
314 if ( m_incSvc ) {
315 m_incSvc->removeListener( this, m_trapType );
316 m_incSvc.reset();
317 }
318 m_algMgr.reset();
319 m_dataSvc.reset();
320 for ( const auto& i : m_nodeMappers ) m_toolSvc->releaseTool( i ).ignore();
321 m_nodeMappers.clear();
322 for ( const auto& i : m_algMappers ) m_toolSvc->releaseTool( i ).ignore();
323 m_algMappers.clear();
324 m_toolSvc.reset();
325 //
326 StatusCode sc = Service::reinitialize();
327 if ( sc.isFailure() ) {
328 return sc;
329 }
330 //
331 sc = setup();
332 if ( sc.isFailure() ) {
333 return sc;
334 }
335 //
336 if ( m_dump ) {
337 dump( MSG::INFO );
338 } else if ( msgLevel( MSG::DEBUG ) ) {
339 dump( MSG::DEBUG );
340 }
341 //
342 return StatusCode::SUCCESS;
343 }
StatusCode::SUCCESS
Definition: StatusCode.h:31
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:219
MSG::DEBUG
Definition: IMessageSvc.h:16
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:249
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:223
DataOnDemandSvc::setup
StatusCode setup()
Setup routine (called by (re-) initialize.
Definition: DataOnDemandSvc.cpp:347
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
Service::reinitialize
StatusCode reinitialize() override
Definition: Service.cpp:250
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:710
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:245
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:221
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:225
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:92
IIncidentSvc::removeListener
virtual void removeListener(IIncidentListener *lis, const std::string &type="")=0
Remove listener.
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:109
MSG::INFO
Definition: IMessageSvc.h:16
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:129
DataOnDemandSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: DataOnDemandSvc.h:253
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:246

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

Setup routine (called by (re-) initialize.

Definition at line 347 of file DataOnDemandSvc.cpp.

348 {
349 if ( !( m_algMgr = serviceLocator() ) ) // assignment meant
350 {
351 error() << "Failed to retrieve the IAlgManager interface." << endmsg;
352 return StatusCode::FAILURE;
353 }
354
355 if ( !( m_incSvc = serviceLocator()->service( "IncidentSvc" ) ) ) // assignment meant
356 {
357 error() << "Failed to retrieve Incident service." << endmsg;
358 return StatusCode::FAILURE;
359 }
360 m_incSvc->addListener( this, m_trapType );
361
362 if ( !( m_dataSvc = serviceLocator()->service( m_dataSvcName ) ) ) // assignment meant
363 {
364 error() << "Failed to retrieve the data provider interface of " << m_dataSvcName << endmsg;
365 return StatusCode::FAILURE;
366 }
367
368 // No need to get the ToolSvc if we are not using tools
369 if ( !( m_nodeMapTools.empty() && m_algMapTools.empty() ) ) {
370 if ( !( m_toolSvc = serviceLocator()->service( "ToolSvc" ) ) ) // assignment meant
371 {
372 error() << "Failed to retrieve ToolSvc" << endmsg;
373 return StatusCode::FAILURE;
374 }
375
376 // load the node mapping tools
377 IDODNodeMapper* nodetool = nullptr;
378 for ( const auto& i : m_nodeMapTools ) {
379 const StatusCode sc = m_toolSvc->retrieveTool( i, nodetool );
380 if ( sc.isFailure() ) return sc;
381 m_nodeMappers.push_back( nodetool );
382 }
383 IDODAlgMapper* algtool = nullptr;
384 for ( const auto& i : m_algMapTools ) {
385 const StatusCode sc = m_toolSvc->retrieveTool( i, algtool );
386 if ( sc.isFailure() ) return sc;
387 m_algMappers.push_back( algtool );
388 }
389 }
390 return update();
391 }
StatusCode::FAILURE
Definition: StatusCode.h:31
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:219
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:249
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
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:139
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:223
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:79
DataOnDemandSvc::m_algMapTools
Gaudi::Property< std::vector< std::string > > m_algMapTools
Definition: DataOnDemandSvc.h:272
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:111
IDODNodeMapper
Interface of tools used by the DataOnDemandSvc to choose the type of node to be created at a path...
Definition: IDODNodeMapper.h:17
DataOnDemandSvc::m_nodeMapTools
Gaudi::Property< std::vector< std::string > > m_nodeMapTools
Definition: DataOnDemandSvc.h:270
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:245
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:221
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:225
DataOnDemandSvc::m_dataSvcName
Gaudi::Property< std::string > m_dataSvcName
Definition: DataOnDemandSvc.h:250
IIncidentSvc::addListener
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
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&#39;t already exist.
Definition: Service.h:85
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:292
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:246
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:175

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

Initialize leaf handlers.

Definition at line 425 of file DataOnDemandSvc.cpp.

426 {
427 std::string typ, tag;
428
429 for ( auto alg : m_algMapping ) {
430 using Parser = Gaudi::Utils::AttribStringParser;
431 for ( auto attrib : Parser( alg ) ) {
432 switch (::toupper( attrib.tag[0] ) ) {
433 case 'D':
434 tag = std::move( attrib.value );
435 break;
436 case 'T':
437 typ = std::move( attrib.value );
438 break;
439 }
440 }
441 Gaudi::Utils::TypeNameString item( typ );
442 if ( m_algMap.end() != m_algMap.find( tag ) || m_nodeMap.end() != m_nodeMap.find( tag ) ) {
443 warning() << "The obsolete property 'Algorithms' redefines the action for '" + tag + "' to be '" + item.type() +
444 "/" + item.name() + "'"
445 << endmsg;
446 }
447 m_algMap[tag] = item.type() + "/" + item.name();
448 }
449 m_updateRequired = true;
450 return StatusCode::SUCCESS;
451 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:32
StatusCode::SUCCESS
Definition: StatusCode.h:31
DataOnDemandSvc::m_nodeMap
Gaudi::Property< Map > m_nodeMap
Definition: DataOnDemandSvc.h:266
std::string
STL class.
DataOnDemandSvc::m_algMapping
Gaudi::Property< Setup > m_algMapping
Definition: DataOnDemandSvc.h:261
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:12
DataOnDemandSvc::m_algMap
Gaudi::Property< Map > m_algMap
Definition: DataOnDemandSvc.h:265
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:114
std::move
T move(T...args)
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:231
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:10
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

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

Initialize node handlers.

Definition at line 395 of file DataOnDemandSvc.cpp.

396 {
397 std::string nam, typ, tag;
398 StatusCode sc = StatusCode::SUCCESS;
399 // Setup for node leafs, where simply a constructor is called...
400 for ( auto node : m_nodeMapping ) {
401 using Parser = Gaudi::Utils::AttribStringParser;
402 for ( auto attrib : Parser( node ) ) {
403 switch (::toupper( attrib.tag[0] ) ) {
404 case 'D':
405 tag = std::move( attrib.value );
406 break;
407 case 'T':
408 nam = std::move( attrib.value );
409 break;
410 }
411 }
412 if ( m_algMap.end() != m_algMap.find( tag ) || m_nodeMap.end() != m_nodeMap.find( tag ) ) {
413 warning() << "The obsolete property 'Nodes' redefines the action for '" + tag + "' to be '" + nam + "'" << endmsg;
414 }
415 m_nodeMap[tag] = nam;
416 }
417 //
418 m_updateRequired = true;
419 //
420 return sc;
421 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:32
StatusCode::SUCCESS
Definition: StatusCode.h:31
DataOnDemandSvc::m_nodeMap
Gaudi::Property< Map > m_nodeMap
Definition: DataOnDemandSvc.h:266
std::string
STL class.
DataOnDemandSvc::m_algMap
Gaudi::Property< Map > m_algMap
Definition: DataOnDemandSvc.h:265
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:114
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
std::move
T move(T...args)
DataOnDemandSvc::m_nodeMapping
Gaudi::Property< Setup > m_nodeMapping
Definition: DataOnDemandSvc.h:262
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:231
toupper
void toupper(std::string &s)
Definition: StatusCodeSvc.cpp:10
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

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 175 of file DataOnDemandSvc.cpp.

176 {
177 if ( !m_updateRequired ) {
178 return StatusCode::SUCCESS;
179 }
180
182 StatusCode sc = setupNodeHandlers(); // convert "Nodes" new "NodeMap"
183 if ( sc.isFailure() ) {
184 error() << "Failed to setup old \"Nodes\"" << endmsg;
185 return sc;
186 }
188 sc = setupAlgHandlers(); // convert "Algorithms" into "AlgMap"
189 if ( sc.isFailure() ) {
190 error() << "Failed to setup old \"Algorithms\"" << endmsg;
191 return sc;
192 }
194 add_prefix( m_algMap, m_prefix );
196 add_prefix( m_nodeMap, m_prefix );
198 std::set<std::string> dirs;
199 if ( m_partialPath ) {
200 get_dirs( m_algMap, dirs );
201 }
202 if ( m_partialPath ) {
203 get_dirs( m_nodeMap, dirs );
204 }
205 //
206 auto _e = dirs.find( "/Event" );
207 if ( dirs.end() != _e ) {
208 dirs.erase( _e );
209 }
210 // add all directories as nodes
211 for ( const auto& dir : dirs ) {
212 if ( m_algMap.end() == m_algMap.find( dir ) && m_nodeMap.end() == m_nodeMap.find( dir ) )
213 m_nodeMap[dir] = "DataObject";
214 }
215 //
216 m_algs.clear();
217 m_nodes.clear();
218 //
220 for ( const auto& alg : m_algMap ) {
221 if ( i_setAlgHandler( alg.first, alg.second ).isFailure() ) return StatusCode::FAILURE;
222 }
224 for ( const auto& node : m_nodeMap ) {
225 i_setNodeHandler( node.first, node.second );
226 }
228 m_updateRequired = false;
229 //
230 return StatusCode::SUCCESS;
231 }
DataOnDemandSvc::i_setNodeHandler
void i_setNodeHandler(const std::string &name, const std::string &type)
Internal method to initialize a node handler.
Definition: DataOnDemandSvc.cpp:145
StatusCode::SUCCESS
Definition: StatusCode.h:31
StatusCode::FAILURE
Definition: StatusCode.h:31
DataOnDemandSvc::m_nodeMap
Gaudi::Property< Map > m_nodeMap
Definition: DataOnDemandSvc.h:266
std::set::end
T end(T...args)
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:111
DataOnDemandSvc::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: DataOnDemandSvc.h:268
DataOnDemandSvc::m_algMap
Gaudi::Property< Map > m_algMap
Definition: DataOnDemandSvc.h:265
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
DataOnDemandSvc::setupNodeHandlers
StatusCode setupNodeHandlers()
Initialize node handlers.
Definition: DataOnDemandSvc.cpp:395
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:229
DataOnDemandSvc::m_partialPath
Gaudi::Property< bool > m_partialPath
Definition: DataOnDemandSvc.h:252
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:227
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:231
GaudiUtils::Map::clear
void clear()
Definition: Map.h:195
DataOnDemandSvc::setupAlgHandlers
StatusCode setupAlgHandlers()
Initialize leaf handlers.
Definition: DataOnDemandSvc.cpp:425
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:154
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

## Member Data Documentation

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

Definition at line 265 of file DataOnDemandSvc.h.

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

Definition at line 246 of file DataOnDemandSvc.h.

Gaudi::Property<Setup> DataOnDemandSvc::m_algMapping {this, "Algorithms", {}, "[[deprecated]] use AlgMap"}
| private

Definition at line 261 of file DataOnDemandSvc.h.

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

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

Definition at line 272 of file DataOnDemandSvc.h.

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

Algorithm manager.

Definition at line 221 of file DataOnDemandSvc.h.

AlgMap DataOnDemandSvc::m_algs
| private

Map of algorithms to handle incidents.

Definition at line 227 of file DataOnDemandSvc.h.

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 257 of file DataOnDemandSvc.h.

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

Data provider reference.

Definition at line 223 of file DataOnDemandSvc.h.

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

Definition at line 250 of file DataOnDemandSvc.h.

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

Initial value:
{
this, "Dump", false,
"dump configuration and stastics, if set to True after initialize it triggers a dump immediately"}

Definition at line 253 of file DataOnDemandSvc.h.

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

Incident service.

Definition at line 219 of file DataOnDemandSvc.h.

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

Definition at line 256 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_locked_algs = false
| private

Definition at line 242 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_locked_all = false
| private

Definition at line 243 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_locked_nodes = false
| private

Definition at line 241 of file DataOnDemandSvc.h.

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

Definition at line 266 of file DataOnDemandSvc.h.

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

Definition at line 245 of file DataOnDemandSvc.h.

Gaudi::Property<Setup> DataOnDemandSvc::m_nodeMapping {this, "Nodes", {}, "[[deprecated]] use NodeMap"}
| private

Definition at line 262 of file DataOnDemandSvc.h.

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

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

Definition at line 270 of file DataOnDemandSvc.h.

NodeMap DataOnDemandSvc::m_nodes
| private

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

Definition at line 229 of file DataOnDemandSvc.h.

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

Definition at line 252 of file DataOnDemandSvc.h.

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

Definition at line 268 of file DataOnDemandSvc.h.

ulonglong DataOnDemandSvc::m_stat = 0
| private

Definition at line 236 of file DataOnDemandSvc.h.

ulonglong DataOnDemandSvc::m_statAlg = 0
| private

Definition at line 234 of file DataOnDemandSvc.h.

ulonglong DataOnDemandSvc::m_statNode = 0
| private

Definition at line 235 of file DataOnDemandSvc.h.

ChronoEntity DataOnDemandSvc::m_timer_algs
| private

Definition at line 239 of file DataOnDemandSvc.h.

ChronoEntity DataOnDemandSvc::m_timer_all
| private

Definition at line 240 of file DataOnDemandSvc.h.

ChronoEntity DataOnDemandSvc::m_timer_nodes
| private

Definition at line 238 of file DataOnDemandSvc.h.

SmartIF<IToolSvc> DataOnDemandSvc::m_toolSvc
| private

Data provider reference.

Definition at line 225 of file DataOnDemandSvc.h.

ChronoEntity DataOnDemandSvc::m_total
| private

Definition at line 233 of file DataOnDemandSvc.h.

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

Definition at line 249 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_updateRequired = true
| private

Definition at line 231 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