| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ServiceHistory Class Reference

ServiceHistory class definition. More...

`#include <GaudiKernel/ServiceHistory.h>`

Inheritance diagram for ServiceHistory:
[legend]
Collaboration diagram for ServiceHistory:
[legend]

## Public Member Functions
| ServiceHistory ()
| ServiceHistory (const IService *, const JobHistory *)
| ServiceHistory (const IService &, const JobHistory *)
virtual | ~ServiceHistory ()=default
const CLID & | clID () const override
| Retrieve reference to class definition structure. More...
const PropertyList & | properties () const override
const IService * | service () const
const JobHistory * | jobHistory () const
void | dump (std::ostream &, const bool isXML=false, int indent=0) const override
const std::string & | name () const override
const std::string & | type () const override
const std::string & | version () const override
Public Member Functions inherited from HistoryObj
| HistoryObj ()=default
virtual | ~HistoryObj ()=default
Public Member Functions inherited from DataObject
| DataObject ()
| Standard Constructor. More...
| DataObject (const DataObject &rhs)
| Copy Constructor. More...
DataObject & | operator= (const DataObject &rhs)
| Assignment Operator. More...
| DataObject (DataObject &&rhs)
| Move Constructor. More...
DataObject & | operator= (DataObject &&rhs)
| Move Assignment Operator. More...
virtual | ~DataObject ()
| Standard Destructor. More...
virtual unsigned long | addRef ()
| Add reference to object. More...
virtual unsigned long | release ()
| release reference to object More...
const std::string & | name () const
| Retreive DataObject name. It is the name when registered in the store. More...
virtual StatusCode | update ()
| Provide empty placeholder for internal object reconfiguration callback. More...
void | setRegistry (IRegistry *pRegistry)
| Set pointer to Registry. More...
IRegistry * | registry () const
| Get pointer to Registry. More...
LinkManager * | linkMgr () const
| Retrieve Link manager. More...
unsigned char | version () const
| Retrieve version number of this object representation. More...
void | setVersion (unsigned char vsn)
| Set version number of this object representation. More...
unsigned long | refCount () const
| Return the refcount. More...
virtual std::ostream & | fillStream (std::ostream &s) const
| Fill the output stream (ASCII) More...
Public Member Functions inherited from IVersHistoryObj
virtual | ~IVersHistoryObj ()=default

## Static Public Member Functions
static const CLID & | classID ()
Static Public Member Functions inherited from HistoryObj
static const CLID & | classID ()
static std::string | convert_string (const std::string &)
Static Public Member Functions inherited from DataObject
static const CLID & | classID ()
| Retrieve reference to class definition structure (static access) More...

## Private Attributes
const IService * | m_pService
const JobHistory * | m_jobHistory
std::string | m_name
std::string | m_type
std::string | m_version
PropertyList | m_properties

## Additional Inherited Members
Public Types inherited from IVersHistoryObj
typedef std::vector< Gaudi::Details::PropertyBase * > | PropertyList
Protected Member Functions inherited from HistoryObj
virtual void | indent (std::ostream &, int) const

## Detailed Description

ServiceHistory class definition.

Author
  : Charles Leggett

Definition at line 21 of file ServiceHistory.h.

## Constructor & Destructor Documentation

## ◆ ServiceHistory() [1/3]

ServiceHistory::ServiceHistory | ( |  | ) |

Definition at line 25 of file ServiceHistory.cpp.

26 : // HistoryObj(),
27 m_pService( nullptr )
28 , m_name( "none" )
29 , m_type( "none" )
30 , m_version( "none" ) {}
ServiceHistory::m_name
std::string m_name
Definition: ServiceHistory.h:50
ServiceHistory::m_type
std::string m_type
Definition: ServiceHistory.h:50
ServiceHistory::m_version
std::string m_version
Definition: ServiceHistory.h:50
ServiceHistory::m_pService
const IService * m_pService
Definition: ServiceHistory.h:48

## ◆ ServiceHistory() [2/3]

ServiceHistory::ServiceHistory | ( | const IService * | isv,
|  | const JobHistory * | job
| ) |  |

Definition at line 33 of file ServiceHistory.cpp.

34 : // HistoryObj(),
35 m_pService( isv )
36 , m_jobHistory( job )
37 , m_name( isv->name() )
38 , m_version( "none" ) {
39
40 const Service* svc = dynamic_cast<const Service*>( isv );
41 m_type = System::typeinfoName( typeid( *svc ) );
42 m_properties = svc->getProperties();
43 }
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
ServiceHistory::m_name
std::string m_name
Definition: ServiceHistory.h:50
ServiceHistory::m_properties
PropertyList m_properties
Definition: ServiceHistory.h:51
ServiceHistory::m_type
std::string m_type
Definition: ServiceHistory.h:50
ServiceHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: ServiceHistory.h:49
ServiceHistory::m_version
std::string m_version
Definition: ServiceHistory.h:50
PropertyHolder::getProperties
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
Definition: PropertyHolder.h:251
Service
Base class for all services.
Definition: Service.h:36
ServiceHistory::m_pService
const IService * m_pService
Definition: ServiceHistory.h:48

## ◆ ServiceHistory() [3/3]

ServiceHistory::ServiceHistory | ( | const IService & | isv,
|  | const JobHistory * | job
| ) |  |

Definition at line 47 of file ServiceHistory.cpp.

48 : // HistoryObj(),
49 m_pService( &isv )
50 , m_jobHistory( job )
51 , m_name( isv.name() )
52 , m_version( "none" ) {
53
54 const Service* svc = dynamic_cast<const Service*>( &isv );
55 m_type = System::typeinfoName( typeid( *svc ) );
56 m_properties = svc->getProperties();
57 }
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
ServiceHistory::m_name
std::string m_name
Definition: ServiceHistory.h:50
ServiceHistory::m_properties
PropertyList m_properties
Definition: ServiceHistory.h:51
ServiceHistory::m_type
std::string m_type
Definition: ServiceHistory.h:50
ServiceHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: ServiceHistory.h:49
ServiceHistory::m_version
std::string m_version
Definition: ServiceHistory.h:50
PropertyHolder::getProperties
const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const override
get all properties
Definition: PropertyHolder.h:251
Service
Base class for all services.
Definition: Service.h:36
ServiceHistory::m_pService
const IService * m_pService
Definition: ServiceHistory.h:48

## ◆ ~ServiceHistory()

virtual ServiceHistory::~ServiceHistory | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ classID()

const CLID & ServiceHistory::classID | ( |  | ) |
| static

Definition at line 61 of file ServiceHistory.cpp.

61 {
62
63 static const CLID CLID_ServiceHistory = 187225489; // from `clid ServiceHistory`
64 return CLID_ServiceHistory;
65 }
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8

## ◆ clID()

const CLID& ServiceHistory::clID | ( |  | ) | const
| inline override virtual

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 31 of file ServiceHistory.h.

31 { return classID(); }
ServiceHistory::classID
static const CLID & classID()
Definition: ServiceHistory.cpp:61

## ◆ dump()

void ServiceHistory::dump | ( | std::ostream & | ost,
|  | const bool | isXML = `false`,
|  | int | indent = `0`
| ) |  | const
| override virtual

Implements HistoryObj.

Definition at line 69 of file ServiceHistory.cpp.

69 {
70
71 if ( !isXML ) {
72
73 ost << "Name: " << name() << endl;
74 ost << "Type: " << type() << endl;
75 ost << "Version: " << version() << endl;
76
77 // Properties
78 ost << "Properties: [" << endl;
79
80 for ( const auto& ipprop : properties() ) {
81 const PropertyBase& prop = *ipprop;
82 prop.fillStream( ost );
83 ost << endl;
84 }
85 ost << "]" << endl;
86
87 } else {
88
89 ind += 2;
90 indent( ost, ind );
91 ost << "<COMPONENT name=\"" << name() << "\" class=\"" << convert_string( type() ) << "\" version=\""
92 << convert_string( version() ) << "\">" << endl;
93
94 for ( const auto& ipprop : properties() ) {
95 const PropertyBase& prop = *ipprop;
96
97 indent( ost, ind + 2 );
98 ost << "<PROPERTY name=\"" << prop.name() << "\" value=\"" << convert_string( prop.toString() )
99 << "\" documentation=\"" << convert_string( prop.documentation() ) << "\">" << endl;
100 }
101
102 indent( ost, ind );
103 ost << "</COMPONENT>" << endl;
104 }
105 }
std::endl
T endl(T... args)
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: Property.h:36
ServiceHistory::type
const std::string & type() const override
Definition: ServiceHistory.h:44
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
Gaudi::Details::PropertyBase::fillStream
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
Definition: Property.cpp:49
HistoryObj::indent
virtual void indent(std::ostream &, int) const
Definition: HistoryObj.cpp:46
HistoryObj::convert_string
static std::string convert_string(const std::string &)
Definition: HistoryObj.cpp:20
ServiceHistory::name
const std::string & name() const override
Definition: ServiceHistory.h:43
ServiceHistory::version
const std::string & version() const override
Definition: ServiceHistory.h:45
Gaudi::Details::PropertyBase::toString
virtual std::string toString() const =0
value -> string
Gaudi::Details::PropertyBase::documentation
std::string documentation() const
property documentation
Definition: Property.h:38
ServiceHistory::properties
const PropertyList & properties() const override
Definition: ServiceHistory.h:35

## ◆ jobHistory()

const JobHistory* ServiceHistory::jobHistory | ( |  | ) | const
| inline

Definition at line 39 of file ServiceHistory.h.

39 { return m_jobHistory; }
ServiceHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: ServiceHistory.h:49

## ◆ name()

const std::string& ServiceHistory::name | ( |  | ) | const
| inline override virtual

Implements IVersHistoryObj.

Definition at line 43 of file ServiceHistory.h.

43 { return m_name; }
ServiceHistory::m_name
std::string m_name
Definition: ServiceHistory.h:50

## ◆ properties()

const PropertyList& ServiceHistory::properties | ( |  | ) | const
| inline override virtual

Implements IVersHistoryObj.

Definition at line 35 of file ServiceHistory.h.

35 { return m_properties; }
ServiceHistory::m_properties
PropertyList m_properties
Definition: ServiceHistory.h:51

## ◆ service()

const IService* ServiceHistory::service | ( |  | ) | const
| inline

Definition at line 37 of file ServiceHistory.h.

37 { return m_pService; }
ServiceHistory::m_pService
const IService * m_pService
Definition: ServiceHistory.h:48

## ◆ type()

const std::string& ServiceHistory::type | ( |  | ) | const
| inline override virtual

Implements IVersHistoryObj.

Definition at line 44 of file ServiceHistory.h.

44 { return m_type; }
ServiceHistory::m_type
std::string m_type
Definition: ServiceHistory.h:50

## ◆ version()

const std::string& ServiceHistory::version | ( |  | ) | const
| inline override virtual

Implements IVersHistoryObj.

Definition at line 45 of file ServiceHistory.h.

45 { return m_version; }
ServiceHistory::m_version
std::string m_version
Definition: ServiceHistory.h:50

## Member Data Documentation

## ◆ m_jobHistory

const JobHistory* ServiceHistory::m_jobHistory
| private

Definition at line 49 of file ServiceHistory.h.

## ◆ m_name

std::string ServiceHistory::m_name
| private

Definition at line 50 of file ServiceHistory.h.

## ◆ m_properties

PropertyList ServiceHistory::m_properties
| private

Definition at line 51 of file ServiceHistory.h.

## ◆ m_pService

const IService* ServiceHistory::m_pService
| private

Definition at line 48 of file ServiceHistory.h.

## ◆ m_type

std::string ServiceHistory::m_type
| private

Definition at line 50 of file ServiceHistory.h.

## ◆ m_version

std::string ServiceHistory::m_version
| private

Definition at line 50 of file ServiceHistory.h.

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

- GaudiKernel/GaudiKernel/ServiceHistory.h
- GaudiKernel/src/Lib/ServiceHistory.cpp