| The Gaudi Framework v32r1 (f65d50dc)

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

## ◆ PropertyPairList

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

Definition at line 25 of file JobHistory.h.

## Constructor & Destructor Documentation

## ◆ JobHistory() [1/2]

JobHistory::JobHistory | ( |  | ) |

Definition at line 33 of file JobHistory.cpp.

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

## ◆ JobHistory() [2/2]

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.

60 : m_release_version( rel )
61 , m_dir( dir )
62 , m_cmtconfig( cmtconfig )
63 , m_osname( os )
64 , m_hostname( host )
65 , m_os_version( osver )
66 , m_machine( mach )
67 , m_start_time( time ) {}
plotSpeedupsPyRoot.time
def time
Definition: plotSpeedupsPyRoot.py:152
JobHistory::m_dir
std::string m_dir
Definition: JobHistory.h:29
JobHistory::m_os_version
std::string m_os_version
Definition: JobHistory.h:34
JobHistory::os
std::string os() const
Definition: JobHistory.h:63
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:32
JobHistory::dir
std::string dir() const
Definition: JobHistory.h:67
JobHistory::m_hostname
std::string m_hostname
Definition: JobHistory.h:33
JobHistory::m_start_time
time_t m_start_time
Definition: JobHistory.h:43
JobHistory::cmtconfig
std::string cmtconfig() const
Definition: JobHistory.h:68
JobHistory::m_cmtconfig
std::string m_cmtconfig
Definition: JobHistory.h:30
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:35
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:28

## ◆ ~JobHistory()

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

## Member Function Documentation

## ◆ addProperty()

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

Definition at line 81 of file JobHistory.cpp.

81 {
82 // if (m_props.find(prop) == m_props.end())
83 m_ppl.emplace_back( client, prop );
84 }
JobHistory::m_ppl
PropertyPairList m_ppl
Definition: JobHistory.h:40
std::vector::emplace_back
T emplace_back(T... args)

## ◆ classID()

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

Definition at line 75 of file JobHistory.cpp.

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

## ◆ clID()

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

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

## ◆ cmtconfig()

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

Definition at line 68 of file JobHistory.h.

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

## ◆ dir()

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

Definition at line 67 of file JobHistory.h.

67 { return m_dir; }
JobHistory::m_dir
std::string m_dir
Definition: JobHistory.h:29

## ◆ dump()

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

Implements HistoryObj.

Definition at line 86 of file JobHistory.cpp.

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

## ◆ environment()

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

Definition at line 69 of file JobHistory.h.

69 { return m_environ; }
JobHistory::m_environ
std::vector< std::string > m_environ
Definition: JobHistory.h:37

## ◆ hostname()

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

Definition at line 64 of file JobHistory.h.

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

## ◆ machine()

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

Definition at line 66 of file JobHistory.h.

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

## ◆ name()

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

Implements IVersHistoryObj.

Definition at line 76 of file JobHistory.h.

76 { return m_machine; }
JobHistory::m_machine
std::string m_machine
Definition: JobHistory.h:35

## ◆ os()

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

Definition at line 63 of file JobHistory.h.

63 { return m_osname; }
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:32

## ◆ os_version()

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

Definition at line 65 of file JobHistory.h.

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

## ◆ properties()

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

Implements IVersHistoryObj.

Definition at line 70 of file JobHistory.h.

70 { return m_props; }
JobHistory::m_props
PropertyList m_props
Definition: JobHistory.h:39

## ◆ propertyPairs()

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

Definition at line 71 of file JobHistory.h.

71 { return m_ppl; }
JobHistory::m_ppl
PropertyPairList m_ppl
Definition: JobHistory.h:40

## ◆ release_version()

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

Definition at line 62 of file JobHistory.h.

62 { return m_release_version; }
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:28

## ◆ start_time()

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

Definition at line 72 of file JobHistory.h.

72 { return m_start_time; }
JobHistory::m_start_time
time_t m_start_time
Definition: JobHistory.h:43

## ◆ type()

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

Implements IVersHistoryObj.

Definition at line 78 of file JobHistory.h.

78 { return m_osname; }
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:32

## ◆ version()

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

Implements IVersHistoryObj.

Definition at line 77 of file JobHistory.h.

77 { return m_release_version; }
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:28

## Member Data Documentation

## ◆ m_cmtconfig

std::string JobHistory::m_cmtconfig
| private

Definition at line 30 of file JobHistory.h.

## ◆ m_CVSid

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

Definition at line 42 of file JobHistory.h.

## ◆ m_dir

std::string JobHistory::m_dir
| private

Definition at line 29 of file JobHistory.h.

## ◆ m_environ

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

Definition at line 37 of file JobHistory.h.

## ◆ m_hostname

std::string JobHistory::m_hostname
| private

Definition at line 33 of file JobHistory.h.

## ◆ m_machine

std::string JobHistory::m_machine
| private

Definition at line 35 of file JobHistory.h.

## ◆ m_os_version

std::string JobHistory::m_os_version
| private

Definition at line 34 of file JobHistory.h.

## ◆ m_osname

std::string JobHistory::m_osname
| private

Definition at line 32 of file JobHistory.h.

## ◆ m_ppl

PropertyPairList JobHistory::m_ppl
| private

Definition at line 40 of file JobHistory.h.

## ◆ m_props

PropertyList JobHistory::m_props
| private

Definition at line 39 of file JobHistory.h.

## ◆ m_release_version

std::string JobHistory::m_release_version
| private

Definition at line 28 of file JobHistory.h.

## ◆ m_start_time

time_t JobHistory::m_start_time
| private

Definition at line 43 of file JobHistory.h.

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

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