| The Gaudi Framework v28r2-patches (bc4ad17a)

- 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 Gaudi::Details::PropertyBase * > > | PropertyPairList
Public Types inherited from IVersHistoryObj
typedef std::vector< Gaudi::Details::PropertyBase * > | 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 ()
const CLID & | clID () const override
| Retrieve reference to class definition structure. More...
void | addProperty (const std::string &, const Gaudi::Details::PropertyBase *)
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 override
const PropertyPairList & | propertyPairs () const
time_t | start_time () const
void | dump (std::ostream &, const bool isXML=false, int indent=0) const override
const std::string & | name () const override
const std::string & | version () const override
const std::string & | type () 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
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 22 of file JobHistory.h.

## Member Typedef Documentation

typedef std::vector<std::pair<std::string, const Gaudi::Details::PropertyBase*> > JobHistory::PropertyPairList

Definition at line 26 of file JobHistory.h.

## Constructor & Destructor Documentation

JobHistory::JobHistory | ( |  | ) |

Definition at line 33 of file JobHistory.cpp.

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

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

61 : m_release_version( rel )
62 , m_dir( dir )
63 , m_cmtconfig( cmtconfig )
64 , m_osname( os )
65 , m_hostname( host )
66 , m_os_version( osver )
67 , m_machine( mach )
68 , m_start_time( time )
69 {
70 }
JobHistory::m_dir
std::string m_dir
Definition: JobHistory.h:30
JobHistory::m_os_version
std::string m_os_version
Definition: JobHistory.h:35
plotSpeedupsPyRoot.time
time
Definition: plotSpeedupsPyRoot.py:146
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:33
JobHistory::m_hostname
std::string m_hostname
Definition: JobHistory.h:34
JobHistory::m_start_time
time_t m_start_time
Definition: JobHistory.h:44
JobHistory::m_cmtconfig
std::string m_cmtconfig
Definition: JobHistory.h:31
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:36
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:29

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

## Member Function Documentation

void JobHistory::addProperty | ( | const std::string & | client,
|  | const Gaudi::Details::PropertyBase * | prop
| ) |  |

Definition at line 85 of file JobHistory.cpp.

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

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

Definition at line 78 of file JobHistory.cpp.

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

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

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 56 of file JobHistory.h.

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

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

Definition at line 69 of file JobHistory.h.

69 { return m_cmtconfig; }
JobHistory::m_cmtconfig
std::string m_cmtconfig
Definition: JobHistory.h:31

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

Definition at line 68 of file JobHistory.h.

68 { return m_dir; }
JobHistory::m_dir
std::string m_dir
Definition: JobHistory.h:30

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

Implements HistoryObj.

Definition at line 91 of file JobHistory.cpp.

92 {
93
94 if ( !isXML ) {
95 ost << "Release: " << release_version() << endl;
96 ost << "OS: " << os() << endl;
97 ost << "OS ver: " << os_version() << endl;
98 ost << "Host: " << hostname() << endl;
99 ost << "Machine: " << machine() << endl;
100 ost << "Run dir: " << dir() << endl;
101 ost << "CMTCONFIG: " << cmtconfig() << endl;
102 ost << "Job start time: " << start_time() << endl << endl;
103 ost << "Properties: [" << endl;
104 ;
105 for ( const auto& ipprop : propertyPairs() ) {
106 const std::string& client = ipprop.first;
107 const PropertyBase* prop = ipprop.second;
108 ost << client << ": ";
109 prop->fillStream( ost );
110 ost << endl;
111 }
112 ost << "]" << endl;
113 for ( const auto& itr : environment() ) ost << itr << endl;
114 } else {
115 }
116 }
JobHistory::os_version
std::string os_version() const
Definition: JobHistory.h:66
JobHistory::os
std::string os() const
Definition: JobHistory.h:64
std::endl
T endl(T...args)
JobHistory::start_time
time_t start_time() const
Definition: JobHistory.h:73
std::string
STL class.
JobHistory::release_version
std::string release_version() const
Definition: JobHistory.h:63
JobHistory::machine
std::string machine() const
Definition: JobHistory.h:67
JobHistory::environment
std::vector< std::string > environment() const
Definition: JobHistory.h:70
JobHistory::cmtconfig
std::string cmtconfig() const
Definition: JobHistory.h:69
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:52
JobHistory::propertyPairs
const PropertyPairList & propertyPairs() const
Definition: JobHistory.h:72
JobHistory::dir
std::string dir() const
Definition: JobHistory.h:68
JobHistory::hostname
std::string hostname() const
Definition: JobHistory.h:65

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

Definition at line 70 of file JobHistory.h.

70 { return m_environ; }
JobHistory::m_environ
std::vector< std::string > m_environ
Definition: JobHistory.h:38

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

Definition at line 65 of file JobHistory.h.

65 { return m_hostname; }
JobHistory::m_hostname
std::string m_hostname
Definition: JobHistory.h:34

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

Definition at line 67 of file JobHistory.h.

67 { return m_machine; }
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:36

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

Implements IVersHistoryObj.

Definition at line 77 of file JobHistory.h.

77 { return m_machine; }
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:36

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

Definition at line 64 of file JobHistory.h.

64 { return m_osname; }
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:33

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

Definition at line 66 of file JobHistory.h.

66 { return m_os_version; }
JobHistory::m_os_version
std::string m_os_version
Definition: JobHistory.h:35

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

Implements IVersHistoryObj.

Definition at line 71 of file JobHistory.h.

71 { return m_props; }
JobHistory::m_props
PropertyList m_props
Definition: JobHistory.h:40

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

Definition at line 72 of file JobHistory.h.

72 { return m_ppl; }
JobHistory::m_ppl
PropertyPairList m_ppl
Definition: JobHistory.h:41

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

Definition at line 63 of file JobHistory.h.

63 { return m_release_version; }
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:29

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

Definition at line 73 of file JobHistory.h.

73 { return m_start_time; }
JobHistory::m_start_time
time_t m_start_time
Definition: JobHistory.h:44

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

Implements IVersHistoryObj.

Definition at line 79 of file JobHistory.h.

79 { return m_osname; }
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:33

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

Implements IVersHistoryObj.

Definition at line 78 of file JobHistory.h.

78 { return m_release_version; }
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:29

## Member Data Documentation

std::string JobHistory::m_cmtconfig
| private

Definition at line 31 of file JobHistory.h.

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

Definition at line 43 of file JobHistory.h.

std::string JobHistory::m_dir
| private

Definition at line 30 of file JobHistory.h.

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

Definition at line 38 of file JobHistory.h.

std::string JobHistory::m_hostname
| private

Definition at line 34 of file JobHistory.h.

std::string JobHistory::m_machine
| private

Definition at line 36 of file JobHistory.h.

std::string JobHistory::m_os_version
| private

Definition at line 35 of file JobHistory.h.

std::string JobHistory::m_osname
| private

Definition at line 33 of file JobHistory.h.

PropertyPairList JobHistory::m_ppl
| private

Definition at line 41 of file JobHistory.h.

PropertyList JobHistory::m_props
| private

Definition at line 40 of file JobHistory.h.

std::string JobHistory::m_release_version
| private

Definition at line 29 of file JobHistory.h.

time_t JobHistory::m_start_time
| private

Definition at line 44 of file JobHistory.h.

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

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