| # 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 Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
JobHistory Class Reference

JobHistory class definition. More...

`#include <JobHistory.h>`

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

## Public Types
typedef std::vector< std::pair < std::string, const Property * > > | PropertyPairList
Public Types inherited from IVersHistoryObj
typedef std::vector< Property * > | PropertyList

## Public Member Functions
| JobHistory ()
| JobHistory (const std::string &rel, const std::string &os, const std::string &host, const std::string &dir, const std::string &osver, const std::string &mach, const std::string &cmtconfig, const time_t &time)
virtual | ~JobHistory ()
virtual const CLID & | clID () const
| Retrieve reference to class definition structure.
void | addProperty (const std::string &, const Property *)
std::string | release_version () const
std::string | os () const
std::string | hostname () const
std::string | os_version () const
std::string | machine () const
std::string | dir () const
std::string | cmtconfig () const
std::vector< std::string > | environment () const
const PropertyList & | properties () const
const PropertyPairList & | propertyPairs () const
time_t | start_time () const
void | dump (std::ostream &, const bool isXML=false, int indent=0) const
const std::string & | name () const
const std::string & | version () const
const std::string & | type () 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
std::string | m_release_version
std::string | m_dir
std::string | m_cmtconfig
std::string | m_osname
std::string | m_hostname
std::string | m_os_version
std::string | m_machine
std::vector< std::string > | m_environ
PropertyList | m_props
PropertyPairList | m_ppl
std::vector< std::string > | m_CVSid
time_t | m_start_time

## Additional Inherited Members
Protected Member Functions inherited from HistoryObj
virtual void | indent (std::ostream &, int) const
Friends inherited from DataObject

## Detailed Description

JobHistory class definition.

Author
  : Charles Leggett

Definition at line 25 of file JobHistory.h.

## Member Typedef Documentation

typedef std::vector< std::pair<std::string,const Property*> > JobHistory::PropertyPairList

Definition at line 29 of file JobHistory.h.

## Constructor & Destructor Documentation

JobHistory::JobHistory | ( |  | ) |

Definition at line 33 of file JobHistory.cpp.

: m_start_time(0) {
time(&m_start_time);
std::string rel;
if ( (rel = System::getEnv("ATLAS_BASE_RELEASE")) != "UNKNOWN" ) {
m_release_version = rel;
} else if ( (rel = System::getEnv("GAUDIROOT")) != "UNKNOWN" ) {
m_release_version = rel;
} else {
m_release_version = "UNKNOWN";
}
m_dir = System::getEnv("PWD");
m_cmtconfig = System::getEnv("CMTCONFIG");
m_osname = System::osName();
m_hostname = System::hostName();
m_os_version = System::osVersion();
m_machine = System::machineType();
m_environ = System::getEnv();
}

JobHistory::JobHistory | ( | const std::string & | rel,
|  | const std::string & | os,
|  | const std::string & | host,
|  | const std::string & | dir,
|  | const std::string & | osver,
|  | const std::string & | mach,
|  | const std::string & | cmtconfig,
|  | const time_t & | time
| ) |  |

Definition at line 59 of file JobHistory.cpp.

:
m_release_version(rel), m_dir(dir), m_cmtconfig(cmtconfig), m_osname(os),
m_hostname(host),
m_os_version(osver), m_machine(mach), m_start_time(time) {
}

JobHistory::~JobHistory | ( |  | ) |
| virtual

Definition at line 75 of file JobHistory.cpp.

{
}

## Member Function Documentation

void JobHistory::addProperty | ( | const std::string & | client,
|  | const Property * | prop
| ) |  |

Definition at line 87 of file JobHistory.cpp.

{
// if (m_props.find(prop) == m_props.end()) {
m_ppl.push_back( std::pair<std::string, const Property*>(client,prop) );
// }
}

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

Definition at line 79 of file JobHistory.cpp.

{
static CLID CLID_JobHistory = 247994533;
return CLID_JobHistory;
}

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

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 64 of file JobHistory.h.

{ return classID(); }

std::string JobHistory::cmtconfig | ( |  | ) | const
| inline

Definition at line 77 of file JobHistory.h.

{ return m_cmtconfig; }

std::string JobHistory::dir | ( |  | ) | const
| inline

Definition at line 76 of file JobHistory.h.

{ return m_dir; }

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

Implements HistoryObj.

Definition at line 95 of file JobHistory.cpp.

{
if (!isXML) {
ost << "Release: " << release_version() << endl;
ost << "OS: " << os() << endl;
ost << "OS ver: " << os_version() << endl;
ost << "Host: " << hostname() << endl;
ost << "Machine: " << machine() << endl;
ost << "Run dir: " << dir() << endl;
ost << "CMTCONFIG: " << cmtconfig() << endl;
ost << "Job start time: " << start_time() << endl << endl;
ost << "Properties: [" << endl;;
for ( JobHistory::PropertyPairList::const_iterator
ipprop=propertyPairs().begin();
ipprop!=propertyPairs().end(); ++ipprop ) {
std::string client = ipprop->first;
const Property* prop = ipprop->second;
ost << client << ": ";
prop->fillStream(ost);
ost << endl;
}
ost << "]" << endl;
vector<string> env = environment();
for (vector<string>::const_iterator itr=env.begin(); itr != env.end();
++itr) {
ost << *itr << endl;
}
} else {
}
}

std::vector<std::string> JobHistory::environment | ( |  | ) | const
| inline

Definition at line 78 of file JobHistory.h.

{ return m_environ; }

std::string JobHistory::hostname | ( |  | ) | const
| inline

Definition at line 73 of file JobHistory.h.

{ return m_hostname; }

std::string JobHistory::machine | ( |  | ) | const
| inline

Definition at line 75 of file JobHistory.h.

{ return m_machine; }

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

Implements IVersHistoryObj.

Definition at line 85 of file JobHistory.h.

{ return m_machine; }

std::string JobHistory::os | ( |  | ) | const
| inline

Definition at line 72 of file JobHistory.h.

{ return m_osname; }

std::string JobHistory::os_version | ( |  | ) | const
| inline

Definition at line 74 of file JobHistory.h.

{ return m_os_version; }

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

Implements IVersHistoryObj.

Definition at line 79 of file JobHistory.h.

{ return m_props; }

const PropertyPairList& JobHistory::propertyPairs | ( |  | ) | const
| inline

Definition at line 80 of file JobHistory.h.

{ return m_ppl; }

std::string JobHistory::release_version | ( |  | ) | const
| inline

Definition at line 71 of file JobHistory.h.

{ return m_release_version; }

time_t JobHistory::start_time | ( |  | ) | const
| inline

Definition at line 81 of file JobHistory.h.

{ return m_start_time; }

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

Implements IVersHistoryObj.

Definition at line 87 of file JobHistory.h.

{ return m_osname; }

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

Implements IVersHistoryObj.

Definition at line 86 of file JobHistory.h.

{ return m_release_version;}

## Member Data Documentation

std::string JobHistory::m_cmtconfig
| private

Definition at line 35 of file JobHistory.h.

std::vector<std::string> JobHistory::m_CVSid
| private

Definition at line 47 of file JobHistory.h.

std::string JobHistory::m_dir
| private

Definition at line 34 of file JobHistory.h.

std::vector<std::string> JobHistory::m_environ
| private

Definition at line 42 of file JobHistory.h.

std::string JobHistory::m_hostname
| private

Definition at line 38 of file JobHistory.h.

std::string JobHistory::m_machine
| private

Definition at line 40 of file JobHistory.h.

std::string JobHistory::m_os_version
| private

Definition at line 39 of file JobHistory.h.

std::string JobHistory::m_osname
| private

Definition at line 37 of file JobHistory.h.

PropertyPairList JobHistory::m_ppl
| private

Definition at line 45 of file JobHistory.h.

PropertyList JobHistory::m_props
| private

Definition at line 44 of file JobHistory.h.

std::string JobHistory::m_release_version
| private

Definition at line 33 of file JobHistory.h.

time_t JobHistory::m_start_time
| private

Definition at line 48 of file JobHistory.h.

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

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