| The Gaudi Framework v27r1

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

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

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

JobHistory class definition. More...

`#include <GaudiKernel/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. More...
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 ()=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
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

## Detailed Description

JobHistory class definition.

Author
  : Charles Leggett

Definition at line 24 of file JobHistory.h.

## Member Typedef Documentation

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

Definition at line 28 of file JobHistory.h.

## Constructor & Destructor Documentation

JobHistory::JobHistory | ( |  | ) |

Definition at line 31 of file JobHistory.cpp.

32 : m_start_time(0) {
33
34 time(&m_start_time);
35
36 std::string rel;
37
38 if ( (rel = System::getEnv("ATLAS_BASE_RELEASE")) != "UNKNOWN" ) {
39 m_release_version = rel;
40 } else if ( (rel = System::getEnv("GAUDIROOT")) != "UNKNOWN" ) {
41 m_release_version = rel;
42 } else {
43 m_release_version = "UNKNOWN";
44 }
45 m_dir = System::getEnv("PWD");
46 m_cmtconfig = System::getEnv("CMTCONFIG");
47
48 m_osname = System::osName();
49 m_hostname = System::hostName();
50 m_os_version = System::osVersion();
51 m_machine = System::machineType();
52
53 m_environ = System::getEnv();
54
55 }
System::getEnv
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:617
JobHistory::m_dir
std::string m_dir
Definition: JobHistory.h:33
plotSpeedupsPyRoot.time
tuple time
Definition: plotSpeedupsPyRoot.py:146
JobHistory::m_os_version
std::string m_os_version
Definition: JobHistory.h:38
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:36
JobHistory::m_hostname
std::string m_hostname
Definition: JobHistory.h:37
std::string
STL class.
JobHistory::m_environ
std::vector< std::string > m_environ
Definition: JobHistory.h:41
JobHistory::m_start_time
time_t m_start_time
Definition: JobHistory.h:47
JobHistory::m_cmtconfig
std::string m_cmtconfig
Definition: JobHistory.h:34
System::osName
GAUDI_API const std::string & osName()
OS name.
Definition: System.cpp:444
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:39
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:32
System::hostName
GAUDI_API const std::string & hostName()
Host name.
Definition: System.cpp:438
System::osVersion
GAUDI_API const std::string & osVersion()
OS version.
Definition: System.cpp:461
System::machineType
GAUDI_API const std::string & machineType()
Machine type.
Definition: System.cpp:482

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 57 of file JobHistory.cpp.

61 :
62 m_release_version(rel), m_dir(dir), m_cmtconfig(cmtconfig), m_osname(os),
63 m_hostname(host),
64 m_os_version(osver), m_machine(mach), m_start_time(time) {
65
66 }
JobHistory::m_dir
std::string m_dir
Definition: JobHistory.h:33
plotSpeedupsPyRoot.time
tuple time
Definition: plotSpeedupsPyRoot.py:146
JobHistory::m_os_version
std::string m_os_version
Definition: JobHistory.h:38
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:36
JobHistory::m_hostname
std::string m_hostname
Definition: JobHistory.h:37
JobHistory::m_start_time
time_t m_start_time
Definition: JobHistory.h:47
JobHistory::m_cmtconfig
std::string m_cmtconfig
Definition: JobHistory.h:34
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:39
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:32

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

## Member Function Documentation

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

Definition at line 84 of file JobHistory.cpp.

84 {
85 // if (m_props.find(prop) == m_props.end())
86 m_ppl.emplace_back( client,prop );
87 }
JobHistory::m_ppl
PropertyPairList m_ppl
Definition: JobHistory.h:44
std::vector::emplace_back
T emplace_back(T...args)

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

Definition at line 76 of file JobHistory.cpp.

76 {
77
78 static const CLID CLID_JobHistory = 247994533;
79 return CLID_JobHistory;
80
81 }
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8

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 63 of file JobHistory.h.

63 { return classID(); }
JobHistory::classID
static const CLID & classID()
Definition: JobHistory.cpp:76

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

Definition at line 76 of file JobHistory.h.

76 { return m_cmtconfig; }
JobHistory::m_cmtconfig
std::string m_cmtconfig
Definition: JobHistory.h:34

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

Definition at line 75 of file JobHistory.h.

75 { return m_dir; }
JobHistory::m_dir
std::string m_dir
Definition: JobHistory.h:33

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

Implements HistoryObj.

Definition at line 91 of file JobHistory.cpp.

91 {
92
93 if (!isXML) {
94 ost << "Release: " << release_version() << endl;
95 ost << "OS: " << os() << endl;
96 ost << "OS ver: " << os_version() << endl;
97 ost << "Host: " << hostname() << endl;
98 ost << "Machine: " << machine() << endl;
99 ost << "Run dir: " << dir() << endl;
100 ost << "CMTCONFIG: " << cmtconfig() << endl;
101 ost << "Job start time: " << start_time() << endl << endl;
102 ost << "Properties: [" << endl;;
103 for ( const auto& ipprop : propertyPairs() ) {
104 const std::string& client = ipprop.first;
105 const Property* prop = ipprop.second;
106 ost << client << ": ";
107 prop->fillStream(ost);
108 ost << endl;
109 }
110 ost << "]" << endl;
111 for (const auto& itr : environment() ) ost << itr << endl;
112 } else {
113
114 }
115
116 }
JobHistory::os_version
std::string os_version() const
Definition: JobHistory.h:73
JobHistory::os
std::string os() const
Definition: JobHistory.h:71
std::endl
T endl(T...args)
JobHistory::start_time
time_t start_time() const
Definition: JobHistory.h:80
Property::fillStream
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
Definition: Property.cpp:111
std::string
STL class.
JobHistory::release_version
std::string release_version() const
Definition: JobHistory.h:70
JobHistory::machine
std::string machine() const
Definition: JobHistory.h:74
JobHistory::environment
std::vector< std::string > environment() const
Definition: JobHistory.h:77
JobHistory::cmtconfig
std::string cmtconfig() const
Definition: JobHistory.h:76
JobHistory::propertyPairs
const PropertyPairList & propertyPairs() const
Definition: JobHistory.h:79
Property
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
JobHistory::dir
std::string dir() const
Definition: JobHistory.h:75
JobHistory::hostname
std::string hostname() const
Definition: JobHistory.h:72

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

Definition at line 77 of file JobHistory.h.

77 { return m_environ; }
JobHistory::m_environ
std::vector< std::string > m_environ
Definition: JobHistory.h:41

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

Definition at line 72 of file JobHistory.h.

72 { return m_hostname; }
JobHistory::m_hostname
std::string m_hostname
Definition: JobHistory.h:37

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

Definition at line 74 of file JobHistory.h.

74 { return m_machine; }
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:39

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

Implements IVersHistoryObj.

Definition at line 84 of file JobHistory.h.

84 { return m_machine; }
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:39

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

Definition at line 71 of file JobHistory.h.

71 { return m_osname; }
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:36

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

Definition at line 73 of file JobHistory.h.

73 { return m_os_version; }
JobHistory::m_os_version
std::string m_os_version
Definition: JobHistory.h:38

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

Implements IVersHistoryObj.

Definition at line 78 of file JobHistory.h.

78 { return m_props; }
JobHistory::m_props
PropertyList m_props
Definition: JobHistory.h:43

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

Definition at line 79 of file JobHistory.h.

79 { return m_ppl; }
JobHistory::m_ppl
PropertyPairList m_ppl
Definition: JobHistory.h:44

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

Definition at line 70 of file JobHistory.h.

70 { return m_release_version; }
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:32

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

Definition at line 80 of file JobHistory.h.

80 { return m_start_time; }
JobHistory::m_start_time
time_t m_start_time
Definition: JobHistory.h:47

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

Implements IVersHistoryObj.

Definition at line 86 of file JobHistory.h.

86 { return m_osname; }
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:36

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

Implements IVersHistoryObj.

Definition at line 85 of file JobHistory.h.

85 { return m_release_version;}
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:32

## Member Data Documentation

std::string JobHistory::m_cmtconfig
| private

Definition at line 34 of file JobHistory.h.

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

Definition at line 46 of file JobHistory.h.

std::string JobHistory::m_dir
| private

Definition at line 33 of file JobHistory.h.

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

Definition at line 41 of file JobHistory.h.

std::string JobHistory::m_hostname
| private

Definition at line 37 of file JobHistory.h.

std::string JobHistory::m_machine
| private

Definition at line 39 of file JobHistory.h.

std::string JobHistory::m_os_version
| private

Definition at line 38 of file JobHistory.h.

std::string JobHistory::m_osname
| private

Definition at line 36 of file JobHistory.h.

PropertyPairList JobHistory::m_ppl
| private

Definition at line 44 of file JobHistory.h.

PropertyList JobHistory::m_props
| private

Definition at line 43 of file JobHistory.h.

std::string JobHistory::m_release_version
| private

Definition at line 32 of file JobHistory.h.

time_t JobHistory::m_start_time
| private

Definition at line 47 of file JobHistory.h.

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

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