| The Gaudi Framework v27r1

- 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 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...
void | update_1 (Property &p)
void | update_2 (Property &p)
void | update_3 (Property &p)
void | update_dump (Property &)
| update handler for 'Dump' property More...
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...
StatusCode | setProperty (const Property &p) override
StatusCode | setProperty (const std::string &s) override
StatusCode | setProperty (const std::string &n, const std::string &v) override
StatusCode | getProperty (Property *p) const override
const Property & | getProperty (const std::string &name) const override
StatusCode | getProperty (const std::string &n, std::string &v) const override
const std::vector< Property * > & | getProperties () const override
bool | hasProperty (const std::string &name) const override
template<class TYPE >
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value 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 >
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const
| Declare the named property. More...
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
| Declare remote named properties. More...
template<class T >
StatusCode | declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Private tool. More...
template<class T >
StatusCode | declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Public 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 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 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...
std::string | m_trapType = "DataFault"
| Trap name. More...
std::string | m_dataSvcName = "EventDataSvc"
| Data service name. More...
bool | m_partialPath = true
| Flag to allow for the creation of partial leaves. More...
bool | m_dump = false
| flag to force the printout More...
bool | m_init = false
| flag to warm up the configuration More...
bool | m_allowInitFailure = false
| flag to allow DataOnDemand initialization to succeed even if the (pre)initialization of the algorithms fails (m_init). More...
Setup | m_algMapping
| Mapping to algorithms. More...
Setup | m_nodeMapping
| Mapping to nodes. More...
AlgMap | m_algs
| Map of algorithms to handle incidents. More...
NodeMap | m_nodes
| Map of "empty" objects to be placed as intermediate nodes. More...
Map | m_algMap
| the major configuration property { 'data' : 'algorithm' } More...
Map | m_nodeMap
| the major configuration property { 'data' : 'type' } More...
bool | m_updateRequired = true
std::string | m_prefix = "/Event/"
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< std::string > | m_nodeMapTools
std::vector< IDODNodeMapper * > | m_nodeMappers
std::vector< std::string > | m_algMapTools
std::vector< IDODAlgMapper * > | m_algMappers

## Additional Inherited Members
Protected Attributes inherited from Service
IntegerProperty | m_outputLevel = MSG::NIL
| Service output level. More...
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. 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 164 of file DataOnDemandSvc.h.

typedef TClass* DataOnDemandSvc::ClassH

Definition at line 97 of file DataOnDemandSvc.h.

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

Definition at line 269 of file DataOnDemandSvc.h.

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

Definition at line 163 of file DataOnDemandSvc.h.

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

Definition at line 96 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.

42 : base_class( name, svc )
43 {
44 // ==========================================================================
45 declareProperty
46 ( "IncidentName" ,
47 m_trapType ,
48 "The type of handled Incident" ) ;
49 //
50 declareProperty ( "DataSvc" , m_dataSvcName ) ;
51 //
52 declareProperty ( "UsePreceedingPath" , m_partialPath ) ;
53 declareProperty
54 ( "Dump" ,
55 m_dump ,
56 "Dump the configuration and stastics" ) ->
57 declareUpdateHandler ( &DataOnDemandSvc::update_dump , this ) ;
58 //
59 declareProperty
60 ( "PreInitialize" ,
61 m_init ,
62 "Flag to (pre)initialize all algorithms" ) ;
63 declareProperty
64 ( "AllowPreInitializeFailure" ,
65 m_allowInitFailure ,
66 "Allow (pre)initialization of algorithms to fail without stopping the application" ) ;
67 //
68 declareProperty ( "Algorithms" , m_algMapping ) ->
69 declareUpdateHandler ( &DataOnDemandSvc::update_2 , this ) ;
70 declareProperty ( "Nodes" , m_nodeMapping ) ->
71 declareUpdateHandler ( &DataOnDemandSvc::update_3 , this ) ;
72 //
73 declareProperty ( "AlgMap" , m_algMap ) ->
74 declareUpdateHandler ( &DataOnDemandSvc::update_1 , this ) ;
75 declareProperty ( "NodeMap" , m_nodeMap ) ->
76 declareUpdateHandler ( &DataOnDemandSvc::update_1 , this ) ;
77
78 declareProperty ( "Prefix" , m_prefix ) ;
79
80 declareProperty("NodeMappingTools", m_nodeMapTools,
81 "List of tools of type IDODNodeMapper");
82 declareProperty("AlgMappingTools", m_algMapTools,
83 "List of tools of type IDODAlgMapper");
84 // ==========================================================================
85 }
DataOnDemandSvc::m_algMapTools
std::vector< std::string > m_algMapTools
Definition: DataOnDemandSvc.h:291
DataOnDemandSvc::m_trapType
std::string m_trapType
Trap name.
Definition: DataOnDemandSvc.h:248
DataOnDemandSvc::m_dataSvcName
std::string m_dataSvcName
Data service name.
Definition: DataOnDemandSvc.h:250
DataOnDemandSvc::m_nodeMapping
Setup m_nodeMapping
Mapping to nodes.
Definition: DataOnDemandSvc.h:263
extends< Service, IIncidentListener >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:14
DataOnDemandSvc::m_algMap
Map m_algMap
the major configuration property { 'data' : 'algorithm' }
Definition: DataOnDemandSvc.h:271
DataOnDemandSvc::m_algMapping
Setup m_algMapping
Mapping to algorithms.
Definition: DataOnDemandSvc.h:261
DataOnDemandSvc::m_allowInitFailure
bool m_allowInitFailure
flag to allow DataOnDemand initialization to succeed even if the (pre)initialization of the algorithm...
Definition: DataOnDemandSvc.h:259
DataOnDemandSvc::update_dump
void update_dump(Property &)
update handler for 'Dump' property
Definition: DataOnDemandSvc.cpp:122
DataOnDemandSvc::m_nodeMapTools
std::vector< std::string > m_nodeMapTools
Definition: DataOnDemandSvc.h:289
DataOnDemandSvc::m_prefix
std::string m_prefix
Definition: DataOnDemandSvc.h:275
DataOnDemandSvc::m_partialPath
bool m_partialPath
Flag to allow for the creation of partial leaves.
Definition: DataOnDemandSvc.h:252
DataOnDemandSvc::m_dump
bool m_dump
flag to force the printout
Definition: DataOnDemandSvc.h:254
DataOnDemandSvc::m_init
bool m_init
flag to warm up the configuration
Definition: DataOnDemandSvc.h:256
DataOnDemandSvc::m_nodeMap
Map m_nodeMap
the major configuration property { 'data' : 'type' }
Definition: DataOnDemandSvc.h:273
Service::declareProperty
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:215
DataOnDemandSvc::update_2
void update_2(Property &p)
Definition: DataOnDemandSvc.cpp:110
DataOnDemandSvc::update_3
void update_3(Property &p)
Definition: DataOnDemandSvc.cpp:98
DataOnDemandSvc::update_1
void update_1(Property &p)
Definition: DataOnDemandSvc.cpp:89

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

521 {
522 if ( l.algorithm ) { return StatusCode::SUCCESS ; }
523 if ( ! m_algMgr ) { return StatusCode::FAILURE ; }
524 l.algorithm = m_algMgr->algorithm(l.name, false);
525 if ( l.algorithm ) { return StatusCode::SUCCESS ; }
526 // create it!
527 StatusCode sc = m_algMgr->createAlgorithm ( l.type , l.name , l.algorithm , true ) ;
528 if ( sc.isFailure() )
529 {
530 error()
531 << "Failed to create algorithm "
532 << l.type << "('" << l.name<< "')" << endmsg;
533 l.algorithm = nullptr ;
534 return sc ; // RETURN
535 }
536 if ( l.algorithm->isInitialized() ) { return StatusCode:: SUCCESS ;}
537 // initialize it!
538 sc = l.algorithm -> sysInitialize () ;
539 if ( sc.isFailure() )
540 {
541 error()
542 << "Failed to initialize algorithm "
543 << l.type << "('" << l.name<< "')" << endmsg;
544 l.algorithm = nullptr ;
545 return sc ; // RETURN
546 }
547 if ( Gaudi::StateMachine::RUNNING == l.algorithm->FSMState() )
548 { return StatusCode::SUCCESS ; }
549 // run it!
550 sc = l.algorithm->sysStart() ;
551 if ( sc.isFailure() )
552 {
553 error()
554 << "Failed to 'run' algorithm "
555 << l.type << "('" << l.name<< "')" << endmsg;
556 l.algorithm = nullptr ;
557 return sc ; // RETURN
558 }
559 return StatusCode::SUCCESS ;
560 }
IAlgManager::algorithm
virtual SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
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...
merge_files.sc
int sc
Definition: merge_files.py:167
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:118
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
gaudirun.l
dictionary l
Definition: gaudirun.py:421
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:16
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:242
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
Service::sysInitialize
StatusCode sysInitialize() override
Initialize Service.
Definition: Service.cpp:26

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

791 {
792 if ( m_algs.empty() && m_nodes.empty() ) { return ; }
793
794 typedef std::pair<std::string,std::string> Pair ;
795 std::map<std::string,Pair> _m ;
796 for ( auto& alg : m_algs )
797 {
798 auto check = _m.find(alg.first) ;
799 if ( _m.end() != check )
800 {
801 warning() << " The data item is activated for '"
802 << check->first << "' as '" << check->second.first << "'" << endmsg ;
803 }
804 const Leaf& l = alg.second ;
805 std::string nam = ( l.name == l.type ? l.type : (l.type+"/"+l.name) ) ;
806 //
807 if ( !mode && 0 == l.num ) { continue ; }
808 //
809 std::string val ;
810 if ( mode ) { val = ( ! l.algorithm ) ? "F" : "T" ; }
811 else { val = std::to_string( l.num ) ; }
812 //
813 _m[ no_prefix ( alg.first , m_prefix ) ] = { nam , val } ;
814 }
815 // nodes:
816 for ( const auto& node : m_nodes )
817 {
818 auto check = _m.find(node.first) ;
819 if ( _m.end() != check )
820 {
821 warning() << " The data item is already activated for '"
822 << check->first << "' as '" << check->second.first << "'" << endmsg ;
823 }
824 const Node& n = node.second ;
825 std::string nam = "'" + n.name + "'" ;
826 //
827 std::string val ;
828
829 if ( !mode && 0 == n.num ) { continue ; }
830
831 if ( mode ) { val = ( 0 == n.clazz ) ? "F" : "T" ; }
832 else { val = std::to_string( n.num ) ; }
833 //
834 _m[ no_prefix ( node.first , m_prefix ) ] = { nam , val } ;
835 }
836 //
837 if ( _m.empty() ) { return ; }
838
839 // find the correct formats
840 size_t n1 = 0 ;
841 size_t n2 = 0 ;
842 size_t n3 = 0 ;
843 for ( const auto& i : _m )
844 {
845 n1 = std::max ( n1 , i.first.size() ) ;
846 n2 = std::max ( n2 , i.second.first.size() ) ;
847 n3 = std::max ( n3 , i.second.second.size() ) ;
848 }
849 if ( 10 > n1 ) { n1 = 10 ; }
850 if ( 10 > n2 ) { n2 = 10 ; }
851 if ( 60 < n1 ) { n1 = 60 ; }
852 if ( 60 < n2 ) { n2 = 60 ; }
853 //
854
855 const std::string _f = " | %%1$-%1%.%1%s | %%2$-%2%.%2%s | %%3$%3%.%3%s |" ;
856 boost::format _ff ( _f ) ;
857 _ff % n1 % n2 % n3 ;
858
859 const std::string _format = _ff.str() ;
860
861 auto& msg = msgStream(level);
862
863 if ( mode ) { msg << "Data-On-Demand Actions enabled for:" ; }
864 else { msg << "Data-On-Demand Actions has been used for:" ; }
865
866 boost::format fmt1( _format) ;
867 fmt1 % "Address" % "Creator" % ( mode ? "S" : "#" ) ;
868 //
869 const std::string header = fmt1.str() ;
870 std::string line = std::string( header.size() , '-' ) ;
871 line[0] = ' ' ;
872
873 msg << '\n' << line
874 << '\n' << header
875 << '\n' << line ;
876
877 // make the actual printout:
878 for ( const auto& item : _m )
879 {
880 boost::format fmt( _format) ;
881 msg << '\n' <<
882 ( fmt % item.first % item.second.first % item.second.second ) ;
883 }
884
885 msg << '\n' << line << endmsg ;
886
887 }
CommonMessagingBase::msg
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:133
std::map::empty
T empty(T...args)
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
validate_patch.check
def check(path)
Definition: validate_patch.py:152
std::to_string
T to_string(T...args)
std::map::end
T end(T...args)
std::map
STL class.
GaudiPluginService.cpluginsvc.n
list n
Definition: cpluginsvc.py:217
std::string
STL class.
plotSpeedupsPyRoot.line
tuple line
Definition: plotSpeedupsPyRoot.py:164
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
GaudiUtils::Map::empty
bool empty() const
Definition: Map.h:184
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:267
DataOnDemandSvc::m_prefix
std::string m_prefix
Definition: DataOnDemandSvc.h:275
std::max
T max(T...args)
gaudirun.l
dictionary l
Definition: gaudirun.py:421
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:265
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89
ana.item
tuple item
print s1,s2
Definition: ana.py:146
gaudirun.level
level
Definition: gaudirun.py:261
Test.header
list header
Definition: Test.py:33
ana.i
list i
Definition: ana.py:128
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

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

751 {
752 Gaudi::Utils::LockedChrono timer ( m_timer_algs , m_locked_algs ) ;
753 //
754 if ( l.executing ) { return StatusCode::FAILURE ; } // RETURN
755 //
756 if ( ! l.algorithm )
757 {
758 StatusCode sc = configureHandler ( l ) ;
759 if ( sc.isFailure() )
760 {
761 error()
762 << "Failed to configure handler for: "
763 << l.name << "[" << l.type << "] " << tag << endmsg;
764 return sc ; // RETURN
765 }
766 }
767 //
768 Chrono atimer ( m_total ) ;
769 //
770 Protection p(l.executing);
771 StatusCode sc = l.algorithm->sysExecute();
772 if ( sc.isFailure() )
773 {
774 error() << "Failed to execute the algorithm:"
775 << l.algorithm->name() << " for location:" << tag << endmsg;
776 return sc ; // RETURN
777 }
778 ++l.num ;
779 //
780 return StatusCode::SUCCESS ;
781 }
DataOnDemandSvc::m_timer_algs
ChronoEntity m_timer_algs
Definition: DataOnDemandSvc.h:283
Chrono
A small utility class for chronometry of user codes.
Definition: Chrono.h:25
merge_files.sc
int sc
Definition: merge_files.py:167
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:118
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
gaudirun.l
dictionary l
Definition: gaudirun.py:421
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:277
DataOnDemandSvc::configureHandler
StatusCode configureHandler(Leaf &leaf)
Configure handler for leaf.
Definition: DataOnDemandSvc.cpp:520
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
DataOnDemandSvc::m_locked_algs
bool m_locked_algs
Definition: DataOnDemandSvc.h:286

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

698 {
699
700 Gaudi::Utils::LockedChrono timer ( m_timer_nodes , m_locked_nodes ) ;
701
702 if ( n.executing ) { return StatusCode::FAILURE ; } // RETURN
703
704 Protection p(n.executing);
705
706 std::unique_ptr<DataObject> object;
707
708 if ( n.dataObject ) { object.reset( new DataObject() ) ; }
709 else
710 {
711 // try to recover the handler
712 if ( !n.clazz ) { n.clazz = TClass::GetClass(n.name.c_str()) ; }
713 if ( !n.clazz )
714 {
715 error()
716 << "Failed to get dictionary for class '"
717 << n.name
718 << "' for location:" << tag << endmsg;
719 return StatusCode::FAILURE ; // RETURN
720 }
721
722 object.reset( reinterpret_cast<DataObject*>(n.clazz->New()) );
723
724 if ( !object )
725 {
726 error()
727 << "Failed to create an object of type:"
728 << n.clazz->GetName() << " for location:" << tag
729 << endmsg;
730 return StatusCode::FAILURE ; // RETURN
731 }
732 }
733 //
734 StatusCode sc = m_dataSvc->registerObject(tag, object.release() );
735 if ( sc.isFailure() )
736 {
737 error() << "Failed to register an object of type:"
738 << n.name << " at location:" << tag
739 << endmsg;
740 return sc ; // RETURN
741 }
742 ++n.num ;
743 //
744 return StatusCode::SUCCESS ;
745 }
DataOnDemandSvc::m_locked_nodes
bool m_locked_nodes
Definition: DataOnDemandSvc.h:285
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
GaudiPluginService.cpluginsvc.n
list n
Definition: cpluginsvc.py:217
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:244
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:118
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::unique_ptr::reset
T reset(T...args)
GaudiPython.Bindings.DataObject
DataObject
Definition: Bindings.py:50
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:282
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:244

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

Inherited Service overrides: Service finalization.

Definition at line 316 of file DataOnDemandSvc.cpp.

317 {
318 //
319 info()
320 << "Handled \"" << m_trapType << "\" incidents: "
321 << m_statAlg << "/" << m_statNode << "/" << m_stat << "(Alg/Node/Total)."
322 << endmsg ;
323 if ( m_dump || msgLevel(MSG::DEBUG) )
324 {
325 info()
326 << m_total.outputUserTime
327 ( "Algorithm timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] " , System::milliSec )
328 << m_total.outputUserTime ( "Total:%2%[s]" , System::Sec ) << endmsg ;
329 info()
330 << m_timer_nodes.outputUserTime
331 ( "Nodes timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] " , System::milliSec )
332 << m_timer_nodes.outputUserTime ( "Total:%2%[s]" , System::Sec ) << endmsg ;
333 info()
334 << m_timer_algs .outputUserTime
335 ( "Algs timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] " , System::milliSec )
336 << m_timer_algs .outputUserTime ( "Total:%2%[s]" , System::Sec ) << endmsg ;
337 info()
338 << m_timer_all .outputUserTime
339 ( "All timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] " , System::milliSec )
340 << m_timer_all .outputUserTime ( "Total:%2%[s]" , System::Sec ) << endmsg ;
341 }
342 // dump it!
343 if ( m_dump ) { dump ( MSG::INFO , false ) ; }
344 else if ( msgLevel(MSG::DEBUG) ) { dump ( MSG::DEBUG , false ) ; }
345 //
346 if ( m_incSvc )
347 {
348 m_incSvc->removeListener(this, m_trapType);
349 m_incSvc.reset();
350 }
351 m_algMgr.reset();
352 m_dataSvc.reset();
353 if (m_toolSvc) { // we may not have retrieved the ToolSvc
354 // Do not call releaseTool if the ToolSvc was already finalized.
355 if (SmartIF<IStateful>(m_toolSvc)->FSMState() > Gaudi::StateMachine::CONFIGURED) {
356 for(const auto& i : m_nodeMappers ) m_toolSvc->releaseTool(i).ignore();
357 for(const auto& i : m_algMappers ) m_toolSvc->releaseTool(i).ignore();
358 } else {
359 warning() << "ToolSvc already finalized: cannot release tools. Check options." << endmsg;
360 }
361 m_nodeMappers.clear();
362 m_algMappers.clear();
363 m_toolSvc.reset();
364 }
365 return Service::finalize();
366 }
DataOnDemandSvc::m_timer_all
ChronoEntity m_timer_all
Definition: DataOnDemandSvc.h:284
SmartIF< IStateful >
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:14
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:193
DataOnDemandSvc::m_timer_algs
ChronoEntity m_timer_algs
Definition: DataOnDemandSvc.h:283
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:57
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:124
DataOnDemandSvc::m_stat
ulonglong m_stat
Definition: DataOnDemandSvc.h:280
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:290
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:240
MSG::DEBUG
Definition: IMessageSvc.h:18
DataOnDemandSvc::m_trapType
std::string m_trapType
Trap name.
Definition: DataOnDemandSvc.h:248
DataOnDemandSvc::m_statAlg
ulonglong m_statAlg
Definition: DataOnDemandSvc.h:278
System::milliSec
Definition: Timing.h:51
System::Sec
Definition: Timing.h:51
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:244
DataOnDemandSvc::m_statNode
ulonglong m_statNode
Definition: DataOnDemandSvc.h:279
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
MsgStream::clear
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:222
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:789
ChronoEntity::outputUserTime
std::string outputUserTime() const
print the chrono ;
Definition: ChronoEntity.cpp:85
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:292
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:242
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:246
DataOnDemandSvc::m_dump
bool m_dump
flag to force the printout
Definition: DataOnDemandSvc.h:254
DataOnDemandSvc::m_timer_nodes
ChronoEntity m_timer_nodes
Definition: DataOnDemandSvc.h:282
IToolSvc::releaseTool
virtual StatusCode releaseTool(IAlgTool *tool)=0
Release the tool.
DataOnDemandSvc::m_total
ChronoEntity m_total
Definition: DataOnDemandSvc.h:277
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
IIncidentSvc::removeListener
virtual void removeListener(IIncidentListener *lis, const std::string &type="")=0
Remove listener.
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
MSG::INFO
Definition: IMessageSvc.h:19
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:136
ana.i
list i
Definition: ana.py:128
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

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

IIncidentListener interfaces overrides: incident handling.

Definition at line 625 of file DataOnDemandSvc.cpp.

626 {
627
628 Gaudi::Utils::LockedChrono timer ( m_timer_all , m_locked_all ) ;
629
630 ++m_stat ;
631 // proper incident type?
632 if ( incident.type() != m_trapType ) { return ; } // RETURN
633 const DataIncident* inc = dynamic_cast<const DataIncident*>(&incident);
634 if ( ! inc ) { return ; } // RETURN
635 // update if needed!
636 if ( m_updateRequired ) { update() ; }
637
638 if ( msgLevel(MSG::VERBOSE) )
639 {
640 verbose()
641 << "Incident: [" << incident.type () << "] "
642 << " = " << incident.source ()
643 << " Location:" << inc->tag() << endmsg;
644 }
645 // ==========================================================================
646 Gaudi::StringKey tag ( inc->tag() ) ;
647 // ==========================================================================
648 auto icl = m_nodes.find ( tag ) ;
649 if ( icl != m_nodes.end() )
650 {
651 StatusCode sc = execHandler ( tag , icl->second ) ;
652 if ( sc.isSuccess() ) { ++m_statNode ; }
653 return ; // RETURN
654 }
655 // ==========================================================================
656 auto ialg = m_algs.find ( tag ) ;
657 if ( ialg != m_algs.end() )
658 {
659 StatusCode sc = execHandler ( tag , ialg->second ) ;
660 if ( sc.isSuccess() ) { ++m_statAlg ; }
661 return ; // RETURN
662 }
663 // ==========================================================================
664 // Fall back on the tools
665 if (m_toolSvc) {
666 if ( msgLevel(MSG::VERBOSE))
667 verbose() << "Try to find mapping with mapping tools" << endmsg;
668 Finder finder(no_prefix(inc->tag(), m_prefix), m_nodeMappers, m_algMappers);
669 // - try the node mappers
670 std::string node = finder.node();
671 if (isGood(node)) {
672 // if one is found update the internal node mapping and try again.
673 if (msgLevel(MSG::VERBOSE))
674 verbose() << "Found Node handler: " << node << endmsg;
675 i_setNodeHandler(inc->tag(), node);
676 handle(incident);
677 --m_stat; // avoid double counting because of recursion
678 return;
679 }
680 // - try alg mappings
681 Gaudi::Utils::TypeNameString alg = finder.alg();
682 if (isGood(alg)) {
683 // we got an algorithm, update alg map and try to handle again
684 if (msgLevel(MSG::VERBOSE))
685 verbose() << "Found Algorithm handler: " << alg << endmsg;
686 i_setAlgHandler(inc->tag(), alg).ignore();
687 handle(incident);
688 --m_stat; // avoid double counting because of recursion
689 return;
690 }
691 }
692 }
DataOnDemandSvc::i_setNodeHandler
void i_setNodeHandler(const std::string &name, const std::string &type)
Internal method to initialize a node handler.
Definition: DataOnDemandSvc.cpp:207
DataOnDemandSvc::m_timer_all
ChronoEntity m_timer_all
Definition: DataOnDemandSvc.h:284
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:280
Incident::source
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:47
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:290
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
DataOnDemandSvc::handle
void handle(const Incident &incident) override
IIncidentListener interfaces overrides: incident handling.
Definition: DataOnDemandSvc.cpp:625
CommonMessagingBase::verbose
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Definition: CommonMessaging.h:130
DataOnDemandSvc::m_trapType
std::string m_trapType
Trap name.
Definition: DataOnDemandSvc.h:248
DataOnDemandSvc::m_statAlg
ulonglong m_statAlg
Definition: DataOnDemandSvc.h:278
MSG::VERBOSE
Definition: IMessageSvc.h:17
merge_files.sc
int sc
Definition: merge_files.py:167
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:279
GaudiUtils::Map::end
iterator end()
Definition: Map.h:132
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
DataOnDemandSvc::execHandler
StatusCode execHandler(const std::string &tag, Leaf &leaf)
Execute leaf handler (algorithm)
Definition: DataOnDemandSvc.cpp:750
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiUtils::Map::find
iterator find(const key_type &key)
Definition: Map.h:149
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:267
DataOnDemandSvc::m_prefix
std::string m_prefix
Definition: DataOnDemandSvc.h:275
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:292
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:246
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:265
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:274
DataIncident
Data service incident class.
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:136
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:217
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:239
DataOnDemandSvc::m_locked_all
bool m_locked_all
Definition: DataOnDemandSvc.h:287

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

Internal method to initialize an algorithm handler.

Definition at line 217 of file DataOnDemandSvc.cpp.

217 {
218 Leaf leaf(alg.type(), alg.name());
219 if (m_init)
220 {
221 StatusCode sc = configureHandler(leaf);
222 if (sc.isFailure()) {
223 if (m_allowInitFailure) {
224 // re-store the content of the leaf object to try again to initialize
225 // the algorithm later (on demand)
226 leaf = Leaf(alg.type(), alg.name());
227 }
228 else
229 return sc;
230 }
231 }
232 m_algs[name] = leaf;
233 return StatusCode::SUCCESS;
234 }
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
DataOnDemandSvc::m_allowInitFailure
bool m_allowInitFailure
flag to allow DataOnDemand initialization to succeed even if the (pre)initialization of the algorithm...
Definition: DataOnDemandSvc.h:259
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:265
DataOnDemandSvc::m_init
bool m_init
flag to warm up the configuration
Definition: DataOnDemandSvc.h:256
Gaudi::Utils::TypeNameString::type
const std::string & type() const
Definition: TypeNameString.h:22
Gaudi::Utils::TypeNameString::name
const std::string & name() const
Definition: TypeNameString.h:23
DataOnDemandSvc::configureHandler
StatusCode configureHandler(Leaf &leaf)
Configure handler for leaf.
Definition: DataOnDemandSvc.cpp:520

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

Internal method to initialize a node handler.

Definition at line 207 of file DataOnDemandSvc.cpp.

207 {
208 ClassH cl = TClass::GetClass(type.c_str()) ;
209 if (!cl) {
210 warning()
211 << "Failed to access dictionary class for "
212 << name << " of type:" << type << endmsg;
213 }
214 m_nodes[name] = Node(cl, false, type);
215 }
DataOnDemandSvc::ClassH
TClass * ClassH
Definition: DataOnDemandSvc.h:97
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:267
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:244

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

Inherited Service overrides: Service initialization.

Definition at line 298 of file DataOnDemandSvc.cpp.

299 {
300 // initialize the Service Base class
301 StatusCode sc = Service::initialize();
302 if ( sc.isFailure() ) { return sc; }
303 sc = setup();
304 if ( sc.isFailure() ) { return sc; }
305 //
306 if ( m_dump ) { dump ( MSG::INFO ) ; }
307 else if ( msgLevel(MSG::DEBUG) ) { dump ( MSG::DEBUG ) ; }
308 //
309 if ( m_init ) { return update () ; }
310 //
311 return StatusCode::SUCCESS ;
312 }
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:68
MSG::DEBUG
Definition: IMessageSvc.h:18
merge_files.sc
int sc
Definition: merge_files.py:167
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:400
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:789
DataOnDemandSvc::m_dump
bool m_dump
flag to force the printout
Definition: DataOnDemandSvc.h:254
DataOnDemandSvc::m_init
bool m_init
flag to warm up the configuration
Definition: DataOnDemandSvc.h:256
MSG::INFO
Definition: IMessageSvc.h:19
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:136
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:239

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

Inherited Service overrides: Service reinitialization.

re-initialization of the service

Definition at line 370 of file DataOnDemandSvc.cpp.

371 {
372 // reinitialize the Service Base class
373 if ( m_incSvc )
374 {
375 m_incSvc -> removeListener ( this , m_trapType );
376 m_incSvc.reset();
377 }
378 m_algMgr.reset();
379 m_dataSvc.reset();
380 for(const auto& i : m_nodeMappers ) m_toolSvc->releaseTool(i).ignore();
381 m_nodeMappers.clear();
382 for(const auto& i : m_algMappers ) m_toolSvc->releaseTool(i).ignore();
383 m_algMappers.clear();
384 m_toolSvc.reset();
385 //
386 StatusCode sc = Service::reinitialize();
387 if ( sc.isFailure() ) { return sc; }
388 //
389 sc = setup() ;
390 if ( sc.isFailure() ) { return sc; }
391 //
392 if ( m_dump ) { dump ( MSG::INFO ) ; }
393 else if ( msgLevel(MSG::DEBUG) ) { dump ( MSG::DEBUG ) ; }
394 //
395 return StatusCode::SUCCESS ;
396 }
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:290
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:240
MSG::DEBUG
Definition: IMessageSvc.h:18
DataOnDemandSvc::m_trapType
std::string m_trapType
Trap name.
Definition: DataOnDemandSvc.h:248
merge_files.sc
int sc
Definition: merge_files.py:167
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:244
DataOnDemandSvc::setup
StatusCode setup()
Setup routine (called by (re-) initialize.
Definition: DataOnDemandSvc.cpp:400
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Service::reinitialize
StatusCode reinitialize() override
Definition: Service.cpp:282
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:789
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:292
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:242
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:246
DataOnDemandSvc::m_dump
bool m_dump
flag to force the printout
Definition: DataOnDemandSvc.h:254
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:88
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
MSG::INFO
Definition: IMessageSvc.h:19
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:136
ana.i
list i
Definition: ana.py:128

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

Setup routine (called by (re-) initialize.

Definition at line 400 of file DataOnDemandSvc.cpp.

401 {
402 if ( !(m_algMgr = serviceLocator()) ) // assignment meant
403 {
404 error() << "Failed to retrieve the IAlgManager interface." << endmsg;
405 return StatusCode::FAILURE;
406 }
407
408 if ( !(m_incSvc = serviceLocator()->service("IncidentSvc")) ) // assignment meant
409 {
410 error() << "Failed to retrieve Incident service." << endmsg;
411 return StatusCode::FAILURE;
412 }
413 m_incSvc->addListener(this, m_trapType);
414
415 if ( !(m_dataSvc = serviceLocator()->service(m_dataSvcName)) ) // assignment meant
416 {
417 error()
418 << "Failed to retrieve the data provider interface of "
419 << m_dataSvcName << endmsg;
420 return StatusCode::FAILURE;
421 }
422
423 // No need to get the ToolSvc if we are not using tools
424 if (!(m_nodeMapTools.empty() && m_algMapTools.empty())) {
425 if ( !(m_toolSvc = serviceLocator()->service("ToolSvc")) ) // assignment meant
426 {
427 error() << "Failed to retrieve ToolSvc" << endmsg;
428 return StatusCode::FAILURE;
429 }
430
431 // load the node mapping tools
432 IDODNodeMapper *nodetool = nullptr;
433 for(const auto& i : m_nodeMapTools) {
434 const StatusCode sc = m_toolSvc->retrieveTool(i, nodetool);
435 if (sc.isFailure()) return sc;
436 m_nodeMappers.push_back(nodetool);
437 }
438 IDODAlgMapper *algtool = nullptr;
439 for(const auto& i : m_algMapTools) {
440 const StatusCode sc = m_toolSvc->retrieveTool(i, algtool);
441 if (sc.isFailure()) return sc;
442 m_algMappers.push_back(algtool);
443 }
444 }
445 return update();
446 }
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:324
std::vector::empty
T empty(T...args)
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:290
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:240
DataOnDemandSvc::m_algMapTools
std::vector< std::string > m_algMapTools
Definition: DataOnDemandSvc.h:291
DataOnDemandSvc::m_trapType
std::string m_trapType
Trap name.
Definition: DataOnDemandSvc.h:248
DataOnDemandSvc::m_dataSvcName
std::string m_dataSvcName
Data service name.
Definition: DataOnDemandSvc.h:250
merge_files.sc
int sc
Definition: merge_files.py:167
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:145
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:244
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:78
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:118
IDODNodeMapper
Interface of tools used by the DataOnDemandSvc to choose the type of node to be created at a path...
Definition: IDODNodeMapper.h:17
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DataOnDemandSvc::m_nodeMapTools
std::vector< std::string > m_nodeMapTools
Definition: DataOnDemandSvc.h:289
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:292
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:242
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:246
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't already exist.
Definition: Service.h:144
ana.i
list i
Definition: ana.py:128
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:239

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

Initialize leaf handlers.

Definition at line 486 of file DataOnDemandSvc.cpp.

487 {
488 std::string typ, tag;
489
490 for (auto alg: m_algMapping)
491 {
492 using Parser = Gaudi::Utils::AttribStringParser;
493 for (auto attrib: Parser(alg)) {
494 switch( ::toupper(attrib.tag[0]) ) {
495 case 'D':
496 tag = std::move(attrib.value);
497 break;
498 case 'T':
499 typ = std::move(attrib.value);
500 break;
501 }
502 }
503 Gaudi::Utils::TypeNameString item(typ);
504 if ( m_algMap .end () != m_algMap .find ( tag ) ||
505 m_nodeMap .end () != m_nodeMap .find ( tag ) )
506 {
507 warning()
508 << "The obsolete property 'Algorithms' redefines the action for '"
509 + tag + "' to be '" +item.type() +"/"+item.name()+"'"
510 << endmsg ;
511 }
512 m_algMap[tag] = item.type() + "/" + item.name() ;
513 }
514 m_updateRequired = true ;
515 return StatusCode::SUCCESS;
516 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
DataOnDemandSvc::m_algMap
Map m_algMap
the major configuration property { 'data' : 'algorithm' }
Definition: DataOnDemandSvc.h:271
std::string
STL class.
DataOnDemandSvc::m_algMapping
Setup m_algMapping
Mapping to algorithms.
Definition: DataOnDemandSvc.h:261
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
StatusCode::SUCCESS
Definition: StatusCode.h:30
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:47
std::move
T move(T...args)
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:274
ana.item
tuple item
print s1,s2
Definition: ana.py:146
DataOnDemandSvc::m_nodeMap
Map m_nodeMap
the major configuration property { 'data' : 'type' }
Definition: DataOnDemandSvc.h:273
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:244

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

Initialize node handlers.

Definition at line 450 of file DataOnDemandSvc.cpp.

451 {
452 std::string nam, typ, tag;
453 StatusCode sc = StatusCode::SUCCESS;
454 // Setup for node leafs, where simply a constructor is called...
455 for (auto node: m_nodeMapping)
456 {
457 using Parser = Gaudi::Utils::AttribStringParser;
458 for (auto attrib: Parser(node)) {
459 switch( ::toupper(attrib.tag[0]) ) {
460 case 'D':
461 tag = std::move(attrib.value);
462 break;
463 case 'T':
464 nam = std::move(attrib.value);
465 break;
466 }
467 }
468 if ( m_algMap .end () != m_algMap .find ( tag ) ||
469 m_nodeMap .end () != m_nodeMap .find ( tag ) )
470 {
471 warning()
472 << "The obsolete property 'Nodes' redefines the action for '"
473 + tag + "' to be '" +nam+"'"
474 << endmsg ;
475 }
476 m_nodeMap[tag] = nam ;
477 }
478 //
479 m_updateRequired = true ;
480 //
481 return sc;
482 }
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:30
DataOnDemandSvc::m_nodeMapping
Setup m_nodeMapping
Mapping to nodes.
Definition: DataOnDemandSvc.h:263
DataOnDemandSvc::m_algMap
Map m_algMap
the major configuration property { 'data' : 'algorithm' }
Definition: DataOnDemandSvc.h:271
merge_files.sc
int sc
Definition: merge_files.py:167
std::string
STL class.
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:47
std::move
T move(T...args)
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:274
DataOnDemandSvc::m_nodeMap
Map m_nodeMap
the major configuration property { 'data' : 'type' }
Definition: DataOnDemandSvc.h:273
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:244

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

240 {
241 if ( !m_updateRequired ) { return StatusCode::SUCCESS ; }
242
244 StatusCode sc = setupNodeHandlers() ; // convert "Nodes" new "NodeMap"
245 if ( sc.isFailure() )
246 {
247 error() << "Failed to setup old \"Nodes\"" << endmsg ;
248 return sc ;
249 }
251 sc = setupAlgHandlers() ; // convert "Algorithms" into "AlgMap"
252 if ( sc.isFailure() )
253 {
254 error() << "Failed to setup old \"Algorithms\"" << endmsg ;
255 return sc ;
256 }
258 add_prefix ( m_algMap , m_prefix ) ;
260 add_prefix ( m_nodeMap , m_prefix ) ;
262 std::set<std::string> dirs ;
263 if ( m_partialPath ){ get_dirs ( m_algMap , dirs ) ; }
264 if ( m_partialPath ){ get_dirs ( m_nodeMap , dirs ) ; }
265 //
266 auto _e = dirs.find("/Event") ;
267 if ( dirs.end() != _e ) { dirs.erase( _e ) ; }
268 // add all directories as nodes
269 for ( const auto& dir : dirs )
270 {
271 if ( m_algMap .end () == m_algMap .find ( dir ) &&
272 m_nodeMap .end () == m_nodeMap .find ( dir ) )
273 m_nodeMap [dir] = "DataObject" ;
274 }
275 //
276 m_algs .clear () ;
277 m_nodes .clear () ;
278 //
280 for ( const auto& alg : m_algMap )
281 {
282 if (i_setAlgHandler(alg.first, alg.second).isFailure())
283 return StatusCode::FAILURE;
284 }
286 for ( const auto& node : m_nodeMap )
287 {
288 i_setNodeHandler(node.first, node.second);
289 }
291 m_updateRequired = false ;
292 //
293 return StatusCode::SUCCESS ;
294 }
DataOnDemandSvc::i_setNodeHandler
void i_setNodeHandler(const std::string &name, const std::string &type)
Internal method to initialize a node handler.
Definition: DataOnDemandSvc.cpp:207
std::set::end
T end(T...args)
DataOnDemandSvc::m_algMap
Map m_algMap
the major configuration property { 'data' : 'algorithm' }
Definition: DataOnDemandSvc.h:271
merge_files.sc
int sc
Definition: merge_files.py:167
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:118
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DataOnDemandSvc::setupNodeHandlers
StatusCode setupNodeHandlers()
Initialize node handlers.
Definition: DataOnDemandSvc.cpp:450
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:267
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:47
DataOnDemandSvc::m_prefix
std::string m_prefix
Definition: DataOnDemandSvc.h:275
DataOnDemandSvc::m_partialPath
bool m_partialPath
Flag to allow for the creation of partial leaves.
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:265
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:274
GaudiUtils::Map::clear
void clear()
Definition: Map.h:178
DataOnDemandSvc::m_nodeMap
Map m_nodeMap
the major configuration property { 'data' : 'type' }
Definition: DataOnDemandSvc.h:273
DataOnDemandSvc::setupAlgHandlers
StatusCode setupAlgHandlers()
Initialize leaf handlers.
Definition: DataOnDemandSvc.cpp:486
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:217
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

void DataOnDemandSvc::update_1 | ( | Property & | p | ) |

Definition at line 89 of file DataOnDemandSvc.cpp.

90 {
91 verbose() << " I am update handler for property " << p << endmsg ;
92 // force update
93 m_updateRequired = true ;
94 }
CommonMessagingBase::verbose
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Definition: CommonMessaging.h:130
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:274
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

void DataOnDemandSvc::update_2 | ( | Property & | p | ) |

Definition at line 110 of file DataOnDemandSvc.cpp.

111 {
112 warning()
113 << "The property 'Algorithms' is obsolete, switch to map-like 'AlgMap' "
114 << " = { 'data' : 'algorithm' } "
115 << endmsg ;
116 // force update
117 m_updateRequired = true ;
118 }
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:274
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

void DataOnDemandSvc::update_3 | ( | Property & | p | ) |

Definition at line 98 of file DataOnDemandSvc.cpp.

99 {
100 warning()
101 << "The property 'Nodes' is obsolete, switch to map-like 'NodeMap' "
102 << " = { 'data' : 'type' } "
103 << endmsg ;
104 // force update
105 m_updateRequired = true ;
106 }
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:121
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:274
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

void DataOnDemandSvc::update_dump | ( | Property & |  | ) |

update handler for 'Dump' property

Definition at line 122 of file DataOnDemandSvc.cpp.

123 {
124 // no action if not yet initialized
125 if ( FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }
126 // dump the configuration:
127 if ( m_dump ) { dump ( MSG::ALWAYS ) ; }
128 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:57
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:789
DataOnDemandSvc::m_dump
bool m_dump
flag to force the printout
Definition: DataOnDemandSvc.h:254
MSG::ALWAYS
Definition: IMessageSvc.h:23

## Member Data Documentation

Map DataOnDemandSvc::m_algMap
| private

the major configuration property { 'data' : 'algorithm' }

Definition at line 271 of file DataOnDemandSvc.h.

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

Definition at line 292 of file DataOnDemandSvc.h.

Setup DataOnDemandSvc::m_algMapping
| private

Mapping to algorithms.

Definition at line 261 of file DataOnDemandSvc.h.

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

Definition at line 291 of file DataOnDemandSvc.h.

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

Algorithm manager.

Definition at line 242 of file DataOnDemandSvc.h.

AlgMap DataOnDemandSvc::m_algs
| private

Map of algorithms to handle incidents.

Definition at line 265 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_allowInitFailure = false
| private

flag to allow DataOnDemand initialization to succeed even if the (pre)initialization of the algorithms fails (m_init).

Definition at line 259 of file DataOnDemandSvc.h.

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

Data provider reference.

Definition at line 244 of file DataOnDemandSvc.h.

std::string DataOnDemandSvc::m_dataSvcName = "EventDataSvc"
| private

Data service name.

Definition at line 250 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_dump = false
| private

flag to force the printout

Definition at line 254 of file DataOnDemandSvc.h.

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

Incident service.

Definition at line 240 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_init = false
| private

flag to warm up the configuration

Definition at line 256 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_locked_algs = false
| private

Definition at line 286 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_locked_all = false
| private

Definition at line 287 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_locked_nodes = false
| private

Definition at line 285 of file DataOnDemandSvc.h.

Map DataOnDemandSvc::m_nodeMap
| private

the major configuration property { 'data' : 'type' }

Definition at line 273 of file DataOnDemandSvc.h.

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

Definition at line 290 of file DataOnDemandSvc.h.

Setup DataOnDemandSvc::m_nodeMapping
| private

Mapping to nodes.

Definition at line 263 of file DataOnDemandSvc.h.

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

Definition at line 289 of file DataOnDemandSvc.h.

NodeMap DataOnDemandSvc::m_nodes
| private

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

Definition at line 267 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_partialPath = true
| private

Flag to allow for the creation of partial leaves.

Definition at line 252 of file DataOnDemandSvc.h.

std::string DataOnDemandSvc::m_prefix = "/Event/"
| private

Definition at line 275 of file DataOnDemandSvc.h.

ulonglong DataOnDemandSvc::m_stat = 0
| private

Definition at line 280 of file DataOnDemandSvc.h.

ulonglong DataOnDemandSvc::m_statAlg = 0
| private

Definition at line 278 of file DataOnDemandSvc.h.

ulonglong DataOnDemandSvc::m_statNode = 0
| private

Definition at line 279 of file DataOnDemandSvc.h.

ChronoEntity DataOnDemandSvc::m_timer_algs
| private

Definition at line 283 of file DataOnDemandSvc.h.

ChronoEntity DataOnDemandSvc::m_timer_all
| private

Definition at line 284 of file DataOnDemandSvc.h.

ChronoEntity DataOnDemandSvc::m_timer_nodes
| private

Definition at line 282 of file DataOnDemandSvc.h.

SmartIF<IToolSvc> DataOnDemandSvc::m_toolSvc
| private

Data provider reference.

Definition at line 246 of file DataOnDemandSvc.h.

ChronoEntity DataOnDemandSvc::m_total
| private

Definition at line 277 of file DataOnDemandSvc.h.

std::string DataOnDemandSvc::m_trapType = "DataFault"
| private

Trap name.

Definition at line 248 of file DataOnDemandSvc.h.

bool DataOnDemandSvc::m_updateRequired = true
| private

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