The Gaudi Framework  v40r0 (475e45c1)
DataOnDemandSvc Class Reference

#include </builds/gaudi/Gaudi/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.h>

Inheritance diagram for DataOnDemandSvc:
Collaboration diagram for DataOnDemandSvc:

Classes

struct  Leaf
 
struct  Node
 
struct  Protection
 

Public Types

typedef std::vector< std::string > Setup
 
typedef TClass * ClassH
 
typedef GaudiUtils::HashMap< Gaudi::StringKey, NodeNodeMap
 
typedef GaudiUtils::HashMap< Gaudi::StringKey, LeafAlgMap
 
- Public Types inherited from extends< Service, IIncidentListener >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from Service
using Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

StatusCode initialize () override
 Inherited Service overrides: Service initialization. More...
 
StatusCode finalize () override
 Inherited Service overrides: Service finalization. More...
 
StatusCode reinitialize () override
 Inherited Service overrides: Service reinitialization. More...
 
void handle (const Incident &incident) override
 IIncidentListener interfaces overrides: incident handling. More...
 
- Public Member Functions inherited from extends< Service, IIncidentListener >
void const * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Service
const std::string & name () const override
 Retrieve name of the service
More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 Initialize Service
More...
 
StatusCode sysStart () override
 Initialize Service
More...
 
StatusCode sysStop () override
 Initialize Service
More...
 
StatusCode sysFinalize () override
 Finalize Service
More...
 
StatusCode sysReinitialize () override
 Re-initialize the Service. More...
 
StatusCode sysRestart () override
 Re-initialize the Service. More...
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor
More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator
More...
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, const std::string &toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
 
template<class T >
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
const std::vector< IAlgTool * > & tools () const
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
 requires (!Gaudi::Details::is_gaudi_property_v< TYPE >) Gaudi
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view 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 (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

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
std::vector< IAlgTool * > & tools ()
 
 ~Service () override
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Private Types

typedef std::map< std::string, std::string > Map
 

Private Member Functions

void force_update (Gaudi::Details::PropertyBase &p)
 
void deprecated_property (Gaudi::Details::PropertyBase &p)
 

Private Attributes

SmartIF< IIncidentSvcm_incSvc = nullptr
 Incident service. More...
 
SmartIF< IAlgManagerm_algMgr = nullptr
 Algorithm manager. More...
 
SmartIF< IDataProviderSvcm_dataSvc = nullptr
 Data provider reference. More...
 
SmartIF< IToolSvcm_toolSvc
 Data provider reference. More...
 
AlgMap m_algs
 Map of algorithms to handle incidents. More...
 
NodeMap m_nodes
 Map of "empty" objects to be placed as intermediate nodes. More...
 
bool m_updateRequired = true
 
ChronoEntity m_total
 
unsigned long long m_statAlg = 0
 
unsigned long long m_statNode = 0
 
unsigned long long m_stat = 0
 
ChronoEntity m_timer_nodes
 
ChronoEntity m_timer_algs
 
ChronoEntity m_timer_all
 
bool m_locked_nodes = false
 
bool m_locked_algs = false
 
bool m_locked_all = false
 
std::vector< IDODNodeMapper * > m_nodeMappers
 
std::vector< IDODAlgMapper * > m_algMappers
 
Gaudi::Property< std::string > m_trapType { this, "IncidentName", "DataFault", "the type of handled Incident" }
 
Gaudi::Property< std::string > m_dataSvcName { this, "DataSvc", "EventDataSvc", "DataSvc name" }
 
Gaudi::Property< bool > m_partialPath { this, "UsePreceedingPath", true, "allow creation of partial leaves" }
 
Gaudi::Property< bool > m_dump
 
Gaudi::Property< bool > m_init { this, "PreInitialize", false, "(pre)initialize all algorithms" }
 
Gaudi::Property< bool > m_allowInitFailure
 
Gaudi::Property< Setupm_algMapping
 
Gaudi::Property< Setupm_nodeMapping
 
Gaudi::Property< Mapm_algMap { this, "AlgMap", {}, &DataOnDemandSvc::force_update, "mapping {'data': 'algorithm'}" }
 
Gaudi::Property< Mapm_nodeMap { this, "NodeMap", {}, &DataOnDemandSvc::force_update, "mapping {'data': 'type'}" }
 
Gaudi::Property< std::string > m_prefix { this, "Prefix", "/Event/" }
 
Gaudi::Property< std::vector< std::string > > m_nodeMapTools
 
Gaudi::Property< std::vector< std::string > > m_algMapTools
 

Additional Inherited Members

- Protected Attributes inherited from Service
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state
More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state
More...
 
Gaudi::Property< int > m_outputLevel { this, "OutputLevel", MSG::NIL, "output level" }
 flag indicating whether ToolHandle tools have been added to m_tools More...
 
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()" }
 
Gaudi::Property< bool > m_autoRetrieveTools
 
Gaudi::Property< bool > m_checkToolDeps
 
SmartIF< IAuditorSvcm_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:)

{ "Phys/StdLoosePions/Particles" : "PreLoadParticles/StdLoosePions" ,
"Phys/StdLoosePions/Vertioces" : "PreLoadParticles/StdLoosePions" } ;
{ "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 87 of file DataOnDemandSvc.h.

Member Typedef Documentation

◆ AlgMap

◆ ClassH

typedef TClass* DataOnDemandSvc::ClassH

Definition at line 90 of file DataOnDemandSvc.h.

◆ Map

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

Definition at line 245 of file DataOnDemandSvc.h.

◆ NodeMap

◆ Setup

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

Definition at line 89 of file DataOnDemandSvc.h.

Member Function Documentation

◆ configureHandler()

StatusCode DataOnDemandSvc::configureHandler ( Leaf leaf)
protected

Configure handler for leaf.

Parameters
leaf[IN] Reference to leaf handler
Returns
StatusCode indicating success or failure

Definition at line 346 of file DataOnDemandSvc.cpp.

346  {
347  if ( l.algorithm ) { return StatusCode::SUCCESS; }
348  if ( !m_algMgr ) { return StatusCode::FAILURE; }
349  l.algorithm = m_algMgr->algorithm( l.name, false );
350  if ( l.algorithm ) { return StatusCode::SUCCESS; }
351  // create it!
352  StatusCode sc = m_algMgr->createAlgorithm( l.type, l.name, l.algorithm, true );
353  if ( sc.isFailure() ) {
354  error() << "Failed to create algorithm " << l.type << "('" << l.name << "')" << endmsg;
355  l.algorithm = nullptr;
356  return sc;
357  }
358  if ( l.algorithm->isInitialized() ) { return StatusCode::SUCCESS; }
359  // initialize it!
360  sc = l.algorithm->sysInitialize();
361  if ( sc.isFailure() ) {
362  error() << "Failed to initialize algorithm " << l.type << "('" << l.name << "')" << endmsg;
363  l.algorithm = nullptr;
364  return sc;
365  }
366  if ( Gaudi::StateMachine::RUNNING == l.algorithm->FSMState() ) { return StatusCode::SUCCESS; }
367  // run it!
368  sc = l.algorithm->sysStart();
369  if ( sc.isFailure() ) {
370  error() << "Failed to 'run' algorithm " << l.type << "('" << l.name << "')" << endmsg;
371  l.algorithm = nullptr;
372  return sc;
373  }
374  return StatusCode::SUCCESS;
375 }

◆ deprecated_property()

void DataOnDemandSvc::deprecated_property ( Gaudi::Details::PropertyBase p)
inlineprivate

Definition at line 190 of file DataOnDemandSvc.h.

190  {
191  warning() << p.name() << " " << p.documentation() << endmsg;
192  force_update( p );
193  };

◆ dump()

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

dump the content of DataOnDemand service

Parameters
levelthe printout level
modethe printout mode

Definition at line 553 of file DataOnDemandSvc.cpp.

553  {
554  if ( m_algs.empty() && m_nodes.empty() ) { return; }
555 
556  typedef std::pair<std::string, std::string> Pair;
557  std::map<std::string, Pair> _m;
558  for ( auto& alg : m_algs ) {
559  auto check = _m.find( alg.first );
560  if ( _m.end() != check ) {
561  warning() << " The data item is activated for '" << check->first << "' as '" << check->second.first << "'"
562  << endmsg;
563  }
564  const Leaf& l = alg.second;
565  std::string nam = ( l.name == l.type ? l.type : ( l.type + "/" + l.name ) );
566 
567  if ( !mode && 0 == l.num ) { continue; }
568 
569  std::string val;
570  if ( mode ) {
571  val = ( !l.algorithm ) ? "F" : "T";
572  } else {
573  val = std::to_string( l.num );
574  }
575 
576  _m[no_prefix( alg.first, m_prefix )] = { nam, val };
577  }
578  // nodes:
579  for ( const auto& node : m_nodes ) {
580  auto check = _m.find( node.first );
581  if ( _m.end() != check ) {
582  warning() << " The data item is already activated for '" << check->first << "' as '" << check->second.first << "'"
583  << endmsg;
584  }
585  const Node& n = node.second;
586  std::string nam = "'" + n.name + "'";
587 
588  std::string val;
589 
590  if ( !mode && 0 == n.num ) { continue; }
591 
592  if ( mode ) {
593  val = ( 0 == n.clazz ) ? "F" : "T";
594  } else {
595  val = std::to_string( n.num );
596  }
597 
598  _m[no_prefix( node.first, m_prefix )] = { nam, val };
599  }
600 
601  if ( _m.empty() ) { return; }
602 
603  // set width of the columns
604  size_t n1 = 10; // minimum width
605  size_t n2 = 10; // minimum width
606  size_t n3 = 0;
607  for ( const auto& i : _m ) {
608  n1 = std::max( n1, i.first.size() );
609  n2 = std::max( n2, i.second.first.size() );
610  n3 = std::max( n3, i.second.second.size() );
611  }
612  n1 = std::min( n1, size_t{ 60 } ); // maximum width
613  n2 = std::min( n2, size_t{ 60 } ); // maximum width
614 
615  auto& msg = msgStream( level );
616 
617  if ( mode ) {
618  msg << "Data-On-Demand Actions enabled for:";
619  } else {
620  msg << "Data-On-Demand Actions has been used for:";
621  }
622 
623  const auto header = fmt::format( " | {3:<{0}.{0}s} | {4:<{1}.{1}s} | {5:>{2}.{2}s} |", n1, n2, n3, "Address",
624  "Creator", ( mode ? "S" : "#" ) );
625  const auto line = fmt::format( " {0:-^{1}}", "", header.size() - 1 );
626  msg << '\n' << line << '\n' << header << '\n' << line;
627 
628  // make the actual printout:
629  for ( const auto& item : _m ) {
630  msg << fmt::format( "\n | {3:<{0}.{0}s} | {4:<{1}.{1}s} | {5:>{2}.{2}s} |", n1, n2, n3, item.first,
631  item.second.first, item.second.second );
632  }
633 
634  msg << '\n' << line << endmsg;
635 }

◆ execHandler() [1/2]

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

Execute leaf handler (algorithm)

Parameters
tag[IN] Path to requested leaf
leaf[IN] Reference to leaf handler
Returns
StatusCode indicating success or failure

Definition at line 523 of file DataOnDemandSvc.cpp.

523  {
525 
526  if ( l.executing ) { return StatusCode::FAILURE; }
527 
528  if ( !l.algorithm ) {
529  StatusCode sc = configureHandler( l );
530  if ( sc.isFailure() ) {
531  error() << "Failed to configure handler for: " << l.name << "[" << l.type << "] " << tag << endmsg;
532  return sc;
533  }
534  }
535 
536  Chrono atimer( m_total );
537 
538  Protection p( l.executing );
539  // FIXME: this will cause problems for Hive, as we need to set
540  // the EventContext of the called Algorithm.
541  // if (!l.algorithm->getContext()) {
542  // l.algorithm->setContext( &Gaudi::Hive::currentContext() );
543  // }
544  StatusCode sc = l.algorithm->sysExecute( Gaudi::Hive::currentContext() );
545  if ( sc.isFailure() ) {
546  error() << "Failed to execute the algorithm:" << l.algorithm->name() << " for location:" << tag << endmsg;
547  return sc;
548  }
549  ++l.num;
550 
551  return StatusCode::SUCCESS;
552 }

◆ execHandler() [2/2]

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

Execute node handler (simple object creation using seal reflection)

Parameters
tag[IN] Path to requested leaf
node[IN] Reference to node handler
Returns
StatusCode indicating success or failure

Definition at line 486 of file DataOnDemandSvc.cpp.

486  {
487 
489 
490  if ( n.executing ) { return StatusCode::FAILURE; }
491 
492  Protection p( n.executing );
493 
494  std::unique_ptr<DataObject> object;
495 
496  if ( n.dataObject ) {
497  object.reset( new DataObject() );
498  } else {
499  // try to recover the handler
500  if ( !n.clazz ) { n.clazz = TClass::GetClass( n.name.c_str() ); }
501  if ( !n.clazz ) {
502  error() << "Failed to get dictionary for class '" << n.name << "' for location:" << tag << endmsg;
503  return StatusCode::FAILURE;
504  }
505 
506  object.reset( reinterpret_cast<DataObject*>( n.clazz->New() ) );
507 
508  if ( !object ) {
509  error() << "Failed to create an object of type:" << n.clazz->GetName() << " for location:" << tag << endmsg;
510  return StatusCode::FAILURE;
511  }
512  }
513  //
514  StatusCode sc = m_dataSvc->registerObject( tag, object.release() );
515  if ( sc.isFailure() ) {
516  error() << "Failed to register an object of type:" << n.name << " at location:" << tag << endmsg;
517  return sc;
518  }
519  ++n.num;
520  //
521  return StatusCode::SUCCESS;
522 }

◆ finalize()

StatusCode DataOnDemandSvc::finalize ( )
override

Inherited Service overrides: Service finalization.

Definition at line 178 of file DataOnDemandSvc.cpp.

178  {
179  info() << "Handled \"" << m_trapType.value() << "\" incidents: " << m_statAlg << "/" << m_statNode << "/" << m_stat
180  << "(Alg/Node/Total)." << endmsg;
181  if ( m_dump || msgLevel( MSG::DEBUG ) ) {
182  info() << m_total.outputUserTime( "Algorithm timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
184  << m_total.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
185  info() << m_timer_nodes.outputUserTime( "Nodes timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
187  << m_timer_nodes.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
188  info() << m_timer_algs.outputUserTime( "Algs timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
190  << m_timer_algs.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
191  info() << m_timer_all.outputUserTime( "All timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ",
193  << m_timer_all.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
194  }
195  // dump it!
196  if ( m_dump ) {
197  dump( MSG::INFO, false );
198  } else if ( msgLevel( MSG::DEBUG ) ) {
199  dump( MSG::DEBUG, false );
200  }
201 
202  if ( m_incSvc ) {
203  m_incSvc->removeListener( this, m_trapType );
204  m_incSvc.reset();
205  }
206  m_algMgr.reset();
207  m_dataSvc.reset();
208  if ( m_toolSvc ) { // we may not have retrieved the ToolSvc
209  // Do not call releaseTool if the ToolSvc was already finalized.
211  for ( const auto& i : m_nodeMappers ) m_toolSvc->releaseTool( i ).ignore();
212  for ( const auto& i : m_algMappers ) m_toolSvc->releaseTool( i ).ignore();
213  } else {
214  warning() << "ToolSvc already finalized: cannot release tools. Check options." << endmsg;
215  }
216  m_nodeMappers.clear();
217  m_algMappers.clear();
218  m_toolSvc.reset();
219  }
220  return Service::finalize();
221 }

◆ force_update()

void DataOnDemandSvc::force_update ( Gaudi::Details::PropertyBase p)
inlineprivate

Definition at line 186 of file DataOnDemandSvc.h.

186  {
187  verbose() << "updated property " << p.name() << ", forcing update" << endmsg;
188  m_updateRequired = true;
189  };

◆ handle()

void DataOnDemandSvc::handle ( const Incident incident)
override

IIncidentListener interfaces overrides: incident handling.

Definition at line 425 of file DataOnDemandSvc.cpp.

425  {
426 
428 
429  ++m_stat;
430  // proper incident type?
431  if ( incident.type() != m_trapType ) { return; }
432  const DataIncident* inc = dynamic_cast<const DataIncident*>( &incident );
433  if ( !inc ) { return; }
434  // update if needed!
435  if ( m_updateRequired ) {
436  if ( !update() ) throw GaudiException( "Failed to update", name(), StatusCode::FAILURE );
437  }
438 
439  if ( msgLevel( MSG::VERBOSE ) ) {
440  verbose() << "Incident: [" << incident.type() << "] "
441  << " = " << incident.source() << " Location:" << inc->tag() << endmsg;
442  }
443 
444  Gaudi::StringKey tag( inc->tag() );
445 
446  auto icl = m_nodes.find( tag );
447  if ( icl != m_nodes.end() ) {
448  StatusCode sc = execHandler( tag, icl->second );
449  if ( sc.isSuccess() ) { ++m_statNode; }
450  return;
451  }
452 
453  auto ialg = m_algs.find( tag );
454  if ( ialg != m_algs.end() ) {
455  StatusCode sc = execHandler( tag, ialg->second );
456  if ( sc.isSuccess() ) { ++m_statAlg; }
457  return;
458  }
459 
460  // Fall back on the tools
461  if ( m_toolSvc ) {
462  if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Try to find mapping with mapping tools" << endmsg;
463  Finder finder( no_prefix( inc->tag(), m_prefix ), m_nodeMappers, m_algMappers );
464  // - try the node mappers
465  std::string node = finder.node();
466  if ( isGood( node ) ) {
467  // if one is found update the internal node mapping and try again.
468  if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Found Node handler: " << node << endmsg;
469  i_setNodeHandler( inc->tag(), node );
470  handle( incident );
471  --m_stat; // avoid double counting because of recursion
472  return;
473  }
474  // - try alg mappings
475  Gaudi::Utils::TypeNameString alg = finder.alg();
476  if ( isGood( alg ) ) {
477  // we got an algorithm, update alg map and try to handle again
478  if ( msgLevel( MSG::VERBOSE ) ) verbose() << "Found Algorithm handler: " << alg << endmsg;
479  i_setAlgHandler( inc->tag(), alg ).ignore();
480  handle( incident );
481  --m_stat; // avoid double counting because of recursion
482  return;
483  }
484  }
485 }

◆ i_setAlgHandler()

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

Internal method to initialize an algorithm handler.

Definition at line 98 of file DataOnDemandSvc.cpp.

98  {
99  Leaf leaf( alg.type(), alg.name() );
100  if ( m_init ) {
101  StatusCode sc = configureHandler( leaf );
102  if ( sc.isFailure() ) {
103  if ( m_allowInitFailure ) {
104  // re-store the content of the leaf object to try again to initialize
105  // the algorithm later (on demand)
106  leaf = Leaf( alg.type(), alg.name() );
107  } else
108  return sc;
109  }
110  }
111  m_algs[name] = leaf;
112  return StatusCode::SUCCESS;
113 }

◆ i_setNodeHandler()

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

Internal method to initialize a node handler.

Definition at line 92 of file DataOnDemandSvc.cpp.

92  {
93  ClassH cl = TClass::GetClass( type.c_str() );
94  if ( !cl ) { warning() << "Failed to access dictionary class for " << name << " of type:" << type << endmsg; }
95  m_nodes[name] = Node( cl, false, type );
96 }

◆ initialize()

StatusCode DataOnDemandSvc::initialize ( )
override

Inherited Service overrides: Service initialization.

Definition at line 161 of file DataOnDemandSvc.cpp.

161  {
162  // initialize the Service Base class
164  if ( sc.isFailure() ) { return sc; }
165  sc = setup();
166  if ( sc.isFailure() ) { return sc; }
167  //
168  if ( m_dump ) {
169  dump( MSG::INFO );
170  } else if ( msgLevel( MSG::DEBUG ) ) {
171  dump( MSG::DEBUG );
172  }
173 
174  if ( m_init ) { return update(); }
175 
176  return StatusCode::SUCCESS;
177 }

◆ reinitialize()

StatusCode DataOnDemandSvc::reinitialize ( )
override

Inherited Service overrides: Service reinitialization.

Definition at line 222 of file DataOnDemandSvc.cpp.

222  {
223  // reinitialize the Service Base class
224  if ( m_incSvc ) {
225  m_incSvc->removeListener( this, m_trapType );
226  m_incSvc.reset();
227  }
228  m_algMgr.reset();
229  m_dataSvc.reset();
230  for ( const auto& i : m_nodeMappers ) m_toolSvc->releaseTool( i ).ignore();
231  m_nodeMappers.clear();
232  for ( const auto& i : m_algMappers ) m_toolSvc->releaseTool( i ).ignore();
233  m_algMappers.clear();
234  m_toolSvc.reset();
235 
237  if ( sc.isFailure() ) { return sc; }
238 
239  sc = setup();
240  if ( sc.isFailure() ) { return sc; }
241 
242  if ( m_dump ) {
243  dump( MSG::INFO );
244  } else if ( msgLevel( MSG::DEBUG ) ) {
245  dump( MSG::DEBUG );
246  }
247 
248  return StatusCode::SUCCESS;
249 }

◆ setup()

StatusCode DataOnDemandSvc::setup ( )
protected

Setup routine (called by (re-) initialize.

Definition at line 250 of file DataOnDemandSvc.cpp.

250  {
251  if ( !( m_algMgr = serviceLocator() ) ) // assignment meant
252  {
253  error() << "Failed to retrieve the IAlgManager interface." << endmsg;
254  return StatusCode::FAILURE;
255  }
256 
257  if ( !( m_incSvc = serviceLocator()->service( "IncidentSvc" ) ) ) // assignment meant
258  {
259  error() << "Failed to retrieve Incident service." << endmsg;
260  return StatusCode::FAILURE;
261  }
262  m_incSvc->addListener( this, m_trapType );
263 
264  if ( !( m_dataSvc = serviceLocator()->service( m_dataSvcName ) ) ) // assignment meant
265  {
266  error() << "Failed to retrieve the data provider interface of " << m_dataSvcName << endmsg;
267  return StatusCode::FAILURE;
268  }
269 
270  // No need to get the ToolSvc if we are not using tools
271  if ( !( m_nodeMapTools.empty() && m_algMapTools.empty() ) ) {
272  if ( !( m_toolSvc = serviceLocator()->service( "ToolSvc" ) ) ) // assignment meant
273  {
274  error() << "Failed to retrieve ToolSvc" << endmsg;
275  return StatusCode::FAILURE;
276  }
277 
278  // load the node mapping tools
279  IDODNodeMapper* nodetool = nullptr;
280  for ( const auto& i : m_nodeMapTools ) {
281  const StatusCode sc = m_toolSvc->retrieveTool( i, nodetool );
282  if ( sc.isFailure() ) return sc;
283  m_nodeMappers.push_back( nodetool );
284  }
285  IDODAlgMapper* algtool = nullptr;
286  for ( const auto& i : m_algMapTools ) {
287  const StatusCode sc = m_toolSvc->retrieveTool( i, algtool );
288  if ( sc.isFailure() ) return sc;
289  m_algMappers.push_back( algtool );
290  }
291  }
292  return update();
293 }

◆ setupAlgHandlers()

StatusCode DataOnDemandSvc::setupAlgHandlers ( )
protected

Initialize leaf handlers.

Definition at line 320 of file DataOnDemandSvc.cpp.

320  {
321  std::string typ, tag;
322 
323  for ( auto alg : m_algMapping ) {
324  using Parser = Gaudi::Utils::AttribStringParser;
325  for ( auto attrib : Parser( alg ) ) {
326  switch ( ::toupper( attrib.tag[0] ) ) {
327  case 'D':
328  tag = std::move( attrib.value );
329  break;
330  case 'T':
331  typ = std::move( attrib.value );
332  break;
333  }
334  }
335  Gaudi::Utils::TypeNameString item( typ );
336  if ( m_algMap.end() != m_algMap.find( tag ) || m_nodeMap.end() != m_nodeMap.find( tag ) ) {
337  warning() << "The obsolete property 'Algorithms' redefines the action for '" + tag + "' to be '" + item.type() +
338  "/" + item.name() + "'"
339  << endmsg;
340  }
341  m_algMap[tag] = item.type() + "/" + item.name();
342  }
343  m_updateRequired = true;
344  return StatusCode::SUCCESS;
345 }

◆ setupNodeHandlers()

StatusCode DataOnDemandSvc::setupNodeHandlers ( )
protected

Initialize node handlers.

Definition at line 294 of file DataOnDemandSvc.cpp.

294  {
295  std::string nam, typ, tag;
297  // Setup for node leafs, where simply a constructor is called...
298  for ( auto node : m_nodeMapping ) {
299  using Parser = Gaudi::Utils::AttribStringParser;
300  for ( auto attrib : Parser( node ) ) {
301  switch ( ::toupper( attrib.tag[0] ) ) {
302  case 'D':
303  tag = std::move( attrib.value );
304  break;
305  case 'T':
306  nam = std::move( attrib.value );
307  break;
308  }
309  }
310  if ( m_algMap.end() != m_algMap.find( tag ) || m_nodeMap.end() != m_nodeMap.find( tag ) ) {
311  warning() << "The obsolete property 'Nodes' redefines the action for '" + tag + "' to be '" + nam + "'" << endmsg;
312  }
313  m_nodeMap[tag] = nam;
314  }
315 
316  m_updateRequired = true;
317 
318  return sc;
319 }

◆ update()

StatusCode DataOnDemandSvc::update ( )
protected

update the handlers

Definition at line 115 of file DataOnDemandSvc.cpp.

115  {
116  if ( !m_updateRequired ) { return StatusCode::SUCCESS; }
117 
118  // convert obsolete "Nodes" into new "NodeMap"
119  StatusCode sc = setupNodeHandlers(); // convert "Nodes" new "NodeMap"
120  if ( sc.isFailure() ) {
121  error() << "Failed to setup old \"Nodes\"" << endmsg;
122  return sc;
123  }
124  // convert obsolete "Algorithms" into new "AlgMap"
125  sc = setupAlgHandlers(); // convert "Algorithms" into "AlgMap"
126  if ( sc.isFailure() ) {
127  error() << "Failed to setup old \"Algorithms\"" << endmsg;
128  return sc;
129  }
130  // add the default prefix
131  add_prefix( m_algMap, m_prefix );
132  // add the default prefix
133  add_prefix( m_nodeMap, m_prefix );
134  // get all directories
135  std::set<std::string> dirs;
136  if ( m_partialPath ) { get_dirs( m_algMap, dirs ); }
137  if ( m_partialPath ) { get_dirs( m_nodeMap, dirs ); }
138 
139  auto _e = dirs.find( "/Event" );
140  if ( dirs.end() != _e ) { dirs.erase( _e ); }
141  // add all directories as nodes
142  for ( const auto& dir : dirs ) {
143  if ( m_algMap.end() == m_algMap.find( dir ) && m_nodeMap.end() == m_nodeMap.find( dir ) )
144  m_nodeMap[dir] = "DataObject";
145  }
146 
147  m_algs.clear();
148  m_nodes.clear();
149 
150  // setup algorithms
151  for ( const auto& alg : m_algMap ) {
152  if ( i_setAlgHandler( alg.first, alg.second ).isFailure() ) return StatusCode::FAILURE;
153  }
154  // setup nodes
155  for ( const auto& node : m_nodeMap ) { i_setNodeHandler( node.first, node.second ); }
156 
157  m_updateRequired = false;
158 
159  return StatusCode::SUCCESS;
160 }

Member Data Documentation

◆ m_algMap

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

Definition at line 246 of file DataOnDemandSvc.h.

◆ m_algMappers

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

Definition at line 223 of file DataOnDemandSvc.h.

◆ m_algMapping

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

Definition at line 240 of file DataOnDemandSvc.h.

◆ m_algMapTools

Gaudi::Property<std::vector<std::string> > DataOnDemandSvc::m_algMapTools
private
Initial value:
{
this, "AlgMappingTools", {}, "list of tools of type IDODAlgMapper" }

Definition at line 253 of file DataOnDemandSvc.h.

◆ m_algMgr

SmartIF<IAlgManager> DataOnDemandSvc::m_algMgr = nullptr
private

Algorithm manager.

Definition at line 198 of file DataOnDemandSvc.h.

◆ m_algs

AlgMap DataOnDemandSvc::m_algs
private

Map of algorithms to handle incidents.

Definition at line 204 of file DataOnDemandSvc.h.

◆ m_allowInitFailure

Gaudi::Property<bool> DataOnDemandSvc::m_allowInitFailure
private
Initial value:
{
this, "AllowPreInitializeFailure", false,
"allow (pre)initialization of algorithms to fail without stopping the application" }

Definition at line 236 of file DataOnDemandSvc.h.

◆ m_dataSvc

SmartIF<IDataProviderSvc> DataOnDemandSvc::m_dataSvc = nullptr
private

Data provider reference.

Definition at line 200 of file DataOnDemandSvc.h.

◆ m_dataSvcName

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

Definition at line 226 of file DataOnDemandSvc.h.

◆ m_dump

Gaudi::Property<bool> DataOnDemandSvc::m_dump
private
Initial value:
{
this, "Dump", false,
[this]( auto& ) {
},
"dump configuration and stastics, if set to True after initialize it triggers a dump immediately" }

Definition at line 229 of file DataOnDemandSvc.h.

◆ m_incSvc

SmartIF<IIncidentSvc> DataOnDemandSvc::m_incSvc = nullptr
private

Incident service.

Definition at line 196 of file DataOnDemandSvc.h.

◆ m_init

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

Definition at line 235 of file DataOnDemandSvc.h.

◆ m_locked_algs

bool DataOnDemandSvc::m_locked_algs = false
private

Definition at line 219 of file DataOnDemandSvc.h.

◆ m_locked_all

bool DataOnDemandSvc::m_locked_all = false
private

Definition at line 220 of file DataOnDemandSvc.h.

◆ m_locked_nodes

bool DataOnDemandSvc::m_locked_nodes = false
private

Definition at line 218 of file DataOnDemandSvc.h.

◆ m_nodeMap

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

Definition at line 247 of file DataOnDemandSvc.h.

◆ m_nodeMappers

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

Definition at line 222 of file DataOnDemandSvc.h.

◆ m_nodeMapping

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

Definition at line 242 of file DataOnDemandSvc.h.

◆ m_nodeMapTools

Gaudi::Property<std::vector<std::string> > DataOnDemandSvc::m_nodeMapTools
private
Initial value:
{
this, "NodeMappingTools", {}, "list of tools of type IDODNodeMapper" }

Definition at line 251 of file DataOnDemandSvc.h.

◆ m_nodes

NodeMap DataOnDemandSvc::m_nodes
private

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

Definition at line 206 of file DataOnDemandSvc.h.

◆ m_partialPath

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

Definition at line 228 of file DataOnDemandSvc.h.

◆ m_prefix

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

Definition at line 249 of file DataOnDemandSvc.h.

◆ m_stat

unsigned long long DataOnDemandSvc::m_stat = 0
private

Definition at line 213 of file DataOnDemandSvc.h.

◆ m_statAlg

unsigned long long DataOnDemandSvc::m_statAlg = 0
private

Definition at line 211 of file DataOnDemandSvc.h.

◆ m_statNode

unsigned long long DataOnDemandSvc::m_statNode = 0
private

Definition at line 212 of file DataOnDemandSvc.h.

◆ m_timer_algs

ChronoEntity DataOnDemandSvc::m_timer_algs
private

Definition at line 216 of file DataOnDemandSvc.h.

◆ m_timer_all

ChronoEntity DataOnDemandSvc::m_timer_all
private

Definition at line 217 of file DataOnDemandSvc.h.

◆ m_timer_nodes

ChronoEntity DataOnDemandSvc::m_timer_nodes
private

Definition at line 215 of file DataOnDemandSvc.h.

◆ m_toolSvc

SmartIF<IToolSvc> DataOnDemandSvc::m_toolSvc
private

Data provider reference.

Definition at line 202 of file DataOnDemandSvc.h.

◆ m_total

ChronoEntity DataOnDemandSvc::m_total
private

Definition at line 210 of file DataOnDemandSvc.h.

◆ m_trapType

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

Definition at line 225 of file DataOnDemandSvc.h.

◆ m_updateRequired

bool DataOnDemandSvc::m_updateRequired = true
private

Definition at line 208 of file DataOnDemandSvc.h.


The documentation for this class was generated from the following files:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:22
DataOnDemandSvc::m_locked_nodes
bool m_locked_nodes
Definition: DataOnDemandSvc.h:218
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: PropertyBase.h:38
System::milliSec
@ milliSec
Definition: Timing.h:54
GaudiPython.Bindings.DataObject
DataObject
Definition: Bindings.py:82
toupper
void toupper(std::string &s)
Definition: ExceptionSvc.cpp:36
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:98
DataOnDemandSvc::i_setNodeHandler
void i_setNodeHandler(const std::string &name, const std::string &type)
Internal method to initialize a node handler.
Definition: DataOnDemandSvc.cpp:92
DataOnDemandSvc::deprecated_property
void deprecated_property(Gaudi::Details::PropertyBase &p)
Definition: DataOnDemandSvc.h:190
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:118
Incident::source
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:49
DataOnDemandSvc::m_algMapping
Gaudi::Property< Setup > m_algMapping
Definition: DataOnDemandSvc.h:240
DataOnDemandSvc::m_algMapTools
Gaudi::Property< std::vector< std::string > > m_algMapTools
Definition: DataOnDemandSvc.h:253
Gaudi::Hive::currentContext
GAUDI_API const EventContext & currentContext()
Definition: ThreadLocalContext.cpp:30
GaudiUtils::Map::find
iterator find(const key_type &key)
Definition: Map.h:133
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
MSG::INFO
@ INFO
Definition: IMessageSvc.h:22
DataOnDemandSvc::configureHandler
StatusCode configureHandler(Leaf &leaf)
Configure handler for leaf.
Definition: DataOnDemandSvc.cpp:346
DataOnDemandSvc::m_allowInitFailure
Gaudi::Property< bool > m_allowInitFailure
Definition: DataOnDemandSvc.h:236
Gaudi::Details::PropertyBase::documentation
std::string documentation() const
property documentation
Definition: PropertyBase.h:40
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
Gaudi::Details::PropertyBase::type
std::string type() const
property type
Definition: PropertyBase.h:46
GaudiException
Definition: GaudiException.h:29
DataOnDemandSvc::setupAlgHandlers
StatusCode setupAlgHandlers()
Initialize leaf handlers.
Definition: DataOnDemandSvc.cpp:320
Gaudi::Utils::Histos::Formats::header
GAUDI_API std::string header(const int ID=Default)
get the recommended header by enum
Definition: HistoTableFormat.cpp:186
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:19
DataOnDemandSvc::setup
StatusCode setup()
Setup routine (called by (re-) initialize.
Definition: DataOnDemandSvc.cpp:250
conf.release
string release
Definition: conf.py:27
DataOnDemandSvc::m_dataSvc
SmartIF< IDataProviderSvc > m_dataSvc
Data provider reference.
Definition: DataOnDemandSvc.h:200
DataOnDemandSvc::m_algMappers
std::vector< IDODAlgMapper * > m_algMappers
Definition: DataOnDemandSvc.h:223
DataOnDemandSvc::m_locked_algs
bool m_locked_algs
Definition: DataOnDemandSvc.h:219
Service::service
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
Definition: Service.h:79
GaudiPartProp.Nodes.Node
Node
Definition: Nodes.py:247
DataOnDemandSvc::force_update
void force_update(Gaudi::Details::PropertyBase &p)
Definition: DataOnDemandSvc.h:186
DataOnDemandSvc::ClassH
TClass * ClassH
Definition: DataOnDemandSvc.h:90
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:147
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:223
GaudiUtils::Map::empty
bool empty() const
Definition: Map.h:177
Service::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: Service.h:55
IDODAlgMapper
Interface of tools used by the DataOnDemandSvc to choose the algorithm to be run to produce the data ...
Definition: IDODAlgMapper.h:23
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
DataOnDemandSvc::m_algMgr
SmartIF< IAlgManager > m_algMgr
Algorithm manager.
Definition: DataOnDemandSvc.h:198
DataOnDemandSvc::m_stat
unsigned long long m_stat
Definition: DataOnDemandSvc.h:213
Gaudi::StringKey
Definition: StringKey.h:35
GaudiUtils::Map::clear
void clear()
Definition: Map.h:171
Chrono
Definition: Chrono.h:27
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:19
Gaudi::StateMachine::CONFIGURED
@ CONFIGURED
Definition: StateMachine.h:23
DataOnDemandSvc::m_partialPath
Gaudi::Property< bool > m_partialPath
Definition: DataOnDemandSvc.h:228
Service::name
const std::string & name() const override
Retrieve name of the service
Definition: Service.cpp:333
StatusCode
Definition: StatusCode.h:64
DataOnDemandSvc::m_trapType
Gaudi::Property< std::string > m_trapType
Definition: DataOnDemandSvc.h:225
ChronoEntity::outputUserTime
std::string outputUserTime() const
print the chrono ;
Definition: ChronoEntity.cpp:68
DataOnDemandSvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Data provider reference.
Definition: DataOnDemandSvc.h:202
DataIncident
DataOnDemandSvc::m_nodeMap
Gaudi::Property< Map > m_nodeMap
Definition: DataOnDemandSvc.h:247
axes_labels.check
def check(causes, result)
Definition: axes_labels.py:47
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:229
DataOnDemandSvc::execHandler
StatusCode execHandler(const std::string &tag, Leaf &leaf)
Execute leaf handler (algorithm)
Definition: DataOnDemandSvc.cpp:523
Gaudi::Utils::LockedChrono
Definition: LockedChrono.h:53
SmartIF< IStateful >
genconfuser.verbose
verbose
Definition: genconfuser.py:28
DataOnDemandSvc::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: DataOnDemandSvc.h:249
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:99
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:198
DataOnDemandSvc::m_dump
Gaudi::Property< bool > m_dump
Definition: DataOnDemandSvc.h:229
gaudirun.level
level
Definition: gaudirun.py:364
Gaudi::StateMachine::RUNNING
@ RUNNING
Definition: StateMachine.h:25
DataOnDemandSvc::m_updateRequired
bool m_updateRequired
Definition: DataOnDemandSvc.h:208
DataOnDemandSvc::m_statNode
unsigned long long m_statNode
Definition: DataOnDemandSvc.h:212
cpluginsvc.n
n
Definition: cpluginsvc.py:234
GaudiUtils::Map::end
iterator end()
Definition: Map.h:122
DataOnDemandSvc::AlgMap
GaudiUtils::HashMap< Gaudi::StringKey, Leaf > AlgMap
Definition: DataOnDemandSvc.h:135
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:139
DataOnDemandSvc::m_nodeMapTools
Gaudi::Property< std::vector< std::string > > m_nodeMapTools
Definition: DataOnDemandSvc.h:251
DataOnDemandSvc::dump
void dump(const MSG::Level level, const bool mode=true) const
dump the content of DataOnDemand service
Definition: DataOnDemandSvc.cpp:553
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
DataOnDemandSvc::m_algMap
Gaudi::Property< Map > m_algMap
Definition: DataOnDemandSvc.h:246
DataOnDemandSvc::m_algs
AlgMap m_algs
Map of algorithms to handle incidents.
Definition: DataOnDemandSvc.h:204
gaudirun.type
type
Definition: gaudirun.py:160
DataOnDemandSvc::m_nodeMapping
Gaudi::Property< Setup > m_nodeMapping
Definition: DataOnDemandSvc.h:242
System::Sec
@ Sec
Definition: Timing.h:54
MSG::VERBOSE
@ VERBOSE
Definition: IMessageSvc.h:22
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:99
DataOnDemandSvc::m_dataSvcName
Gaudi::Property< std::string > m_dataSvcName
Definition: DataOnDemandSvc.h:226
gaudirun.l
dictionary l
Definition: gaudirun.py:583
DataOnDemandSvc::setupNodeHandlers
StatusCode setupNodeHandlers()
Initialize node handlers.
Definition: DataOnDemandSvc.cpp:294
MSG::ALWAYS
@ ALWAYS
Definition: IMessageSvc.h:22
Gaudi::StateMachine::INITIALIZED
@ INITIALIZED
Definition: StateMachine.h:24
DataObject
Definition: DataObject.h:37
DataOnDemandSvc::m_nodes
NodeMap m_nodes
Map of "empty" objects to be placed as intermediate nodes.
Definition: DataOnDemandSvc.h:206
Service::reinitialize
StatusCode reinitialize() override
Definition: Service.cpp:296
DataOnDemandSvc::m_timer_algs
ChronoEntity m_timer_algs
Definition: DataOnDemandSvc.h:216
plotSpeedupsPyRoot.line
line
Definition: plotSpeedupsPyRoot.py:198
DataOnDemandSvc::update
StatusCode update()
update the handlers
Definition: DataOnDemandSvc.cpp:115
Incident::type
const std::string & type() const
Access to the incident type.
Definition: Incident.h:43
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:100
DataOnDemandSvc::m_timer_nodes
ChronoEntity m_timer_nodes
Definition: DataOnDemandSvc.h:215
DataOnDemandSvc::m_timer_all
ChronoEntity m_timer_all
Definition: DataOnDemandSvc.h:217
Gaudi::Utils::AttribStringParser
Parse attribute strings allowing iteration over the various attributes.
Definition: AttribStringParser.h:39
DataOnDemandSvc::m_locked_all
bool m_locked_all
Definition: DataOnDemandSvc.h:220
DataOnDemandSvc::NodeMap
GaudiUtils::HashMap< Gaudi::StringKey, Node > NodeMap
Definition: DataOnDemandSvc.h:134
DataOnDemandSvc::m_init
Gaudi::Property< bool > m_init
Definition: DataOnDemandSvc.h:235
DataOnDemandSvc
Definition: DataOnDemandSvc.h:87
DataOnDemandSvc::m_total
ChronoEntity m_total
Definition: DataOnDemandSvc.h:210
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
Definition: Service.cpp:336
DataOnDemandSvc::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Incident service.
Definition: DataOnDemandSvc.h:196
DataOnDemandSvc::handle
void handle(const Incident &incident) override
IIncidentListener interfaces overrides: incident handling.
Definition: DataOnDemandSvc.cpp:425
IDODNodeMapper
Interface of tools used by the DataOnDemandSvc to choose the type of node to be created at a path.
Definition: IDODNodeMapper.h:23
DataOnDemandSvc::m_nodeMappers
std::vector< IDODNodeMapper * > m_nodeMappers
Definition: DataOnDemandSvc.h:222
DataOnDemandSvc::m_statAlg
unsigned long long m_statAlg
Definition: DataOnDemandSvc.h:211