All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HistorySvc Class Reference

HistorySvc class definition. More...

#include <src/HistorySvc.h>

Inheritance diagram for HistorySvc:
Collaboration diagram for HistorySvc:

Public Member Functions

virtual StatusCode initialize ()
 Initialization (from CONFIGURED to INITIALIZED). More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode finalize ()
 Finalize (from INITIALIZED to CONFIGURED). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode captureState ()
 
virtual StatusCode registerJob ()
 
virtual StatusCode listProperties () const
 
virtual JobHistorygetJobHistory () const
 
virtual StatusCode registerSvc (const IService &)
 
virtual StatusCode listProperties (const IService &) const
 
virtual ServiceHistorygetServiceHistory (const IService &) const
 
virtual void getServiceHistory (std::set< ServiceHistory * > &) const
 
virtual StatusCode registerAlg (const Algorithm &)
 
virtual StatusCode listProperties (const Algorithm &) const
 
virtual AlgorithmHistorygetAlgHistory (const Algorithm &) const
 
virtual void getAlgHistory (std::set< AlgorithmHistory * > &) const
 
virtual StatusCode registerAlgTool (const IAlgTool &)
 
virtual StatusCode listProperties (const IAlgTool &) const
 
virtual AlgToolHistorygetAlgToolHistory (const IAlgTool &) const
 
virtual void getAlgToolHistory (std::set< AlgToolHistory * > &) const
 
virtual DataHistorycreateDataHistoryObj (const CLID &id, const std::string &key, const std::string &store)
 
virtual StatusCode registerDataHistory (const CLID &id, const std::string &key, const std::string &store)
 
virtual DataHistorygetDataHistory (const CLID &id, const std::string &key, const std::string &store) const
 
virtual int getDataHistory (const CLID &id, const std::string &key, const std::string &storeName, std::list< DataHistory * > &dhlist) const
 
 HistorySvc (const std::string &name, ISvcLocator *svc)
 
virtual void handle (const Incident &inc)
 Inform that a new incident has occurred. More...
 
virtual ~HistorySvc ()
 
- Public Member Functions inherited from extends2< Service, IHistorySvc, IIncidentListener >
 extends2 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends2 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends2 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends2 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const Property &p)
 Set the property by property. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Get list of properties. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
StatusCode service (const std::string &name, const T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<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 >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces3< IService, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces2< IHistorySvc, IIncidentListener >
virtual ~extend_interfaces2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IHistorySvc
 DeclareInterfaceID (IHistorySvc, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IIncidentListener
 DeclareInterfaceID (IIncidentListener, 2, 0)
 InterfaceID. 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 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 Property *, const bool isXML=false, int indent=0) const
 
IAlgorithmgetCurrentIAlg () const
 

Private Attributes

bool m_isInitialized
 
bool m_dump
 
bool m_activate
 
IAlgContextSvcp_algCtxSvc
 
std::set< const Algorithm * > m_algs
 
std::map< const Algorithm
*, AlgorithmHistory * > 
m_algmap
 
std::set< const IAlgTool * > m_ialgtools
 
std::set< const AlgTool * > m_algtools
 
std::map< const AlgTool
*, AlgToolHistory * > 
m_algtoolmap
 
std::set< const IService * > m_svcs
 
std::map< const IService
*, ServiceHistory * > 
m_svcmap
 
std::multimap< DHH, DataHistory * > m_datMap
 
JobHistorym_jobHistory
 
std::string m_outputFile
 
IIncidentSvcm_incidentSvc
 
SmartIF< IToolSvcm_toolSvc
 
MsgStream m_log
 
bool m_outputFileTypeXML
 

Additional Inherited Members

- Public Types inherited from extends2< Service, IHistorySvc, IIncidentListener >
typedef extends2 base_class
 Typedef to this class. More...
 
typedef extend_interfaces2
< IHistorySvc,
IIncidentListener
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory2
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IService, IProperty, IStateful >
typedef mpl::fold< typename
IService::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces2< IHistorySvc, IIncidentListener >
typedef mpl::fold< typename
IHistorySvc::iid::iids::type,
typename
IIncidentListener::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Member Functions inherited from Service
virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
- Protected Attributes inherited from Service
IntegerProperty m_outputLevel
 Service output level. More...
 
Gaudi::StateMachine::State m_state
 Service state. More...
 
Gaudi::StateMachine::State m_targetState
 Service state. More...
 
- Protected Attributes inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Detailed Description

HistorySvc class definition.

Definition at line 43 of file HistorySvc.h.

Member Typedef Documentation

typedef std::multimap<DHH,DataHistory*> HistorySvc::DataHistMap
private

Definition at line 98 of file HistorySvc.h.

typedef DataHistMap::const_iterator HistorySvc::DHMCitr
private

Definition at line 100 of file HistorySvc.h.

typedef DataHistMap::iterator HistorySvc::DHMitr
private

Definition at line 99 of file HistorySvc.h.

Definition at line 96 of file HistorySvc.h.

Constructor & Destructor Documentation

HistorySvc::HistorySvc ( const std::string &  name,
ISvcLocator svc 
)

Definition at line 64 of file HistorySvc.cpp.

65  : base_class( name, svc ),
66  m_isInitialized(false),
67  m_dump(false),
68  p_algCtxSvc(0),
69  m_jobHistory(0),
70  m_outputFile(""),
71  m_incidentSvc(0),
72  m_log(msgSvc(), name ),
73  m_outputFileTypeXML(false)
74 
75 {
76  declareProperty("Dump",m_dump);
77  declareProperty("Activate", m_activate=true);
78  declareProperty("OutputFile",m_outputFile);
79 
80  // hack to bring in environ
81  vector<string> envtmp = System::getEnv();
82  envtmp.size(); // prevent icc remark #177: X declared but never referenced
83 }
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:608
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
extends2 base_class
Typedef to this class.
Definition: extends.h:77
std::string m_outputFile
Definition: HistorySvc.h:126
bool m_activate
Definition: HistorySvc.h:106
bool m_isInitialized
Definition: HistorySvc.h:104
bool m_outputFileTypeXML
Definition: HistorySvc.h:145
IAlgContextSvc * p_algCtxSvc
Definition: HistorySvc.h:108
JobHistory * m_jobHistory
Definition: HistorySvc.h:124
MsgStream m_log
Definition: HistorySvc.h:144
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
IIncidentSvc * m_incidentSvc
Definition: HistorySvc.h:141
bool m_dump
Definition: HistorySvc.h:105
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:209
HistorySvc::~HistorySvc ( )
virtual

Definition at line 87 of file HistorySvc.cpp.

87  {
88  delete m_jobHistory;
89 }
JobHistory * m_jobHistory
Definition: HistorySvc.h:124

Member Function Documentation

StatusCode HistorySvc::captureState ( )
virtual

Get all the Algorithms

Get all the AlgTools

Get all the Services

Definition at line 195 of file HistorySvc.cpp.

195  {
196 
197  if (m_jobHistory == 0) {
198  m_jobHistory = new JobHistory;
199  IJobOptionsSvc *jo;
200  if (service("JobOptionsSvc",jo).isFailure()) {
201  m_log << MSG::ERROR
202  << "Could not get jobOptionsSvc - "
203  << "not adding properties to JobHistory" << endmsg;
204  } else {
205 
206  bool foundAppMgr(false);
207 
208  std::vector<std::string> clients = jo->getClients();
209  std::vector<std::string>::const_iterator it;
210  std::vector<const Property*>::const_iterator itr;
211  for (it=clients.begin(); it!=clients.end(); ++it) {
212  if (*it == "ApplicationMgr") {
213  foundAppMgr = true;
214  }
215  const std::vector<const Property*> *props = jo->getProperties(*it);
216  for (itr=props->begin(); itr != props->end(); ++itr) {
217  m_jobHistory->addProperty( *it, *itr );
218  }
219  }
220 
221  if (!foundAppMgr) {
222  IProperty *ap;
223  if (service("ApplicationMgr",ap).isFailure()) {
224  m_log << MSG::ERROR << "could not get the ApplicationMgr" << endmsg;
225  } else {
226  std::vector<Property*>::const_iterator itr2;
227  const std::vector<Property*> props = ap->getProperties();
228  for (itr2=props.begin(); itr2 != props.end(); ++itr2) {
229  m_jobHistory->addProperty( "ApplicationMgr", *itr2 );
230  }
231  }
232  }
233 
234  }
235  }
236 
238 
239  StatusCode sc;
240  IAlgManager* algMgr = 0;
242  pp_cast<void>(&algMgr) );
243  if (sc.isFailure()) {
244  m_log << MSG::ERROR << "Could not get AlgManager" << endmsg;
245  return StatusCode::FAILURE;
246  } else {
247 
248  std::list<IAlgorithm*> algs;
249  algs = algMgr->getAlgorithms();
250  std::list<IAlgorithm*>::const_iterator itr;
251  for (itr=algs.begin(); itr!=algs.end(); ++itr) {
252  Algorithm* alg = dynamic_cast<Algorithm*> (*itr);
253  if (alg == 0) {
254  m_log << MSG::WARNING << "Algorithm " << (*itr)->name()
255  << " does not inherit from Algorithm. Not registering it."
256  << endmsg;
257  } else {
258  registerAlg( *alg ).ignore();
259  }
260  }
261 
262  m_log << MSG::INFO;
263  m_log << "Registered " << algs.size() << " Algorithms" << endmsg;
264 
265  }
266 
268 
269  m_isInitialized = true;
270  std::set<const IAlgTool*>::const_iterator itra;
271  for (itra = m_ialgtools.begin(); itra != m_ialgtools.end(); ++itra) {
272  (const_cast<IAlgTool*>(*itra))->addRef();
273  registerAlgTool(**itra).ignore();
274  }
275 
276  m_log << MSG::INFO << "Registered " << m_algtools.size() << " AlgTools"
277  << endmsg;
278 
280 
281  std::list<IService*> svcs = Gaudi::svcLocator()->getServices();
282 
283  std::list<IService*>::const_iterator itrs;
284  for (itrs=svcs.begin(); itrs!=svcs.end(); ++itrs) {
285  (*itrs)->addRef();
286  registerSvc(**itrs).ignore();
287  }
288 
289  m_log << MSG::INFO;
290  m_log << "Registered " << svcs.size() << " Services" << endmsg;
291 
292  return StatusCode::SUCCESS;
293 
294 
295 }
virtual const std::vector< const Property * > * getProperties(const std::string &client) const =0
Get the properties associated to a given client.
virtual const std::vector< Property * > & getProperties() const =0
Get list of properties.
The IAlgManager is the interface implemented by the Algorithm Factory in the Application Manager to s...
Definition: IAlgManager.h:28
virtual std::vector< std::string > getClients() const =0
Get the list of clients.
JobHistory class definition.
Definition: JobHistory.h:25
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
virtual const std::list< IAlgorithm * > & getAlgorithms() const =0
Return the list of Algorithms.
Main interface for the JobOptions service.
GAUDI_API ISvcLocator * svcLocator()
bool m_isInitialized
Definition: HistorySvc.h:104
virtual StatusCode registerSvc(const IService &)
Definition: HistorySvc.cpp:715
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode registerAlgTool(const IAlgTool &)
Definition: HistorySvc.cpp:826
JobHistory * m_jobHistory
Definition: HistorySvc.h:124
virtual StatusCode registerAlg(const Algorithm &)
Definition: HistorySvc.cpp:353
void addProperty(const std::string &, const Property *)
Definition: JobHistory.cpp:87
MsgStream m_log
Definition: HistorySvc.h:144
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
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:140
virtual const std::list< IService * > & getServices() const =0
Get a reference to a service and create it if it does not exists.
std::set< const IAlgTool * > m_ialgtools
Definition: HistorySvc.h:113
void ignore() const
Definition: StatusCode.h:94
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:22
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
Definition: IInterface.h:171
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
std::set< const AlgTool * > m_algtools
Definition: HistorySvc.h:114
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.
void HistorySvc::clearState ( )
private

Definition at line 105 of file HistorySvc.cpp.

105  {
106  m_algs.clear();
107  std::map<const Algorithm*, AlgorithmHistory*>::iterator algitr;
108  for (algitr = m_algmap.begin(); algitr != m_algmap.end(); ++algitr) {
109  AlgorithmHistory* h = algitr->second;
110  (const_cast<Algorithm*> (algitr->first))->release();
111  delete h;
112  }
113  m_algmap.clear();
114 
115  m_ialgtools.clear();
116  m_algtools.clear();
117  std::map<const AlgTool*, AlgToolHistory*>::iterator atitr;
118  for (atitr=m_algtoolmap.begin(); atitr != m_algtoolmap.end(); ++atitr) {
119  (const_cast<AlgTool*> (atitr->first))->release();
120  delete atitr->second;
121  }
122  m_algtoolmap.clear();
123 
124  m_svcs.clear();
125  std::map<const IService*, ServiceHistory*>::iterator svitr;
126  for (svitr = m_svcmap.begin(); svitr != m_svcmap.end(); ++svitr) {
127  (const_cast<IService*> (svitr->first))->release();
128  delete svitr->second;
129  }
130  m_svcmap.clear();
131 }
AlgorithmHistory class definition.
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
Definition: HistorySvc.h:115
std::set< const Algorithm * > m_algs
Definition: HistorySvc.h:110
General service interface definition.
Definition: IService.h:19
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:34
std::map< const Algorithm *, AlgorithmHistory * > m_algmap
Definition: HistorySvc.h:111
std::set< const IService * > m_svcs
Definition: HistorySvc.h:117
std::set< const IAlgTool * > m_ialgtools
Definition: HistorySvc.h:113
std::map< const IService *, ServiceHistory * > m_svcmap
Definition: HistorySvc.h:118
std::set< const AlgTool * > m_algtools
Definition: HistorySvc.h:114
DataHistory * HistorySvc::createDataHistoryObj ( const CLID id,
const std::string &  key,
const std::string &  store 
)
virtual

Implements IHistorySvc.

Definition at line 593 of file HistorySvc.cpp.

594  {
595 
596  if (!m_activate) return 0;
597 
598 
599  AlgorithmHistory *algHist;
600 
601  IAlgorithm* ialg = getCurrentIAlg();
602  if (ialg == 0) {
603  ON_DEBUG
604  m_log << MSG::DEBUG
605  << "Could not discover current Algorithm:" << endl
606  << " object CLID: " << id << " key: \"" << key
607  << "\"" << endmsg;
608  algHist = 0;
609  } else {
610  Algorithm* alg = dynamic_cast<Algorithm*>(ialg);
611  if (alg != 0) {
612  algHist = getAlgHistory( *alg );
613  } else {
615  << "Could not extract concrete Algorithm:"
616  << endl
617  << " object CLID: " << id << " key: \"" << key
618  << "\"" << endmsg;
619  algHist = 0;
620  }
621  }
622 
623  DataHistory *hist = new DataHistory(id, key, algHist);
624 
625  return hist;
626 
627 }
AlgorithmHistory class definition.
IAlgorithm * getCurrentIAlg() const
Definition: HistorySvc.cpp:578
bool m_activate
Definition: HistorySvc.h:106
#define ON_DEBUG
Definition: HistorySvc.cpp:35
DataHistory class definition.
Definition: DataHistory.h:25
virtual AlgorithmHistory * getAlgHistory(const Algorithm &) const
Definition: HistorySvc.cpp:422
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:20
MsgStream m_log
Definition: HistorySvc.h:144
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
std::string HistorySvc::dumpProp ( const Property prop,
const bool  isXML = false,
int  indent = 0 
) const
private

Definition at line 964 of file HistorySvc.cpp.

964  {
965  std::ostringstream ost;
966  if (isXML) {
967  while (ind > 0) {
968  ost << " ";
969  ind --;
970  }
971  ost << "<PROPERTY name=\"" << prop->name()
972  << "\" value=\"" << HistoryObj::convert_string(prop->toString())
973  << "\" documentation=\"" << HistoryObj::convert_string(prop->documentation())
974  << "\">";
975  } else {
976  prop->fillStream(ost);
977  }
978  return ost.str();
979 }
virtual std::string toString() const =0
value -> string
const std::string & name() const
property name
Definition: Property.h:47
const std::string & documentation() const
property documentation
Definition: Property.h:49
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
Definition: Property.cpp:182
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:29
void HistorySvc::dumpProperties ( std::ofstream &  ofs) const
private

Definition at line 526 of file HistorySvc.cpp.

526  {
527 
528 
529  ofs << "GLOBAL" << std::endl;
531  JobHistory::PropertyPairList::const_iterator itrj;
532  for (itrj=props.begin(); itrj != props.end(); ++itrj) {
533  std::string client = itrj->first;
534  const Property* prp = itrj->second;
535  ofs << client << " " << dumpProp(prp) << std::endl;
536  }
537 
538  ofs << std::endl << "SERVICES" << std::endl;
539  std::map<const IService*, ServiceHistory*>::const_iterator itr_s;
540  for (itr_s=m_svcmap.begin(); itr_s != m_svcmap.end(); ++itr_s) {
541  const IService* svc = itr_s->first;
542 
543  dumpProperties( *svc, ofs );
544 
545  }
546 
547  ofs << std::endl << "ALGORITHMS" << std::endl;
548  std::map<const Algorithm*, AlgorithmHistory*>::const_iterator itr;
549  for (itr=m_algmap.begin(); itr != m_algmap.end(); ++itr) {
550  const Algorithm* alg = itr->first;
551 
552  dumpProperties( *alg, ofs );
553 
554  }
555 
556  ofs << std::endl << "ALGTOOLS" << std::endl;
557  std::map<const AlgTool*, AlgToolHistory*>::const_iterator itr_a;
558  for (itr_a=m_algtoolmap.begin(); itr_a != m_algtoolmap.end(); ++itr_a) {
559  const AlgTool* alg = itr_a->first;
560 
561  dumpProperties( *alg, ofs );
562 
563  }
564 
565 
566 }
std::vector< std::pair< std::string, const Property * > > PropertyPairList
Definition: JobHistory.h:29
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
Definition: HistorySvc.h:115
General service interface definition.
Definition: IService.h:19
JobHistory * m_jobHistory
Definition: HistorySvc.h:124
const PropertyPairList & propertyPairs() const
Definition: JobHistory.h:80
std::string dumpProp(const Property *, const bool isXML=false, int indent=0) const
Definition: HistorySvc.cpp:964
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
void dumpProperties(std::ofstream &) const
Definition: HistorySvc.cpp:526
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:34
std::map< const Algorithm *, AlgorithmHistory * > m_algmap
Definition: HistorySvc.h:111
std::map< const IService *, ServiceHistory * > m_svcmap
Definition: HistorySvc.h:118
void HistorySvc::dumpProperties ( const IService svc,
std::ofstream &  ofs 
) const
private

Definition at line 808 of file HistorySvc.cpp.

808  {
809 
810  ServiceHistory *hist = getServiceHistory( svc );
811 
812  if (hist == 0) {
813  return;
814  }
815 
816  PropertyList::const_iterator itr;
817  for (itr=hist->properties().begin(); itr != hist->properties().end();++itr) {
818  ofs << svc.name() << " " << dumpProp(*itr) << std::endl;
819  }
820 
821 }
virtual ServiceHistory * getServiceHistory(const IService &) const
Definition: HistorySvc.cpp:751
virtual const std::string & name() const =0
Retrieve the name of the instance.
std::string dumpProp(const Property *, const bool isXML=false, int indent=0) const
Definition: HistorySvc.cpp:964
const PropertyList & properties() const
ServiceHistory class definition.
void HistorySvc::dumpProperties ( const Algorithm alg,
std::ofstream &  ofs 
) const
private

Definition at line 405 of file HistorySvc.cpp.

405  {
406 
407  AlgorithmHistory *hist = getAlgHistory( alg );
408 
409  if (hist == 0) {
410  return;
411  }
412 
413  PropertyList::const_iterator itr;
414  for (itr=hist->properties().begin(); itr!=hist->properties().end(); ++itr) {
415  ofs << alg.name() << " " << dumpProp(*itr) << std::endl;
416  }
417 
418 }
AlgorithmHistory class definition.
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
virtual AlgorithmHistory * getAlgHistory(const Algorithm &) const
Definition: HistorySvc.cpp:422
std::string dumpProp(const Property *, const bool isXML=false, int indent=0) const
Definition: HistorySvc.cpp:964
const PropertyList & properties() const
void HistorySvc::dumpProperties ( const IAlgTool alg,
std::ofstream &  ofs 
) const
private

Definition at line 897 of file HistorySvc.cpp.

897  {
898 
899  AlgToolHistory *hist = getAlgToolHistory( alg );
900 
901  if (hist == 0) {
902  return;
903  }
904 
905  PropertyList::const_iterator itr;
906  for (itr=hist->properties().begin(); itr!=hist->properties().end(); ++itr) {
907  ofs << alg.name() << " " << dumpProp(*itr) << std::endl;
908  }
909 
910 }
virtual const std::string & name() const =0
Retrieve the name of the instance.
virtual AlgToolHistory * getAlgToolHistory(const IAlgTool &) const
Definition: HistorySvc.cpp:915
const PropertyList & properties() const
std::string dumpProp(const Property *, const bool isXML=false, int indent=0) const
Definition: HistorySvc.cpp:964
AlgToolHistory class definition.
void HistorySvc::dumpState ( std::ofstream &  ofs) const
private

Definition at line 984 of file HistorySvc.cpp.

984  {
985 
986 
987  if(m_outputFileTypeXML) {
988  //xml header
989  ofs << "<?xml version=\"1.0\" ?> " << std::endl;
990  ofs << "<!--Test-xml-->" << std::endl;
991  ofs << "<SETUP>" << std::endl;
992  ofs << " <GLOBAL>" << std::endl;
993  } else {
994  ofs << "GLOBAL" << std::endl;
995  }
996 
998  JobHistory::PropertyPairList::const_iterator itrj;
999  std::string client_currently_open = "start";
1000  for (itrj=props.begin(); itrj != props.end(); ++itrj) {
1001  // client is the name of the component of the current property
1002  std::string client = itrj->first;
1003  const Property* prp = itrj->second;
1004 
1005  if (m_outputFileTypeXML) {
1006 
1007  if (client != client_currently_open) {
1008  if(client_currently_open!="start") ofs << " </COMPONENT>" << endl;
1009  ofs << " <COMPONENT name=\""
1010  << client << "\" class=\"undefined\">" << std::endl;
1011  }
1012  } else {
1013  ofs << client << " ";
1014  }
1015 
1016  ofs << dumpProp(prp,m_outputFileTypeXML,6) << endl;
1017 
1018  client_currently_open = client;
1019 
1020  if (m_outputFileTypeXML)
1021  ofs << " </COMPONENT>" << endl;
1022  }
1023 
1024 
1025  if(m_outputFileTypeXML) {
1026  ofs << "</GLOBAL>" << endl << "<SERVICES>" << endl;
1027  } else {
1028  ofs << "SERVICES" << std::endl;
1029  }
1030 
1031  std::map<const IService*, ServiceHistory*>::const_iterator itr_s;
1032  for (itr_s=m_svcmap.begin(); itr_s != m_svcmap.end(); ++itr_s) {
1033  const IService* svc = itr_s->first;
1034 
1035  dumpState(svc,ofs);
1036 
1037  }
1038 
1039  if(m_outputFileTypeXML) {
1040  ofs << "</SERVICES>" << endl << "<ALGORITHMS> " << endl;
1041  } else {
1042  ofs << "ALGORITHMS" << std::endl;
1043  }
1044 
1045  std::map<const Algorithm*, AlgorithmHistory*>::const_iterator itr;
1046  for (itr=m_algmap.begin(); itr != m_algmap.end(); ++itr) {
1047  const Algorithm* alg = itr->first;
1048 
1049  dumpState(alg,ofs);
1050 
1051  }
1052 
1053 
1054  if(m_outputFileTypeXML) {
1055  ofs << "</ALGORITHMS>" << endl << "<ALGTOOLS> " << endl;
1056  } else {
1057  ofs << "ALGTOOLS" << std::endl;
1058  }
1059 
1060  std::map<const AlgTool*, AlgToolHistory*>::const_iterator itr_a;
1061  for (itr_a=m_algtoolmap.begin(); itr_a != m_algtoolmap.end(); ++itr_a) {
1062  const AlgTool* alg = itr_a->first;
1063 
1064  dumpState( alg, ofs);
1065 
1066  }
1067 
1068  if(m_outputFileTypeXML) {
1069  ofs << "</ALGTOOLS>" << endl << "</SETUP>" << endl;
1070  }
1071 
1072 }
std::vector< std::pair< std::string, const Property * > > PropertyPairList
Definition: JobHistory.h:29
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
Definition: HistorySvc.h:115
General service interface definition.
Definition: IService.h:19
bool m_outputFileTypeXML
Definition: HistorySvc.h:145
JobHistory * m_jobHistory
Definition: HistorySvc.h:124
const PropertyPairList & propertyPairs() const
Definition: JobHistory.h:80
std::string dumpProp(const Property *, const bool isXML=false, int indent=0) const
Definition: HistorySvc.cpp:964
void dumpState(std::ofstream &) const
Definition: HistorySvc.cpp:984
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:34
std::map< const Algorithm *, AlgorithmHistory * > m_algmap
Definition: HistorySvc.h:111
std::map< const IService *, ServiceHistory * > m_svcmap
Definition: HistorySvc.h:118
void HistorySvc::dumpState ( const INamedInterface in,
std::ofstream &  ofs 
) const
private

Definition at line 1077 of file HistorySvc.cpp.

1077  {
1078 
1079  HistoryObj *hist(0);
1080  IVersHistoryObj *vhist(0);
1081 
1082  const IService* is(0);
1083  const Algorithm* ia(0);
1084  const IAlgTool* it(0);
1085  if ( (is=dynamic_cast<const IService*>(in)) != 0) {
1086  ON_VERBOSE
1087  m_log << MSG::VERBOSE << in->name() << " is Service" << endmsg;
1088  ServiceHistory* o = getServiceHistory( *is );
1089  hist = dynamic_cast<HistoryObj*>( o );
1090  vhist = dynamic_cast<IVersHistoryObj*>( o );
1091  } else if ( (ia = dynamic_cast<const Algorithm*>(in)) != 0 ) {
1092  ON_VERBOSE
1093  m_log << MSG::VERBOSE << in->name() << " is Alg" << endmsg;
1094  AlgorithmHistory *o = getAlgHistory( *ia );
1095  hist = dynamic_cast<HistoryObj*>( o );
1096  vhist = dynamic_cast<IVersHistoryObj*>( o );
1097  } else if ( (it = dynamic_cast<const IAlgTool*>(in)) != 0 ) {
1098  ON_VERBOSE
1099  m_log << MSG::VERBOSE << in->name() << " is AlgTool" << endmsg;
1100  AlgToolHistory *o = getAlgToolHistory( *it );
1101  hist = dynamic_cast<HistoryObj*>( o );
1102  vhist = dynamic_cast<IVersHistoryObj*>( o );
1103  } else {
1104  m_log << MSG::ERROR
1105  << "Could not dcast interface to accepted History Obj type for "
1106  << in->name() << endreq;
1107  return;
1108  }
1109 
1110  if (hist == 0 || vhist == 0) {
1111  m_log << MSG::ERROR << "Could not dcast recognized object to HistoryObj or IVersHistoryObj. This should never happen."
1112  << endmsg;
1113  return;
1114  }
1115 
1116  if (m_outputFileTypeXML) {
1117  hist->dump(ofs,true);
1118  } else {
1119  ofs << ">> " << vhist->name() << endl << *hist << endl;
1120  }
1121 
1122 }
virtual ServiceHistory * getServiceHistory(const IService &) const
Definition: HistorySvc.cpp:751
AlgorithmHistory class definition.
Base class for History Objects.
Definition: HistoryObj.h:24
virtual const std::string & name() const =0
Retrieve the name of the instance.
virtual AlgToolHistory * getAlgToolHistory(const IAlgTool &) const
Definition: HistorySvc.cpp:915
General service interface definition.
Definition: IService.h:19
bool m_outputFileTypeXML
Definition: HistorySvc.h:145
virtual AlgorithmHistory * getAlgHistory(const Algorithm &) const
Definition: HistorySvc.cpp:422
MsgStream m_log
Definition: HistorySvc.h:144
AlgToolHistory class definition.
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
ServiceHistory class definition.
#define ON_VERBOSE
Definition: HistorySvc.cpp:36
Interface for Versioned History Objects.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode HistorySvc::finalize ( )
virtual

Finalize (from INITIALIZED to CONFIGURED).

Reimplemented from Service.

Definition at line 330 of file HistorySvc.cpp.

330  {
331 
332  ON_VERBOSE
333  m_log << MSG::VERBOSE << "HistorySvc::finalize()" << endmsg;
334 
335 
336  clearState();
337 
338  StatusCode status = Service::finalize();
339 
340  if ( status.isSuccess() )
341  m_log << MSG::INFO << "Service finalised successfully" << endmsg;
342 
343  return status;
344 
345 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
MsgStream m_log
Definition: HistorySvc.h:144
#define ON_VERBOSE
Definition: HistorySvc.cpp:36
void clearState()
Definition: HistorySvc.cpp:105
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: Service.cpp:199
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
AlgorithmHistory * HistorySvc::getAlgHistory ( const Algorithm alg) const
virtual

Implements IHistorySvc.

Definition at line 422 of file HistorySvc.cpp.

422  {
423 
424  const Algorithm *palg = &alg;
425  set<const Algorithm*>::const_iterator itr = m_algs.find(palg);
426  if ( itr == m_algs.end() ) {
427  m_log << MSG::WARNING << "Algorithm " << alg.name() << " not registered"
428  << endmsg;
429  return 0;
430  }
431 
432  map<const Algorithm*, AlgorithmHistory*>::const_iterator itr2;
433  itr2 = m_algmap.find( *itr );
434 
435  return ( itr2->second );
436 
437 }
std::set< const Algorithm * > m_algs
Definition: HistorySvc.h:110
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
MsgStream m_log
Definition: HistorySvc.h:144
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
std::map< const Algorithm *, AlgorithmHistory * > m_algmap
Definition: HistorySvc.h:111
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
void HistorySvc::getAlgHistory ( std::set< AlgorithmHistory * > &  algs) const
virtual

Implements IHistorySvc.

Definition at line 441 of file HistorySvc.cpp.

441  {
442 
443  set<const Algorithm*>::const_iterator itr;
444  for (itr=m_algs.begin(); itr!=m_algs.end(); ++itr) {
445  AlgorithmHistory *ah = m_algmap.find(*itr)->second;
446 
447  algs.insert(ah);
448  }
449 
450 }
AlgorithmHistory class definition.
std::set< const Algorithm * > m_algs
Definition: HistorySvc.h:110
std::map< const Algorithm *, AlgorithmHistory * > m_algmap
Definition: HistorySvc.h:111
AlgToolHistory * HistorySvc::getAlgToolHistory ( const IAlgTool alg) const
virtual

Implements IHistorySvc.

Definition at line 915 of file HistorySvc.cpp.

915  {
916 
917  const AlgTool *palg = dynamic_cast<const AlgTool*>(&alg);
918  set<const AlgTool*>::const_iterator itr = m_algtools.find(palg);
919  if ( itr == m_algtools.end() ) {
920  m_log << MSG::WARNING << "AlgTool " << alg.name() << " not registered"
921  << endmsg;
922  return 0;
923  }
924 
925  map<const AlgTool*, AlgToolHistory*>::const_iterator itr2;
926  itr2 = m_algtoolmap.find( *itr );
927 
928  return ( itr2->second );
929 
930 }
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
Definition: HistorySvc.h:115
virtual const std::string & name() const =0
Retrieve the name of the instance.
MsgStream m_log
Definition: HistorySvc.h:144
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:34
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
std::set< const AlgTool * > m_algtools
Definition: HistorySvc.h:114
void HistorySvc::getAlgToolHistory ( std::set< AlgToolHistory * > &  algs) const
virtual

Implements IHistorySvc.

Definition at line 935 of file HistorySvc.cpp.

935  {
936 
937  set<const AlgTool*>::const_iterator itr;
938  for (itr=m_algtools.begin(); itr!=m_algtools.end(); ++itr) {
939  AlgToolHistory *ah = m_algtoolmap.find(*itr)->second;
940 
941  algs.insert(ah);
942  }
943 
944 }
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
Definition: HistorySvc.h:115
AlgToolHistory class definition.
std::set< const AlgTool * > m_algtools
Definition: HistorySvc.h:114
IAlgorithm * HistorySvc::getCurrentIAlg ( ) const
private

Definition at line 578 of file HistorySvc.cpp.

578  {
579  if (p_algCtxSvc == 0) {
580  m_log << MSG::WARNING << "trying to create DataHistoryObj before "
581  << "HistorySvc has been initialized" << endmsg;
582  return 0;
583 
584  } else {
585  return p_algCtxSvc->currentAlg();
586  }
587 }
IAlgContextSvc * p_algCtxSvc
Definition: HistorySvc.h:108
MsgStream m_log
Definition: HistorySvc.h:144
virtual IAlgorithm * currentAlg() const =0
accessor to current algorithm:
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
DataHistory * HistorySvc::getDataHistory ( const CLID id,
const std::string &  key,
const std::string &  store 
) const
virtual

Implements IHistorySvc.

Definition at line 675 of file HistorySvc.cpp.

676  {
677 
678  DHH dhh(id,key);
679 
680  pair<DHMCitr,DHMCitr> mitr = m_datMap.equal_range(dhh);
681 
682  if(mitr.first == mitr.second) {
683  return 0;
684  }
685 
686  return mitr.first->second;
687 
688 }
std::multimap< DHH, DataHistory * > m_datMap
Definition: HistorySvc.h:120
int HistorySvc::getDataHistory ( const CLID id,
const std::string &  key,
const std::string &  storeName,
std::list< DataHistory * > &  dhlist 
) const
virtual

Definition at line 693 of file HistorySvc.cpp.

695  {
696 
697  DHH dhh(id,key);
698 
699  int n(0);
700 
701  pair<DHMCitr,DHMCitr> mitr = m_datMap.equal_range(dhh);
702 
703  for (DHMCitr itr=mitr.first; itr != mitr.second; ++itr) {
704  dhlist.push_back(itr->second);
705  n++;
706  }
707 
708  return n;
709 
710 }
std::multimap< DHH, DataHistory * > m_datMap
Definition: HistorySvc.h:120
DataHistMap::const_iterator DHMCitr
Definition: HistorySvc.h:100
JobHistory * HistorySvc::getJobHistory ( ) const
virtual

Implements IHistorySvc.

Definition at line 570 of file HistorySvc.cpp.

570  {
571 
572  return m_jobHistory;
573 
574 }
JobHistory * m_jobHistory
Definition: HistorySvc.h:124
ServiceHistory * HistorySvc::getServiceHistory ( const IService svc) const
virtual

Implements IHistorySvc.

Definition at line 751 of file HistorySvc.cpp.

751  {
752 
753  const IService *psvc = &svc;
754  map<const IService*, ServiceHistory*>::const_iterator itr =
755  m_svcmap.find(psvc);
756  if ( itr == m_svcmap.end() ) {
757  m_log << MSG::WARNING << "Service " << svc.name() << " not registered"
758  << endmsg;
759  return 0;
760  }
761 
762  return ( itr->second );
763 
764 }
virtual const std::string & name() const =0
Retrieve the name of the instance.
General service interface definition.
Definition: IService.h:19
MsgStream m_log
Definition: HistorySvc.h:144
std::map< const IService *, ServiceHistory * > m_svcmap
Definition: HistorySvc.h:118
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
void HistorySvc::getServiceHistory ( std::set< ServiceHistory * > &  svcs) const
virtual

Implements IHistorySvc.

Definition at line 768 of file HistorySvc.cpp.

768  {
769 
770  set<const IService*>::const_iterator itr;
771  for (itr=m_svcs.begin(); itr!=m_svcs.end(); ++itr) {
772  ServiceHistory *sh = m_svcmap.find( *itr )->second;
773 
774  svcs.insert(sh);
775  }
776 
777 }
ServiceHistory class definition.
std::set< const IService * > m_svcs
Definition: HistorySvc.h:117
std::map< const IService *, ServiceHistory * > m_svcmap
Definition: HistorySvc.h:118
void HistorySvc::handle ( const Incident )
virtual

Inform that a new incident has occurred.

Implements IIncidentListener.

Definition at line 949 of file HistorySvc.cpp.

949  {
950 
951  if (incident.type() == IncidentType::BeginEvent) {
952  if (captureState().isFailure()) {
953  m_log << MSG::WARNING << "Error capturing state." << endl
954  << "Will try again at next BeginEvent incident" << endmsg;
955  }
956  }
957 
958 }
const std::string BeginEvent
Processing of a new event has started.
Definition: Incident.h:60
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
MsgStream m_log
Definition: HistorySvc.h:144
virtual StatusCode captureState()
Definition: HistorySvc.cpp:195
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode HistorySvc::initialize ( )
virtual

Initialization (from CONFIGURED to INITIALIZED).

Reimplemented from Service.

Definition at line 136 of file HistorySvc.cpp.

136  {
137 
138  StatusCode status = Service::initialize();
140 
141  if (status.isFailure()) {
142 
143  ON_DEBUG
144  m_log << MSG::DEBUG << "Failed to initialize the base class (Service)"
145  << endmsg;
146  return status;
147  }
148 
149  ON_DEBUG
150  m_log << MSG::DEBUG << "Initializing HistorySvc" << endmsg;
151 
152  if (!m_activate) return StatusCode::SUCCESS;
153 
154  static const bool CREATEIF(true);
155 
156  if ( service("AlgContextSvc",p_algCtxSvc,CREATEIF).isFailure() ) {
157  m_log << MSG::ERROR << "unable to get the AlgContextSvc" << endmsg;
158  return StatusCode::FAILURE;
159  }
160 
161  if (service("IncidentSvc", m_incidentSvc, CREATEIF).isFailure()) {
162  m_log << MSG::ERROR << "unable to get the IncidentSvc" << endmsg;
163  return StatusCode::FAILURE;
164  }
165 
166  // create a weak dependency on the ToolSvc, so that it doesn't get deleted
167  // before we're done with it in finalize
168  m_toolSvc = serviceLocator()->service("ToolSvc");
169  if (! m_toolSvc) {
170  m_log << MSG::ERROR << "could not retrieve the ToolSvc handle !"
171  << endmsg;
172  return StatusCode::FAILURE;
173  }
174 
175  // add listener to be triggered by first BeginEvent with low priority
176  // so it gets called first
177  const bool rethrow = false;
178  const bool oneShot = true; // make the listener called only once
180  std::numeric_limits<long>::min(),rethrow,oneShot);
181 
182  if (m_outputFile.find(".XML") != string::npos || m_outputFile.find(".xml") != string::npos) {
183  ON_DEBUG
184  m_log << MSG::DEBUG << "output format is XML" << endmsg;
185  m_outputFileTypeXML = true;
186  }
187 
188  m_isInitialized = true;
189 
190  return StatusCode::SUCCESS;
191 
192 }
const std::string BeginEvent
Processing of a new event has started.
Definition: Incident.h:60
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:241
SmartIF< IToolSvc > m_toolSvc
Definition: HistorySvc.h:142
std::string m_outputFile
Definition: HistorySvc.h:126
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
bool m_activate
Definition: HistorySvc.h:106
bool m_isInitialized
Definition: HistorySvc.h:104
#define ON_DEBUG
Definition: HistorySvc.cpp:35
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
bool m_outputFileTypeXML
Definition: HistorySvc.h:145
IAlgContextSvc * p_algCtxSvc
Definition: HistorySvc.h:108
MsgStream m_log
Definition: HistorySvc.h:144
const TYPE & value() const
explicit conversion
Definition: Property.h:355
#define min(a, b)
IIncidentSvc * m_incidentSvc
Definition: HistorySvc.h:141
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: Service.cpp:74
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
void setLevel(int level)
Update outputlevel.
Definition: MsgStream.h:105
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:140
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:336
StatusCode HistorySvc::listProperties ( ) const
virtual

Implements IHistorySvc.

Definition at line 466 of file HistorySvc.cpp.

466  {
467 
468  m_log << MSG::INFO;
470  m_log << "Dumping properties for all Algorithms (" << m_algmap.size()
471  << ")" << endmsg;
472 
473  std::map<const Algorithm*, AlgorithmHistory*>::const_iterator itr;
474  for (itr=m_algmap.begin(); itr != m_algmap.end(); ++itr) {
475  const Algorithm* alg = itr->first;
476 
477  listProperties( *alg ).ignore();
478 
479  }
480 
481  m_log << MSG::INFO;
483  m_log << "Dumping properties for all AlgTools (" << m_algtoolmap.size()
484  << ")" << endmsg;
485 
486  std::map<const AlgTool*, AlgToolHistory*>::const_iterator itr_a;
487  for (itr_a=m_algtoolmap.begin(); itr_a != m_algtoolmap.end(); ++itr_a) {
488  ON_DEBUG
489  m_log << MSG::DEBUG << " --> " << itr_a->second->algtool_name() << endmsg;
490  const AlgTool* alg = itr_a->first;
491 
492  listProperties( *alg ).ignore();
493 
494  }
495 
496  m_log << MSG::INFO;
498  m_log << "Dumping properties for all Services (" << m_svcmap.size()
499  << ")" << endmsg;
500 
501  std::map<const IService*, ServiceHistory*>::const_iterator itr_s;
502  for (itr_s=m_svcmap.begin(); itr_s != m_svcmap.end(); ++itr_s) {
503  const IService* svc = itr_s->first;
504 
505  listProperties( *svc ).ignore();
506 
507  }
508 
509  m_log << MSG::INFO;
511  m_log << "Dumping properties for Job";
512  m_log.resetColor();
513 
514  ostringstream ost;
515  ost << *m_jobHistory;
516  std::string str = ost.str();
517 
518  m_log << std::endl << str << endmsg;
519 
520  return StatusCode(StatusCode::SUCCESS,true);
521 
522 }
GAUDI_API void resetColor()
Reset the colors to defaults.
Definition: MsgStream.cpp:117
virtual StatusCode listProperties() const
Definition: HistorySvc.cpp:466
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
Definition: HistorySvc.h:115
GAUDI_API void setColor(MSG::Color col)
Set the text color.
Definition: MsgStream.cpp:90
General service interface definition.
Definition: IService.h:19
#define ON_DEBUG
Definition: HistorySvc.cpp:35
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
JobHistory * m_jobHistory
Definition: HistorySvc.h:124
MsgStream m_log
Definition: HistorySvc.h:144
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:34
std::map< const Algorithm *, AlgorithmHistory * > m_algmap
Definition: HistorySvc.h:111
void ignore() const
Definition: StatusCode.h:94
std::map< const IService *, ServiceHistory * > m_svcmap
Definition: HistorySvc.h:118
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode HistorySvc::listProperties ( const IService svc) const
virtual

Implements IHistorySvc.

Definition at line 782 of file HistorySvc.cpp.

782  {
783 
784  m_log << MSG::INFO << "Dumping properties for " << svc.name() << endl;
785 
786  ServiceHistory *hist = getServiceHistory( svc );
787 
788  if (hist == 0) {
789  return StatusCode::FAILURE;
790  }
791 
792  ostringstream ost;
793  ost << *hist;
794 
795  std::string str = ost.str();
796 
797  m_log << MSG::INFO << svc.name() << " --> " << endl << str << endmsg;
798 
799 
800 
801  return StatusCode(StatusCode::SUCCESS,true);
802 
803 }
virtual ServiceHistory * getServiceHistory(const IService &) const
Definition: HistorySvc.cpp:751
virtual const std::string & name() const =0
Retrieve the name of the instance.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
MsgStream m_log
Definition: HistorySvc.h:144
ServiceHistory class definition.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode HistorySvc::listProperties ( const Algorithm alg) const
virtual

Implements IHistorySvc.

Definition at line 382 of file HistorySvc.cpp.

382  {
383 
384  m_log << MSG::INFO << "Dumping properties for " << alg.name() << endl;
385 
386  AlgorithmHistory *hist = getAlgHistory( alg );
387 
388  if (hist == 0) {
389  return StatusCode::FAILURE;
390  }
391 
392  ostringstream ost;
393  ost << *hist;
394 
395  std::string str = ost.str();
396 
397  m_log << MSG::INFO << alg.name() << " --> " << endl << str << endmsg;
398 
399  return StatusCode(StatusCode::SUCCESS,true);
400 
401 }
AlgorithmHistory class definition.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
virtual AlgorithmHistory * getAlgHistory(const Algorithm &) const
Definition: HistorySvc.cpp:422
MsgStream m_log
Definition: HistorySvc.h:144
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode HistorySvc::listProperties ( const IAlgTool alg) const
virtual

Implements IHistorySvc.

Definition at line 874 of file HistorySvc.cpp.

874  {
875 
876  m_log << MSG::INFO << "Dumping properties for " << alg.name() << endl;
877 
878  AlgToolHistory *hist = getAlgToolHistory( alg );
879 
880  if (hist == 0) {
881  return StatusCode::FAILURE;
882  }
883 
884  ostringstream ost;
885  ost << *hist;
886 
887  std::string str = ost.str();
888 
889  m_log << MSG::INFO << alg.name() << " --> " << endl << str << endmsg;
890 
891  return StatusCode::SUCCESS;
892 
893 }
virtual const std::string & name() const =0
Retrieve the name of the instance.
virtual AlgToolHistory * getAlgToolHistory(const IAlgTool &) const
Definition: HistorySvc.cpp:915
MsgStream m_log
Definition: HistorySvc.h:144
AlgToolHistory class definition.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode HistorySvc::registerAlg ( const Algorithm alg)
virtual

Implements IHistorySvc.

Definition at line 353 of file HistorySvc.cpp.

353  {
354 
355  JobHistory *job = getJobHistory();
356  if (m_algmap.find(&alg) != m_algmap.end()) {
357  m_log << MSG::WARNING << "Algorithm " << alg.name()
358  << " already registered with HistorySvc" << endmsg;
359  return StatusCode::SUCCESS;
360  }
361 
362  (const_cast<Algorithm*>(&alg))->addRef();
363 
364  m_algs.insert(&alg);
365 
366  AlgorithmHistory *algHist = new AlgorithmHistory(alg, job);
367  m_algmap[&alg] = algHist;
368 
369  ON_DEBUG {
370  m_log << MSG::DEBUG << "Registering algorithm: ";
372  m_log << alg.name() << endmsg;
373  m_log.resetColor();
374  }
375 
376  return StatusCode(StatusCode::SUCCESS,true);
377 
378 }
GAUDI_API void resetColor()
Reset the colors to defaults.
Definition: MsgStream.cpp:117
AlgorithmHistory class definition.
JobHistory class definition.
Definition: JobHistory.h:25
GAUDI_API void setColor(MSG::Color col)
Set the text color.
Definition: MsgStream.cpp:90
std::set< const Algorithm * > m_algs
Definition: HistorySvc.h:110
#define ON_DEBUG
Definition: HistorySvc.cpp:35
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
MsgStream m_log
Definition: HistorySvc.h:144
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
std::map< const Algorithm *, AlgorithmHistory * > m_algmap
Definition: HistorySvc.h:111
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
virtual JobHistory * getJobHistory() const
Definition: HistorySvc.cpp:570
StatusCode HistorySvc::registerAlgTool ( const IAlgTool ialg)
virtual

Implements IHistorySvc.

Definition at line 826 of file HistorySvc.cpp.

826  {
827 
828  if (! m_isInitialized) {
829  if (p_algCtxSvc == 0) {
830  if ( service("AlgContextSvc",p_algCtxSvc,true).isFailure() ) {
831  m_log << MSG::ERROR << "unable to get the AlgContextSvc" << endmsg;
832  return StatusCode::FAILURE;
833  }
834  }
835 
836  m_ialgtools.insert(&ialg);
837  return StatusCode::SUCCESS;
838  }
839 
840  const AlgTool *alg = dynamic_cast<const AlgTool*>( &ialg );
841  if ( alg == 0 ) {
842  m_log << MSG::ERROR << "Could not dcast IAlgTool \"" << ialg.name()
843  << "\" to an AlgTool" << endmsg;
844  return StatusCode::FAILURE;
845  }
846 
847  if (m_algtools.find(alg) != m_algtools.end()) {
848  m_log << MSG::WARNING << "AlgTool " << ialg.name()
849  << " already registered in HistorySvc" << endmsg;
850  return StatusCode::SUCCESS;
851  }
852 
853  m_algtools.insert(alg);
854  (const_cast<AlgTool*>(alg))->addRef();
855 
856  const JobHistory *job = getJobHistory();
857  AlgToolHistory *algHist = new AlgToolHistory(*alg, job);
858  m_algtoolmap[alg] = algHist;
859 
860  if (m_log.level() <= MSG::DEBUG) {
861  m_log << MSG::DEBUG << "Registering algtool: ";
863  m_log << alg->name() << endmsg;
864  m_log.resetColor();
865  }
866 
867  return StatusCode::SUCCESS;
868 
869 }
GAUDI_API void resetColor()
Reset the colors to defaults.
Definition: MsgStream.cpp:117
MSG::Level level()
Retrieve output level.
Definition: MsgStream.h:111
std::map< const AlgTool *, AlgToolHistory * > m_algtoolmap
Definition: HistorySvc.h:115
JobHistory class definition.
Definition: JobHistory.h:25
virtual const std::string & name() const =0
Retrieve the name of the instance.
GAUDI_API void setColor(MSG::Color col)
Set the text color.
Definition: MsgStream.cpp:90
bool m_isInitialized
Definition: HistorySvc.h:104
IAlgContextSvc * p_algCtxSvc
Definition: HistorySvc.h:108
MsgStream m_log
Definition: HistorySvc.h:144
AlgToolHistory class definition.
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:34
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:140
std::set< const IAlgTool * > m_ialgtools
Definition: HistorySvc.h:113
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
std::set< const AlgTool * > m_algtools
Definition: HistorySvc.h:114
virtual JobHistory * getJobHistory() const
Definition: HistorySvc.cpp:570
StatusCode HistorySvc::registerDataHistory ( const CLID id,
const std::string &  key,
const std::string &  store 
)
virtual

Definition at line 631 of file HistorySvc.cpp.

632  {
633 
634  DHH dhh(id,key);
635 
636  pair<DHMitr,DHMitr> mitr = m_datMap.equal_range(dhh);
637 
638  if (mitr.first == mitr.second) {
639  // not in the map
640  DataHistory *dh = createDataHistoryObj(id,key,storeName);
641  m_datMap.insert(pair<DHH,DataHistory*>(dhh,dh));
642  } else {
643  // found at least one
644  bool match(false);
645 
646  std::string algName;
647  IAlgorithm *ialg = getCurrentIAlg();
648  if (ialg != 0) {
649  algName = ialg->name();
650  } else {
651  algName = "UNKNOWN";
652  }
653 
654  for (DHMitr itr = mitr.first; itr != mitr.second; ++itr) {
655  DataHistory *dh = itr->second;
656  if (dh->algorithmHistory()->algorithm_name() == algName) {
657  match = true;
658  break;
659  }
660  }
661 
662  if (! match) {
663  DataHistory *dh = createDataHistoryObj(id,key,storeName);
664  m_datMap.insert(pair<DHH,DataHistory*>(dhh,dh));
665  }
666  }
667 
668  return StatusCode::SUCCESS;
669 
670 }
AlgorithmHistory * algorithmHistory() const
Definition: DataHistory.h:67
std::multimap< DHH, DataHistory * > m_datMap
Definition: HistorySvc.h:120
IAlgorithm * getCurrentIAlg() const
Definition: HistorySvc.cpp:578
virtual const std::string & name() const =0
Retrieve the name of the instance.
const std::string & algorithm_name() const
DataHistory class definition.
Definition: DataHistory.h:25
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:20
virtual DataHistory * createDataHistoryObj(const CLID &id, const std::string &key, const std::string &store)
Definition: HistorySvc.cpp:593
DataHistMap::iterator DHMitr
Definition: HistorySvc.h:99
StatusCode HistorySvc::registerJob ( )
virtual

Implements IHistorySvc.

Definition at line 455 of file HistorySvc.cpp.

455  {
456 
457 
458  return StatusCode(StatusCode::SUCCESS,true);
459 
460 
461 }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode HistorySvc::registerSvc ( const IService svc)
virtual

Implements IHistorySvc.

Definition at line 715 of file HistorySvc.cpp.

715  {
716 
717  if ( svc.name() == "HistoryStore" ) {
718  // m_log << MSG::WARNING << "not registering store" << endmsg;
719  return StatusCode(StatusCode::SUCCESS,true);
720  }
721 
722  JobHistory *job = getJobHistory();
723  const IService* psvc = &svc;
724  map<const IService*, ServiceHistory*>::const_iterator itr =
725  m_svcmap.find(psvc);
726  if (itr == m_svcmap.end()) {
727 
728  if (m_log.level() <= MSG::DEBUG) {
729  m_log << MSG::DEBUG << "Registering Service: ";
731  m_log << svc.name() << endmsg;
732  }
733 
734  m_svcs.insert(psvc);
735 
736  ServiceHistory *svcHist = new ServiceHistory(&svc, job);
737  m_svcmap[psvc] = svcHist;
738 
739  (const_cast<IService*>(psvc))->addRef();
740 
741  }
742 
743  m_log.resetColor();
744  return StatusCode(StatusCode::SUCCESS,true);
745 
746 }
GAUDI_API void resetColor()
Reset the colors to defaults.
Definition: MsgStream.cpp:117
MSG::Level level()
Retrieve output level.
Definition: MsgStream.h:111
JobHistory class definition.
Definition: JobHistory.h:25
virtual const std::string & name() const =0
Retrieve the name of the instance.
GAUDI_API void setColor(MSG::Color col)
Set the text color.
Definition: MsgStream.cpp:90
virtual unsigned long addRef()
Add reference to object.
Definition: DataObject.cpp:53
General service interface definition.
Definition: IService.h:19
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
MsgStream m_log
Definition: HistorySvc.h:144
ServiceHistory class definition.
std::set< const IService * > m_svcs
Definition: HistorySvc.h:117
std::map< const IService *, ServiceHistory * > m_svcmap
Definition: HistorySvc.h:118
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
virtual JobHistory * getJobHistory() const
Definition: HistorySvc.cpp:570
StatusCode HistorySvc::reinitialize ( )
virtual

Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).

Reimplemented from Service.

Definition at line 93 of file HistorySvc.cpp.

93  {
94 
95  clearState();
96 
98 
99  return initialize();
100 
101 }
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:243
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: HistorySvc.cpp:136
void clearState()
Definition: HistorySvc.cpp:105
StatusCode HistorySvc::stop ( )
virtual

Stop (from RUNNING to INITIALIZED).

Reimplemented from Service.

Definition at line 299 of file HistorySvc.cpp.

299  {
300 
301  if (!m_activate) return StatusCode::SUCCESS;
302 
303  if (m_dump) {
305  }
306 
307  if (m_outputFile != "") {
308  std::ofstream ofs;
309  ofs.open(m_outputFile.c_str());
310  if (!ofs) {
311  m_log << MSG::ERROR << "Unable to open output file \"m_outputFile\""
312  << endmsg;
313  } else {
314 
315  // dumpProperties(ofs);
316  dumpState(ofs);
317 
318  ofs.close();
319  }
320  }
321 
322  clearState();
323 
324  return StatusCode::SUCCESS;
325 
326 }
virtual StatusCode listProperties() const
Definition: HistorySvc.cpp:466
std::string m_outputFile
Definition: HistorySvc.h:126
bool m_activate
Definition: HistorySvc.h:106
MsgStream m_log
Definition: HistorySvc.h:144
void dumpState(std::ofstream &) const
Definition: HistorySvc.cpp:984
bool m_dump
Definition: HistorySvc.h:105
void ignore() const
Definition: StatusCode.h:94
void clearState()
Definition: HistorySvc.cpp:105
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243

Member Data Documentation

bool HistorySvc::m_activate
private

Definition at line 106 of file HistorySvc.h.

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

Definition at line 111 of file HistorySvc.h.

std::set<const Algorithm*> HistorySvc::m_algs
private

Definition at line 110 of file HistorySvc.h.

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

Definition at line 115 of file HistorySvc.h.

std::set<const AlgTool*> HistorySvc::m_algtools
private

Definition at line 114 of file HistorySvc.h.

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

Definition at line 120 of file HistorySvc.h.

bool HistorySvc::m_dump
private

Definition at line 105 of file HistorySvc.h.

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

Definition at line 113 of file HistorySvc.h.

IIncidentSvc* HistorySvc::m_incidentSvc
private

Definition at line 141 of file HistorySvc.h.

bool HistorySvc::m_isInitialized
private

Definition at line 104 of file HistorySvc.h.

JobHistory* HistorySvc::m_jobHistory
private

Definition at line 124 of file HistorySvc.h.

MsgStream HistorySvc::m_log
mutableprivate

Definition at line 144 of file HistorySvc.h.

std::string HistorySvc::m_outputFile
private

Definition at line 126 of file HistorySvc.h.

bool HistorySvc::m_outputFileTypeXML
private

Definition at line 145 of file HistorySvc.h.

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

Definition at line 118 of file HistorySvc.h.

std::set<const IService*> HistorySvc::m_svcs
private

Definition at line 117 of file HistorySvc.h.

SmartIF<IToolSvc> HistorySvc::m_toolSvc
private

Definition at line 142 of file HistorySvc.h.

IAlgContextSvc* HistorySvc::p_algCtxSvc
private

Definition at line 108 of file HistorySvc.h.


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