| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ServiceHistory Class Reference

ServiceHistory class definition. More...

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

## 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)

## 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< Property * > | PropertyList
Protected Member Functions inherited from HistoryObj
virtual void | indent (std::ostream &, int) const
Friends inherited from DataObject

## Detailed Description

ServiceHistory class definition.

Author
  : Charles Leggett

Definition at line 24 of file ServiceHistory.h.

## Constructor & Destructor Documentation

ServiceHistory::ServiceHistory | ( |  | ) |

Definition at line 27 of file ServiceHistory.cpp.

:
// HistoryObj(),
m_pService(0),
m_name("none"),
m_type("none"),
m_version("none")
{
}

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

Definition at line 39 of file ServiceHistory.cpp.

:
// HistoryObj(),
m_pService(isv),
m_jobHistory(job),
m_name(isv->name()),
m_version("none")
{
const Service *svc = dynamic_cast<const Service*>(isv);
m_type = System::typeinfoName(typeid(*svc));
m_properties = svc->getProperties();
}

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

Definition at line 56 of file ServiceHistory.cpp.

:
// HistoryObj(),
m_pService(&isv),
m_jobHistory(job),
m_name(isv.name()),
m_version("none")
{
const Service *svc = dynamic_cast<const Service*>(&isv);
m_type = System::typeinfoName(typeid(*svc));
m_properties = svc->getProperties();
}

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

Definition at line 72 of file ServiceHistory.cpp.

{
}

## Member Function Documentation

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

Definition at line 79 of file ServiceHistory.cpp.

{
static CLID CLID_ServiceHistory = 187225489; // from `clid ServiceHistory`
return CLID_ServiceHistory;
}

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

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 34 of file ServiceHistory.h.

{ return classID(); }

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

Implements HistoryObj.

Definition at line 89 of file ServiceHistory.cpp.

{
if (!isXML) {
ost << "Name: " << name() << endl;
ost << "Type: " << type() << endl;
ost << "Version: " << version() << endl;
//Properties
ost << "Properties: [" << endl;
for ( ServiceHistory::PropertyList::const_iterator
ipprop=properties().begin();
ipprop!=properties().end(); ++ipprop ) {
const Property& prop = **ipprop;
prop.fillStream(ost);
ost << endl;
}
ost << "]" << endl;
} else {
ind += 2;
indent(ost,ind);
ost << "<COMPONENT name=\"" << name()
<< "\" class=\"" << convert_string(type())
<< "\" version=\"" << convert_string(version())
<< "\">" << endl;
for ( ServiceHistory::PropertyList::const_iterator
ipprop=properties().begin();
ipprop!=properties().end(); ++ipprop ) {
const Property& prop = **ipprop;
indent(ost,ind+2);
ost << "<PROPERTY name=\"" << prop.name()
<< "\" value=\"" << convert_string(prop.toString())
<< "\" documentation=\"" << convert_string(prop.documentation())
<< "\">" << endl;
}
indent(ost,ind);
ost << "</COMPONENT>" << endl;
}
}

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

Definition at line 42 of file ServiceHistory.h.

{ return m_jobHistory; }

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

Implements IVersHistoryObj.

Definition at line 46 of file ServiceHistory.h.

{ return m_name; }

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

Implements IVersHistoryObj.

Definition at line 38 of file ServiceHistory.h.

{ return m_properties; }

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

Definition at line 40 of file ServiceHistory.h.

{ return m_pService; }

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

Implements IVersHistoryObj.

Definition at line 47 of file ServiceHistory.h.

{ return m_type; }

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

Implements IVersHistoryObj.

Definition at line 48 of file ServiceHistory.h.

{ return m_version; }

## Member Data Documentation

const JobHistory* ServiceHistory::m_jobHistory
| private

Definition at line 54 of file ServiceHistory.h.

std::string ServiceHistory::m_name
| private

Definition at line 55 of file ServiceHistory.h.

PropertyList ServiceHistory::m_properties
| private

Definition at line 56 of file ServiceHistory.h.

const IService* ServiceHistory::m_pService
| private

Definition at line 53 of file ServiceHistory.h.

std::string ServiceHistory::m_type
| private

Definition at line 55 of file ServiceHistory.h.

std::string ServiceHistory::m_version
| private

Definition at line 55 of file ServiceHistory.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/GaudiKernel/ServiceHistory.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/src/Lib/ServiceHistory.cpp