The Gaudi Framework  master (594c33fa)
HistorySvc Class Reference

#include </builds/gaudi/Gaudi/GaudiMonitor/src/HistorySvc.h>

Inheritance diagram for HistorySvc:
Collaboration diagram for HistorySvc:

Public Member Functions

StatusCode initialize () override
 
StatusCode reinitialize () override
 
StatusCode finalize () override
 
StatusCode stop () override
 
virtual StatusCode captureState ()
 
StatusCode registerJob () override
 
StatusCode listProperties () const override
 
JobHistorygetJobHistory () const override
 
StatusCode registerSvc (const IService &) override
 
StatusCode listProperties (const IService &) const override
 
ServiceHistorygetServiceHistory (const IService &) const override
 
void getServiceHistory (std::set< ServiceHistory * > &) const override
 
StatusCode registerAlg (const Gaudi::Algorithm &) override
 
StatusCode listProperties (const Gaudi::Algorithm &) const override
 
AlgorithmHistorygetAlgHistory (const Gaudi::Algorithm &) const override
 
void getAlgHistory (std::set< AlgorithmHistory * > &) const override
 
StatusCode registerAlgTool (const IAlgTool &) override
 
StatusCode listProperties (const IAlgTool &) const override
 
AlgToolHistorygetAlgToolHistory (const IAlgTool &) const override
 
void getAlgToolHistory (std::set< AlgToolHistory * > &) const override
 
DataHistorycreateDataHistoryObj (const CLID &id, const std::string &key, const std::string &store) override
 
virtual StatusCode registerDataHistory (const CLID &id, const std::string &key, const std::string &store)
 
DataHistorygetDataHistory (const CLID &id, const std::string &key, const std::string &store) const override
 
virtual int getDataHistory (const CLID &id, const std::string &key, const std::string &storeName, std::list< DataHistory * > &dhlist) const
 
void handle (const Incident &inc) override
 
- Public Member Functions inherited from extends< Service, IHistorySvc, 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::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Service
const std::stringname () 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<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 >
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, 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, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular 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...
 
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 setProperty (const std::string &name, const TYPE &value)
 set the property form the value 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...
 

Private Types

typedef IVersHistoryObj::PropertyList PropertyList
 
typedef std::multimap< DHH, DataHistory * > DataHistMap
 
typedef DataHistMap::iterator DHMitr
 
typedef DataHistMap::const_iterator DHMCitr
 

Private Member Functions

void clearState ()
 
void dumpProperties (std::ofstream &) const
 
void dumpProperties (const IService &, std::ofstream &) const
 
void dumpProperties (const Gaudi::Algorithm &, std::ofstream &) const
 
void dumpProperties (const IAlgTool &, std::ofstream &) const
 
void dumpState (std::ofstream &) const
 
void dumpState (const INamedInterface *, std::ofstream &) const
 
std::string dumpProp (const Gaudi::Details::PropertyBase *, const bool isXML=false, int indent=0) const
 
IAlgorithmgetCurrentIAlg () const
 

Private Attributes

Gaudi::Property< bool > m_dump { this, "Dump", false }
 
Gaudi::Property< bool > m_activate { this, "Activate", true }
 
Gaudi::Property< std::stringm_outputFile { this, "OutputFile" }
 
bool m_isInitialized = false
 
IAlgContextSvcp_algCtxSvc = nullptr
 
std::map< const Gaudi::Algorithm *, AlgorithmHistory * > m_algmap
 
std::set< const IAlgTool * > m_ialgtools
 
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
 
std::map< const IService *, ServiceHistory * > m_svcmap
 
std::multimap< DHH, DataHistory * > m_datMap
 
std::unique_ptr< JobHistorym_jobHistory
 
IIncidentSvcm_incidentSvc = nullptr
 
SmartIF< IToolSvcm_toolSvc
 
bool m_outputFileTypeXML = false
 

Additional Inherited Members

- Public Types inherited from extends< Service, IHistorySvc, 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...
 
- Protected Member Functions inherited from Service
std::vector< IAlgTool * > & tools ()
 
 ~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 > >
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...
 
- 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_auditInit { this, "AuditServices", false, "[[deprecated]] unused" }
 
Gaudi::Property< bool > m_auditorInitialize { this, "AuditInitialize", false, "trigger auditor on initialize()" }
 
Gaudi::Property< bool > m_auditorStart { this, "AuditStart", false, "trigger auditor on start()" }
 
Gaudi::Property< bool > m_auditorStop { this, "AuditStop", false, "trigger auditor on stop()" }
 
Gaudi::Property< bool > m_auditorFinalize { this, "AuditFinalize", false, "trigger auditor on finalize()" }
 
Gaudi::Property< bool > m_auditorReinitialize { this, "AuditReinitialize", false, "trigger auditor on reinitialize()" }
 
Gaudi::Property< bool > m_auditorRestart { this, "AuditRestart", false, "trigger auditor on restart()" }
 
Gaudi::Property< bool > m_autoRetrieveTools
 
Gaudi::Property< bool > m_checkToolDeps
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service
More...
 

Detailed Description

HistorySvc class definition

Definition at line 46 of file HistorySvc.h.

Member Typedef Documentation

◆ DataHistMap

Definition at line 90 of file HistorySvc.h.

◆ DHMCitr

typedef DataHistMap::const_iterator HistorySvc::DHMCitr
private

Definition at line 92 of file HistorySvc.h.

◆ DHMitr

typedef DataHistMap::iterator HistorySvc::DHMitr
private

Definition at line 91 of file HistorySvc.h.

◆ PropertyList

Definition at line 88 of file HistorySvc.h.

Member Function Documentation

◆ captureState()

StatusCode HistorySvc::captureState ( )
virtual

Get all the Algorithms

Get all the AlgTools

Get all the Services

Definition at line 169 of file HistorySvc.cpp.

169  {
170 
171  if ( !m_jobHistory ) {
172  m_jobHistory = std::make_unique<JobHistory>();
173 
174  bool foundAppMgr( false );
175  for ( const auto& item : serviceLocator()->getOptsSvc().items() ) {
176  m_jobHistory->addProperty( get<0>( item ), get<1>( item ) );
177  foundAppMgr |= get<0>( item ).compare( 0, 15, "ApplicationMgr." ) == 0;
178  }
179 
180  if ( !foundAppMgr ) {
181  auto ap = service<IProperty>( "ApplicationMgr" );
182  if ( !ap ) {
183  error() << "could not get the ApplicationMgr" << endmsg;
184  } else {
185  for ( auto prop : ap->getProperties() ) {
186  m_jobHistory->addProperty( "ApplicationMgr." + prop->name(), prop->toString() );
187  }
188  }
189  }
190  }
191 
193 
194  auto algMgr = Gaudi::svcLocator()->as<IAlgManager>();
195  if ( !algMgr ) {
196  error() << "Could not get AlgManager" << endmsg;
197  return StatusCode::FAILURE;
198  }
199 
200  size_t count = 0;
201  for ( auto ialg : algMgr->getAlgorithms() ) {
202  Gaudi::Algorithm* alg = dynamic_cast<Gaudi::Algorithm*>( ialg );
203  if ( !alg ) {
204  warning() << "Algorithm " << ialg->name() << " does not inherit from Gaudi::Algorithm. Not registering it."
205  << endmsg;
206  } else {
207  ++count;
208  registerAlg( *alg ).ignore();
209  }
210  }
211 
212  info() << "Registered " << count << " Algorithms" << endmsg;
213 
215 
216  m_isInitialized = true;
217  for ( auto algtool : m_ialgtools ) {
218  ( const_cast<IAlgTool*>( algtool ) )->addRef();
219  registerAlgTool( *algtool ).ignore();
220  }
221 
222  info() << "Registered " << m_algtoolmap.size() << " AlgTools" << endmsg;
223 
225 
226  for ( auto svc : Gaudi::svcLocator()->getServices() ) {
227  svc->addRef();
228  registerSvc( *svc ).ignore();
229  }
230 
231  info() << "Registered " << Gaudi::svcLocator()->getServices().size() << " Services" << endmsg;
232 
233  return StatusCode::SUCCESS;
234 }

◆ clearState()

void HistorySvc::clearState ( )
private

Definition at line 109 of file HistorySvc.cpp.

109  {
110  clear( m_algmap );
111 
112  m_ialgtools.clear();
113  clear( m_algtoolmap );
114 
115  clear( m_svcmap );
116 }

◆ createDataHistoryObj()

DataHistory * HistorySvc::createDataHistoryObj ( const CLID id,
const std::string key,
const std::string store 
)
override

Definition at line 411 of file HistorySvc.cpp.

412  {
413 
414  if ( !m_activate ) return nullptr;
415 
416  AlgorithmHistory* algHist = nullptr;
417 
418  IAlgorithm* ialg = getCurrentIAlg();
419  if ( !ialg ) {
420  ON_DEBUG
421  debug() << "Could not discover current Algorithm:" << endl
422  << " object CLID: " << id << " key: \"" << key << "\"" << endmsg;
423  algHist = nullptr;
424  } else {
425  Gaudi::Algorithm* alg = dynamic_cast<Gaudi::Algorithm*>( ialg );
426  if ( alg ) {
427  algHist = getAlgHistory( *alg );
428  } else {
429  warning() << "Could not extract concrete Algorithm:" << endl
430  << " object CLID: " << id << " key: \"" << key << "\"" << endmsg;
431  algHist = nullptr;
432  }
433  }
434  return new DataHistory( id, key, algHist );
435 }

◆ dumpProp()

std::string HistorySvc::dumpProp ( const Gaudi::Details::PropertyBase prop,
const bool  isXML = false,
int  indent = 0 
) const
private

Definition at line 660 of file HistorySvc.cpp.

660  {
661  std::ostringstream ost;
662  if ( isXML ) {
663  while ( ind > 0 ) {
664  ost << " ";
665  ind--;
666  }
667  ost << "<PROPERTY name=\"" << prop->name() << "\" value=\"" << HistoryObj::convert_string( prop->toString() )
668  << "\" documentation=\"" << HistoryObj::convert_string( prop->documentation() ) << "\">";
669  } else {
670  prop->fillStream( ost );
671  }
672  return ost.str();
673 }

◆ dumpProperties() [1/4]

void HistorySvc::dumpProperties ( const Gaudi::Algorithm alg,
std::ofstream ofs 
) const
private

Definition at line 318 of file HistorySvc.cpp.

318  {
319 
321 
322  if ( !hist ) { return; }
323 
324  for ( auto prop : hist->properties() ) { ofs << alg.name() << " " << dumpProp( prop ) << std::endl; }
325 }

◆ dumpProperties() [2/4]

void HistorySvc::dumpProperties ( const IAlgTool alg,
std::ofstream ofs 
) const
private

Definition at line 621 of file HistorySvc.cpp.

621  {
622 
624 
625  if ( !hist ) return;
626 
627  for ( auto& prop : hist->properties() ) { ofs << alg.name() << " " << dumpProp( prop ) << std::endl; }
628 }

◆ dumpProperties() [3/4]

void HistorySvc::dumpProperties ( const IService svc,
std::ofstream ofs 
) const
private

Definition at line 556 of file HistorySvc.cpp.

556  {
557 
558  ServiceHistory* hist = getServiceHistory( svc );
559 
560  if ( !hist ) return;
561 
562  for ( auto& prop : hist->properties() ) { ofs << svc.name() << " " << dumpProp( prop ) << std::endl; }
563 }

◆ dumpProperties() [4/4]

void HistorySvc::dumpProperties ( std::ofstream ofs) const
private

Definition at line 381 of file HistorySvc.cpp.

381  {
382 
383  ofs << "GLOBAL" << std::endl;
384  for ( const auto& prop : m_jobHistory->propertyPairs() ) {
385  ofs << prop.first << " " << dumpProp( prop.second.get() ) << std::endl;
386  }
387 
388  ofs << std::endl << "SERVICES" << std::endl;
389  for ( const auto& s : m_svcmap ) dumpProperties( *s.first, ofs );
390 
391  ofs << std::endl << "ALGORITHMS" << std::endl;
392  for ( const auto& alg : m_algmap ) dumpProperties( *alg.first, ofs );
393 
394  ofs << std::endl << "ALGTOOLS" << std::endl;
395  for ( const auto& tool : m_algtoolmap ) dumpProperties( *tool.first, ofs );
396 }

◆ dumpState() [1/2]

void HistorySvc::dumpState ( const INamedInterface in,
std::ofstream ofs 
) const
private

Definition at line 748 of file HistorySvc.cpp.

748  {
749 
750  HistoryObj* hist = nullptr;
751  IVersHistoryObj* vhist = nullptr;
752 
753  const IService* is = nullptr;
754  const Gaudi::Algorithm* ia = nullptr;
755  const IAlgTool* it = nullptr;
756  if ( ( is = dynamic_cast<const IService*>( in ) ) != nullptr ) {
757  ON_VERBOSE
758  verbose() << in->name() << " is Service" << endmsg;
759  ServiceHistory* o = getServiceHistory( *is );
760  hist = dynamic_cast<HistoryObj*>( o );
761  vhist = dynamic_cast<IVersHistoryObj*>( o );
762  } else if ( ( ia = dynamic_cast<const Gaudi::Algorithm*>( in ) ) != nullptr ) {
763  ON_VERBOSE
764  verbose() << in->name() << " is Alg" << endmsg;
765  AlgorithmHistory* o = getAlgHistory( *ia );
766  hist = dynamic_cast<HistoryObj*>( o );
767  vhist = dynamic_cast<IVersHistoryObj*>( o );
768  } else if ( ( it = dynamic_cast<const IAlgTool*>( in ) ) != nullptr ) {
769  ON_VERBOSE
770  verbose() << in->name() << " is AlgTool" << endmsg;
771  AlgToolHistory* o = getAlgToolHistory( *it );
772  hist = dynamic_cast<HistoryObj*>( o );
773  vhist = dynamic_cast<IVersHistoryObj*>( o );
774  } else {
775  error() << "Could not dcast interface to accepted History Obj type for " << in->name() << endmsg;
776  return;
777  }
778 
779  if ( !hist || !vhist ) {
780  error() << "Could not dcast recognized object to HistoryObj or IVersHistoryObj. This should never happen."
781  << endmsg;
782  return;
783  }
784 
785  if ( m_outputFileTypeXML ) {
786  hist->dump( ofs, true );
787  } else {
788  ofs << ">> " << vhist->name() << endl << *hist << endl;
789  }
790 }

◆ dumpState() [2/2]

void HistorySvc::dumpState ( std::ofstream ofs) const
private

Definition at line 677 of file HistorySvc.cpp.

677  {
678 
679  if ( m_outputFileTypeXML ) {
680  // xml header
681  ofs << "<?xml version=\"1.0\" ?> " << std::endl;
682  ofs << "<!--Test-xml-->" << std::endl;
683  ofs << "<SETUP>" << std::endl;
684  ofs << " <GLOBAL>" << std::endl;
685  } else {
686  ofs << "GLOBAL" << std::endl;
687  }
688 
689  std::string client_currently_open = "start";
690  for ( auto& item : m_jobHistory->propertyPairs() ) {
691  // client is the name of the component of the current property
692  const auto& client = item.first;
693  const auto& prp = item.second;
694 
695  if ( m_outputFileTypeXML ) {
696 
697  if ( client != client_currently_open ) {
698  if ( client_currently_open != "start" ) ofs << " </COMPONENT>" << endl;
699  ofs << " <COMPONENT name=\"" << client << "\" class=\"undefined\">" << std::endl;
700  }
701  } else {
702  ofs << client << " ";
703  }
704 
705  ofs << dumpProp( prp.get(), m_outputFileTypeXML, 6 ) << endl;
706 
707  client_currently_open = client;
708 
709  if ( m_outputFileTypeXML ) ofs << " </COMPONENT>" << endl;
710  }
711 
712  if ( m_outputFileTypeXML ) {
713  ofs << "</GLOBAL>" << endl << "<SERVICES>" << endl;
714  } else {
715  ofs << "SERVICES" << std::endl;
716  }
717 
718  // helper to dump monitored components sorted by name
719  auto sortedDump = [&ofs, this]( const auto& map ) {
721  for ( const auto& item : map ) sorted[item.first->name()] = item.first;
722  for ( const auto& item : sorted ) dumpState( item.second, ofs );
723  };
724 
725  sortedDump( m_svcmap );
726 
727  if ( m_outputFileTypeXML ) {
728  ofs << "</SERVICES>" << endl << "<ALGORITHMS> " << endl;
729  } else {
730  ofs << "ALGORITHMS" << std::endl;
731  }
732 
733  sortedDump( m_algmap );
734 
735  if ( m_outputFileTypeXML ) {
736  ofs << "</ALGORITHMS>" << endl << "<ALGTOOLS> " << endl;
737  } else {
738  ofs << "ALGTOOLS" << std::endl;
739  }
740 
741  sortedDump( m_algtoolmap );
742 
743  if ( m_outputFileTypeXML ) { ofs << "</ALGTOOLS>" << endl << "</SETUP>" << endl; }
744 }

◆ finalize()

StatusCode HistorySvc::finalize ( )
override

Definition at line 261 of file HistorySvc.cpp.

261  {
262 
263  ON_VERBOSE
264  verbose() << "HistorySvc::finalize()" << endmsg;
265 
266  clearState();
267 
268  StatusCode status = Service::finalize();
269 
270  if ( status.isSuccess() ) info() << "Service finalised successfully" << endmsg;
271 
272  return status;
273 }

◆ getAlgHistory() [1/2]

AlgorithmHistory * HistorySvc::getAlgHistory ( const Gaudi::Algorithm alg) const
override

Definition at line 328 of file HistorySvc.cpp.

328  {
329 
330  auto itr = m_algmap.find( &alg );
331  if ( itr == m_algmap.end() ) {
332  warning() << "Algorithm " << alg.name() << " not registered" << endmsg;
333  return nullptr;
334  }
335  return itr->second;
336 }

◆ getAlgHistory() [2/2]

void HistorySvc::getAlgHistory ( std::set< AlgorithmHistory * > &  algs) const
override

Definition at line 339 of file HistorySvc.cpp.

339 { map_to_set( m_algmap, algs ); }

◆ getAlgToolHistory() [1/2]

AlgToolHistory * HistorySvc::getAlgToolHistory ( const IAlgTool alg) const
override

Definition at line 632 of file HistorySvc.cpp.

632  {
633 
634  const AlgTool* palg = dynamic_cast<const AlgTool*>( &alg );
635  auto itr = m_algtoolmap.find( palg );
636  if ( itr == m_algtoolmap.end() ) {
637  warning() << "AlgTool " << alg.name() << " not registered" << endmsg;
638  return nullptr;
639  }
640  return itr->second;
641 }

◆ getAlgToolHistory() [2/2]

void HistorySvc::getAlgToolHistory ( std::set< AlgToolHistory * > &  algs) const
override

Definition at line 645 of file HistorySvc.cpp.

645 { map_to_set( m_algtoolmap, algs ); }

◆ getCurrentIAlg()

IAlgorithm * HistorySvc::getCurrentIAlg ( ) const
private

Definition at line 402 of file HistorySvc.cpp.

402  {
403  if ( p_algCtxSvc ) return p_algCtxSvc->currentAlg();
404  warning() << "trying to create DataHistoryObj before "
405  << "HistorySvc has been initialized" << endmsg;
406  return nullptr;
407 }

◆ getDataHistory() [1/2]

DataHistory * HistorySvc::getDataHistory ( const CLID id,
const std::string key,
const std::string store 
) const
override

Definition at line 471 of file HistorySvc.cpp.

472  {
473 
474  DHH dhh( id, key );
475 
476  auto mitr = m_datMap.equal_range( dhh );
477  return ( mitr.first != mitr.second ) ? mitr.first->second : nullptr;
478 }

◆ getDataHistory() [2/2]

int HistorySvc::getDataHistory ( const CLID id,
const std::string key,
const std::string storeName,
std::list< DataHistory * > &  dhlist 
) const
virtual

Definition at line 482 of file HistorySvc.cpp.

483  {
484 
485  DHH dhh( id, key );
486 
487  int n( 0 );
488 
489  auto mitr = m_datMap.equal_range( dhh );
490  for ( auto itr = mitr.first; itr != mitr.second; ++itr ) {
491  dhlist.push_back( itr->second );
492  ++n;
493  }
494  return n;
495 }

◆ getJobHistory()

JobHistory * HistorySvc::getJobHistory ( ) const
override

Definition at line 399 of file HistorySvc.cpp.

399 { return m_jobHistory.get(); }

◆ getServiceHistory() [1/2]

ServiceHistory * HistorySvc::getServiceHistory ( const IService svc) const
override

Definition at line 526 of file HistorySvc.cpp.

526  {
527 
528  const IService* psvc = &svc;
529  auto itr = m_svcmap.find( psvc );
530  if ( itr != m_svcmap.end() ) return itr->second;
531 
532  warning() << "Service " << svc.name() << " not registered" << endmsg;
533  return nullptr;
534 }

◆ getServiceHistory() [2/2]

void HistorySvc::getServiceHistory ( std::set< ServiceHistory * > &  svcs) const
override

Definition at line 537 of file HistorySvc.cpp.

537 { map_to_set( m_svcmap, svcs ); }

◆ handle()

void HistorySvc::handle ( const Incident inc)
override

Definition at line 649 of file HistorySvc.cpp.

649  {
650 
651  if ( incident.type() == IncidentType::BeginEvent ) {
652  if ( captureState().isFailure() ) {
653  warning() << "Error capturing state." << endl << "Will try again at next BeginEvent incident" << endmsg;
654  }
655  }
656 }

◆ initialize()

StatusCode HistorySvc::initialize ( )
override

Definition at line 120 of file HistorySvc.cpp.

120  {
121 
122  StatusCode status = Service::initialize();
123  if ( status.isFailure() ) {
124  ON_DEBUG
125  debug() << "Failed to initialize the base class (Service)" << endmsg;
126  return status;
127  }
128 
129  ON_DEBUG
130  debug() << "Initializing HistorySvc" << endmsg;
131 
132  if ( !m_activate ) return StatusCode::SUCCESS;
133 
134  static const bool CREATEIF( true );
135 
136  if ( service( "AlgContextSvc", p_algCtxSvc, CREATEIF ).isFailure() ) {
137  error() << "unable to get the AlgContextSvc" << endmsg;
138  return StatusCode::FAILURE;
139  }
140 
141  if ( service( "IncidentSvc", m_incidentSvc, CREATEIF ).isFailure() ) {
142  error() << "unable to get the IncidentSvc" << endmsg;
143  return StatusCode::FAILURE;
144  }
145 
146  // create a weak dependency on the ToolSvc, so that it doesn't get deleted
147  // before we're done with it in finalize
148  m_toolSvc = serviceLocator()->service( "ToolSvc" );
149  if ( !m_toolSvc ) {
150  error() << "could not retrieve the ToolSvc handle !" << endmsg;
151  return StatusCode::FAILURE;
152  }
153 
154  // add listener to be triggered by first BeginEvent with low priority
155  // so it gets called first
156  const bool rethrow = false;
157  const bool oneShot = true; // make the listener called only once
158  m_incidentSvc->addListener( this, IncidentType::BeginEvent, std::numeric_limits<long>::min(), rethrow, oneShot );
159 
160  m_outputFileTypeXML = ba::iends_with( m_outputFile.value(), ".xml" );
161  ON_DEBUG if ( m_outputFileTypeXML ) { debug() << "output format is XML" << endmsg; }
162 
163  m_isInitialized = true;
164 
165  return StatusCode::SUCCESS;
166 }

◆ listProperties() [1/4]

StatusCode HistorySvc::listProperties ( ) const
override

Definition at line 345 of file HistorySvc.cpp.

345  {
346 
347  auto& log = info();
348 
349  log.setColor( MSG::CYAN );
350  log << "Dumping properties for all Algorithms (" << m_algmap.size() << ")" << endmsg;
351 
352  for ( auto& alg : m_algmap ) { listProperties( *alg.first ).ignore(); }
353 
354  log << MSG::INFO;
355  log.setColor( MSG::CYAN );
356  log << "Dumping properties for all AlgTools (" << m_algtoolmap.size() << ")" << endmsg;
357 
358  for ( auto& algtool : m_algtoolmap ) {
359  ON_DEBUG
360  debug() << " --> " << algtool.second->algtool_name() << endmsg;
361  listProperties( *algtool.first ).ignore();
362  }
363 
364  log << MSG::INFO;
365  log.setColor( MSG::CYAN );
366  log << "Dumping properties for all Services (" << m_svcmap.size() << ")" << endmsg;
367 
368  for ( auto& svc : m_svcmap ) { listProperties( *svc.first ).ignore(); }
369 
370  log << MSG::INFO;
371  log.setColor( MSG::CYAN );
372  log << "Dumping properties for Job";
373  log.resetColor();
374 
375  log << std::endl << *m_jobHistory << endmsg;
376 
377  return StatusCode::SUCCESS;
378 }

◆ listProperties() [2/4]

StatusCode HistorySvc::listProperties ( const Gaudi::Algorithm alg) const
override

Definition at line 304 of file HistorySvc.cpp.

304  {
305 
306  info() << "Dumping properties for " << alg.name() << endl;
307 
309 
310  if ( !hist ) { return StatusCode::FAILURE; }
311 
312  info() << alg.name() << " --> " << endl << *hist << endmsg;
313 
314  return StatusCode::SUCCESS;
315 }

◆ listProperties() [3/4]

StatusCode HistorySvc::listProperties ( const IAlgTool alg) const
override

Definition at line 607 of file HistorySvc.cpp.

607  {
608 
609  info() << "Dumping properties for " << alg.name() << endl;
610 
612 
613  if ( !hist ) return StatusCode::FAILURE;
614 
615  info() << alg.name() << " --> " << endl << *hist << endmsg;
616 
617  return StatusCode::SUCCESS;
618 }

◆ listProperties() [4/4]

StatusCode HistorySvc::listProperties ( const IService svc) const
override

Definition at line 541 of file HistorySvc.cpp.

541  {
542 
543  info() << "Dumping properties for " << svc.name() << endl;
544 
545  ServiceHistory* hist = getServiceHistory( svc );
546 
547  if ( !hist ) return StatusCode::FAILURE;
548 
549  info() << svc.name() << " --> " << endl << *hist << endmsg;
550 
551  return StatusCode::SUCCESS;
552 }

◆ registerAlg()

StatusCode HistorySvc::registerAlg ( const Gaudi::Algorithm alg)
override

Definition at line 280 of file HistorySvc.cpp.

280  {
281 
282  JobHistory* job = getJobHistory();
283  if ( m_algmap.find( &alg ) != m_algmap.end() ) {
284  warning() << "Algorithm " << alg.name() << " already registered with HistorySvc" << endmsg;
285  return StatusCode::SUCCESS;
286  }
287 
288  ( const_cast<Gaudi::Algorithm*>( &alg ) )->addRef();
289 
290  m_algmap[&alg] = new AlgorithmHistory( alg, job );
291 
292  ON_DEBUG {
293  auto& log = debug();
294  log << "Registering algorithm: ";
295  log.setColor( MSG::CYAN );
296  log << alg.name() << endmsg;
297  log.resetColor();
298  }
299 
300  return StatusCode::SUCCESS;
301 }

◆ registerAlgTool()

StatusCode HistorySvc::registerAlgTool ( const IAlgTool ialg)
override

Definition at line 567 of file HistorySvc.cpp.

567  {
568 
569  if ( !m_isInitialized ) {
570  if ( !p_algCtxSvc ) {
571  if ( service( "AlgContextSvc", p_algCtxSvc, true ).isFailure() ) {
572  error() << "unable to get the AlgContextSvc" << endmsg;
573  return StatusCode::FAILURE;
574  }
575  }
576  m_ialgtools.insert( &ialg );
577  return StatusCode::SUCCESS;
578  }
579 
580  const AlgTool* alg = dynamic_cast<const AlgTool*>( &ialg );
581  if ( !alg ) {
582  error() << "Could not dcast IAlgTool \"" << ialg.name() << "\" to an AlgTool" << endmsg;
583  return StatusCode::FAILURE;
584  }
585 
586  if ( m_algtoolmap.find( alg ) != m_algtoolmap.end() ) {
587  warning() << "AlgTool " << ialg.name() << " already registered in HistorySvc" << endmsg;
588  return StatusCode::SUCCESS;
589  }
590 
591  const JobHistory* job = getJobHistory();
592  m_algtoolmap[alg] = new AlgToolHistory( *alg, job );
593 
594  ON_DEBUG {
595  auto& log = debug();
596  log << "Registering algtool: ";
597  log.setColor( MSG::CYAN );
598  log << alg->name() << endmsg;
599  log.resetColor();
600  }
601 
602  return StatusCode::SUCCESS;
603 }

◆ registerDataHistory()

StatusCode HistorySvc::registerDataHistory ( const CLID id,
const std::string key,
const std::string store 
)
virtual

Definition at line 438 of file HistorySvc.cpp.

438  {
439 
440  DHH dhh( id, key );
441 
442  auto boundaries = m_datMap.equal_range( dhh );
443  auto match = boundaries.second;
444 
445  if ( boundaries.first != boundaries.second ) {
446  // there is something in the map, let's look for the specific entry
447 
448  std::string algName;
449  IAlgorithm* ialg = getCurrentIAlg();
450  if ( ialg ) {
451  algName = ialg->name();
452  } else {
453  algName = "UNKNOWN";
454  }
455 
456  match = std::find_if( boundaries.first, boundaries.second,
457  [&algName]( decltype( boundaries )::first_type::reference p ) -> bool {
458  return p.second->algorithmHistory()->algorithm_name() == algName;
459  } );
460  }
461 
462  if ( match == boundaries.second ) { // not found, crete the entry
463  DataHistory* dh = createDataHistoryObj( id, key, storeName );
465  }
466 
467  return StatusCode::SUCCESS;
468 }

◆ registerJob()

StatusCode HistorySvc::registerJob ( )
override

Definition at line 342 of file HistorySvc.cpp.

342 { return StatusCode::SUCCESS; }

◆ registerSvc()

StatusCode HistorySvc::registerSvc ( const IService svc)
override

Definition at line 499 of file HistorySvc.cpp.

499  {
500 
501  if ( svc.name() == "HistoryStore" ) { return StatusCode::SUCCESS; }
502 
503  JobHistory* job = getJobHistory();
504  const IService* psvc = &svc;
505  auto itr = m_svcmap.find( psvc );
506  if ( itr == m_svcmap.end() ) {
507 
508  ON_DEBUG {
509  auto& log = debug();
510  log << "Registering Service: ";
511  log.setColor( MSG::CYAN );
512  log << svc.name() << endmsg;
513  log.resetColor();
514  }
515 
516  m_svcmap[psvc] = new ServiceHistory( &svc, job );
517 
518  ( const_cast<IService*>( psvc ) )->addRef();
519  }
520 
521  return StatusCode::SUCCESS;
522 }

◆ reinitialize()

StatusCode HistorySvc::reinitialize ( )
override

Definition at line 86 of file HistorySvc.cpp.

86  {
87 
88  clearState();
90  return initialize();
91 }

◆ stop()

StatusCode HistorySvc::stop ( )
override

Definition at line 238 of file HistorySvc.cpp.

238  {
239 
240  if ( !m_activate ) return StatusCode::SUCCESS;
241 
242  if ( m_dump ) { listProperties().ignore(); }
243 
244  if ( !m_outputFile.empty() ) {
246  if ( !ofs ) {
247  error() << "Unable to open output file \"m_outputFile\"" << endmsg;
248  } else {
249  // dumpProperties(ofs);
250  dumpState( ofs );
251  }
252  }
253 
254  clearState();
255 
256  return StatusCode::SUCCESS;
257 }

Member Data Documentation

◆ m_activate

Gaudi::Property<bool> HistorySvc::m_activate { this, "Activate", true }
private

Definition at line 95 of file HistorySvc.h.

◆ m_algmap

std::map<const Gaudi::Algorithm*, AlgorithmHistory*> HistorySvc::m_algmap
private

Definition at line 104 of file HistorySvc.h.

◆ m_algtoolmap

std::map<const AlgTool*, AlgToolHistory*> HistorySvc::m_algtoolmap
private

Definition at line 107 of file HistorySvc.h.

◆ m_datMap

std::multimap<DHH, DataHistory*> HistorySvc::m_datMap
private

Definition at line 110 of file HistorySvc.h.

◆ m_dump

Gaudi::Property<bool> HistorySvc::m_dump { this, "Dump", false }
private

Definition at line 94 of file HistorySvc.h.

◆ m_ialgtools

std::set<const IAlgTool*> HistorySvc::m_ialgtools
private

Definition at line 106 of file HistorySvc.h.

◆ m_incidentSvc

IIncidentSvc* HistorySvc::m_incidentSvc = nullptr
private

Definition at line 126 of file HistorySvc.h.

◆ m_isInitialized

bool HistorySvc::m_isInitialized = false
private

Definition at line 100 of file HistorySvc.h.

◆ m_jobHistory

std::unique_ptr<JobHistory> HistorySvc::m_jobHistory
private

Definition at line 112 of file HistorySvc.h.

◆ m_outputFile

Gaudi::Property<std::string> HistorySvc::m_outputFile { this, "OutputFile" }
private

Definition at line 96 of file HistorySvc.h.

◆ m_outputFileTypeXML

bool HistorySvc::m_outputFileTypeXML = false
private

Definition at line 129 of file HistorySvc.h.

◆ m_svcmap

std::map<const IService*, ServiceHistory*> HistorySvc::m_svcmap
private

Definition at line 108 of file HistorySvc.h.

◆ m_toolSvc

SmartIF<IToolSvc> HistorySvc::m_toolSvc
private

Definition at line 127 of file HistorySvc.h.

◆ p_algCtxSvc

IAlgContextSvc* HistorySvc::p_algCtxSvc = nullptr
private

Definition at line 102 of file HistorySvc.h.


The documentation for this class was generated from the following files:
IService
Definition: IService.h:28
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: PropertyBase.h:39
HistorySvc::m_outputFileTypeXML
bool m_outputFileTypeXML
Definition: HistorySvc.h:129
HistorySvc::listProperties
StatusCode listProperties() const override
Definition: HistorySvc.cpp:345
HistorySvc::m_activate
Gaudi::Property< bool > m_activate
Definition: HistorySvc.h:95
HistorySvc::initialize
StatusCode initialize() override
Definition: HistorySvc.cpp:120
ISvcLocator::getServices
virtual const std::list< IService * > & getServices() const =0
Get a reference to a service and create it if it does not exists.
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:118
AlgorithmHistory::properties
const PropertyList & properties() const override
Definition: AlgorithmHistory.h:93
DHH
Definition: HistorySvc.cpp:69
std::string
STL class.
IAlgTool
Definition: IAlgTool.h:33
AlgToolHistory::properties
const PropertyList & properties() const override
Definition: AlgToolHistory.h:76
Gaudi.Configuration.log
log
Definition: Configuration.py:28
HistorySvc::getJobHistory
JobHistory * getJobHistory() const override
Definition: HistorySvc.cpp:399
IAlgContextSvc::currentAlg
virtual IAlgorithm * currentAlg() const =0
accessor to current algorithm:
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:528
Service::m_state
Gaudi::StateMachine::State m_state
Service state
Definition: Service.h:200
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
MSG::INFO
@ INFO
Definition: IMessageSvc.h:25
IIncidentSvc::addListener
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
std::pair
HistorySvc::createDataHistoryObj
DataHistory * createDataHistoryObj(const CLID &id, const std::string &key, const std::string &store) override
Definition: HistorySvc.cpp:411
Gaudi::Details::PropertyBase::documentation
std::string documentation() const
property documentation
Definition: PropertyBase.h:41
gaudirun.s
string s
Definition: gaudirun.py:346
std::map::find
T find(T... args)
std::map::size
T size(T... args)
HistorySvc::registerSvc
StatusCode registerSvc(const IService &) override
Definition: HistorySvc.cpp:499
HistorySvc::m_datMap
std::multimap< DHH, DataHistory * > m_datMap
Definition: HistorySvc.h:110
HistorySvc::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Definition: HistorySvc.h:127
std::unique_ptr::get
T get(T... args)
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
HistorySvc::getCurrentIAlg
IAlgorithm * getCurrentIAlg() const
Definition: HistorySvc.cpp:402
AlgToolHistory
Definition: AlgToolHistory.h:32
HistorySvc::m_algmap
std::map< const Gaudi::Algorithm *, AlgorithmHistory * > m_algmap
Definition: HistorySvc.h:104
HistorySvc::dumpProp
std::string dumpProp(const Gaudi::Details::PropertyBase *, const bool isXML=false, int indent=0) const
Definition: HistorySvc.cpp:660
Histograms.algs
algs
Definition: Histograms.py:26
Containers::map
struct GAUDI_API map
Parametrisation class for map-like implementation.
Definition: KeyedObjectManager.h:35
HistorySvc::getServiceHistory
ServiceHistory * getServiceHistory(const IService &) const override
Definition: HistorySvc.cpp:526
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:222
HistorySvc::m_outputFile
Gaudi::Property< std::string > m_outputFile
Definition: HistorySvc.h:96
ON_VERBOSE
#define ON_VERBOSE
Definition: HistorySvc.cpp:50
HistorySvc::clearState
void clearState()
Definition: HistorySvc.cpp:109
std::set::clear
T clear(T... args)
HistorySvc::m_dump
Gaudi::Property< bool > m_dump
Definition: HistorySvc.h:94
std::list::push_back
T push_back(T... args)
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
IAlgManager
Definition: IAlgManager.h:37
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
HistorySvc::m_isInitialized
bool m_isInitialized
Definition: HistorySvc.h:100
HistorySvc::getAlgHistory
AlgorithmHistory * getAlgHistory(const Gaudi::Algorithm &) const override
Definition: HistorySvc.cpp:328
HistoryObj
Definition: HistoryObj.h:31
bug_34121.tool
tool
Definition: bug_34121.py:18
AlgorithmHistory
Definition: AlgorithmHistory.h:38
Gaudi::Details::PropertyBase::fillStream
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
Definition: Property.cpp:60
StatusCode
Definition: StatusCode.h:65
IVersHistoryObj::name
virtual const std::string & name() const =0
IAlgorithm
Definition: IAlgorithm.h:38
HistorySvc::m_jobHistory
std::unique_ptr< JobHistory > m_jobHistory
Definition: HistorySvc.h:112
std::ofstream
STL class.
ServiceHistory
Definition: ServiceHistory.h:31
Gaudi::StateMachine::OFFLINE
@ OFFLINE
Definition: StateMachine.h:23
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
HistorySvc::m_svcmap
std::map< const IService *, ServiceHistory * > m_svcmap
Definition: HistorySvc.h:108
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:239
HistorySvc::m_incidentSvc
IIncidentSvc * m_incidentSvc
Definition: HistorySvc.h:126
HistoryObj::convert_string
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:30
genconfuser.verbose
verbose
Definition: genconfuser.py:28
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
std::map
STL class.
HistorySvc::dumpState
void dumpState(std::ofstream &) const
Definition: HistorySvc.cpp:677
IVersHistoryObj
Definition: IVersHistoryObj.h:28
GaudiPluginService.cpluginsvc.n
n
Definition: cpluginsvc.py:234
HistorySvc::registerAlgTool
StatusCode registerAlgTool(const IAlgTool &) override
Definition: HistorySvc.cpp:567
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:139
HistorySvc::p_algCtxSvc
IAlgContextSvc * p_algCtxSvc
Definition: HistorySvc.h:102
std::ostringstream
STL class.
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
HistoryObj::dump
virtual std::ostream & dump(std::ostream &, bool isXML=false, int indent=0) const =0
std::multimap::equal_range
T equal_range(T... args)
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
std::endl
T endl(T... args)
AlgTool
Definition: AlgTool.h:62
Gaudi::Details::PropertyBase::toString
virtual std::string toString() const =0
value -> string
ISvcLocator::as
SmartIF< IFace > as()
Definition: ISvcLocator.h:124
HistorySvc::registerAlg
StatusCode registerAlg(const Gaudi::Algorithm &) override
Definition: HistorySvc.cpp:280
std::set::insert
T insert(T... args)
JobHistory::addProperty
void addProperty(const std::string &key, const std::string &value)
Definition: JobHistory.cpp:91
MSG::CYAN
@ CYAN
Definition: IMessageSvc.h:26
JobHistory
Definition: JobHistory.h:33
DataHistory
Definition: DataHistory.h:33
std::count
T count(T... args)
HistorySvc::m_ialgtools
std::set< const IAlgTool * > m_ialgtools
Definition: HistorySvc.h:106
std::ostringstream::str
T str(T... args)
HistorySvc::getAlgToolHistory
AlgToolHistory * getAlgToolHistory(const IAlgTool &) const override
Definition: HistorySvc.cpp:632
HistorySvc::m_algtoolmap
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
Definition: HistorySvc.h:107
std::map::end
T end(T... args)
JobHistory::propertyPairs
const PropertyPairList & propertyPairs() const
Definition: JobHistory.h:82
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
HistorySvc::dumpProperties
void dumpProperties(std::ofstream &) const
Definition: HistorySvc.cpp:381
ServiceHistory::properties
const PropertyList & properties() const override
Definition: ServiceHistory.h:43
ProduceConsume.key
key
Definition: ProduceConsume.py:81
std::numeric_limits
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:88
ON_DEBUG
#define ON_DEBUG
Definition: HistorySvc.cpp:49
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
Definition: Service.cpp:335
HistorySvc::captureState
virtual StatusCode captureState()
Definition: HistorySvc.cpp:169