JobHistory class definition.
More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/JobHistory.h>
|
| 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.
|
|
void | addProperty (const std::string &key, const std::string &value) |
|
const std::string & | release_version () const |
|
const std::string & | os () const |
|
const std::string & | hostname () const |
|
const std::string & | os_version () const |
|
const std::string & | machine () const |
|
const std::string & | dir () const |
|
const std::string & | cmtconfig () const |
|
const std::vector< std::string > & | environment () const |
|
const PropertyList & | properties () const override |
|
const PropertyPairList & | propertyPairs () const |
|
time_t | start_time () const |
|
std::ostream & | dump (std::ostream &, bool isXML, int indent) const override |
|
const std::string & | name () const override |
|
const std::string & | version () const override |
|
const std::string & | type () const override |
|
virtual | ~HistoryObj ()=default |
|
| DataObject () |
| Standard Constructor.
|
|
| DataObject (const DataObject &rhs) |
| Copy Constructor.
|
|
DataObject & | operator= (const DataObject &rhs) |
| Assignment Operator.
|
|
| DataObject (DataObject &&rhs) |
| Move Constructor.
|
|
DataObject & | operator= (DataObject &&rhs) |
| Move Assignment Operator.
|
|
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 () |
| Retrieve Link manager.
|
|
const LinkManager * | linkMgr () const |
|
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)
|
|
virtual | ~IVersHistoryObj ()=default |
|
|
virtual void | indent (std::ostream &, int) const |
|
JobHistory class definition.
- Author
- : Charles Leggett
Definition at line 32 of file JobHistory.h.
◆ PropertyPairList
◆ JobHistory() [1/2]
JobHistory::JobHistory |
( |
| ) |
|
Definition at line 20 of file JobHistory.cpp.
21
23
24 std::string rel;
25
26 if ( ( rel =
System::getEnv(
"ATLAS_BASE_RELEASE" ) ) !=
"UNKNOWN" ) {
28 }
else if ( ( rel =
System::getEnv(
"GAUDIROOT" ) ) !=
"UNKNOWN" ) {
30 } else {
32 }
35
40
42}
std::string m_release_version
std::vector< std::string > m_environ
GAUDI_API const std::string & osName()
OS name.
GAUDI_API const std::string & machineType()
Machine type.
GAUDI_API std::vector< std::string > getEnv()
get all environment variables
GAUDI_API const std::string & hostName()
Host name.
GAUDI_API const std::string & osVersion()
OS version.
◆ 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 44 of file JobHistory.cpp.
const std::string & os() const
const std::string & dir() const
const std::string & cmtconfig() const
◆ ~JobHistory()
JobHistory::~JobHistory |
( |
| ) |
|
|
virtualdefault |
◆ addProperty()
void JobHistory::addProperty |
( |
const std::string & | key, |
|
|
const std::string & | value ) |
\fixme strip optional quotes around the string
Definition at line 64 of file JobHistory.cpp.
64 {
66 std::string prop_value = value;
67 if ( !prop_value.empty() && prop_value[0] == '"' && prop_value[prop_value.size() - 1] == '"' )
68 prop_value = prop_value.substr( 1, prop_value.size() - 2 );
69
70 std::string client, prop_name;
71 auto pos =
key.rfind(
'.' );
72 if ( pos == std::string::npos ) {
74 } else {
75 client =
key.substr( 0, pos );
76 prop_name =
key.substr( pos + 1 );
77 }
78
79 m_ppl.emplace_back( client, std::make_unique<Gaudi::Property<std::string>>( prop_name, prop_value ) );
80}
◆ classID()
const CLID & JobHistory::classID |
( |
| ) |
|
|
static |
Definition at line 58 of file JobHistory.cpp.
58 {
59
60 static const CLID CLID_JobHistory = 247994533;
61 return CLID_JobHistory;
62}
unsigned int CLID
Class ID definition.
◆ clID()
const CLID & JobHistory::clID |
( |
| ) |
const |
|
inlineoverridevirtual |
Retrieve reference to class definition structure.
Retrieve Pointer to class definition structure.
Reimplemented from HistoryObj.
Definition at line 65 of file JobHistory.h.
static const CLID & classID()
◆ cmtconfig()
const std::string & JobHistory::cmtconfig |
( |
| ) |
const |
|
inline |
◆ dir()
const std::string & JobHistory::dir |
( |
| ) |
const |
|
inline |
◆ dump()
std::ostream & JobHistory::dump |
( |
std::ostream & | ost, |
|
|
bool | isXML, |
|
|
int | indent ) const |
|
overridevirtual |
Implements HistoryObj.
Definition at line 82 of file JobHistory.cpp.
82 {
83
84 if ( !isXML ) {
86 ost <<
"OS: " <<
os() << endl;
88 ost <<
"Host: " <<
hostname() << endl;
89 ost <<
"Machine: " <<
machine() << endl;
90 ost <<
"Run dir: " <<
dir() << endl;
91 ost <<
"CMTCONFIG: " <<
cmtconfig() << endl;
92 ost <<
"Job start time: " <<
start_time() << endl << endl;
93 ost << "Properties: [" << endl;
94 ;
96 const auto& client = ipprop.first;
97 const auto& prop = ipprop.second;
98 ost << client << ": ";
99 prop->fillStream( ost );
100 ost << endl;
101 }
102 ost << "]" << endl;
103 for (
const auto& itr :
environment() ) ost << itr << endl;
104 } else {
105 }
106
107 return ost;
108}
time_t start_time() const
const std::string & machine() const
const std::vector< std::string > & environment() const
const std::string & release_version() const
const PropertyPairList & propertyPairs() const
const std::string & hostname() const
const std::string & os_version() const
◆ environment()
const std::vector< std::string > & JobHistory::environment |
( |
| ) |
const |
|
inline |
◆ hostname()
const std::string & JobHistory::hostname |
( |
| ) |
const |
|
inline |
◆ machine()
const std::string & JobHistory::machine |
( |
| ) |
const |
|
inline |
◆ name()
const std::string & JobHistory::name |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ os()
const std::string & JobHistory::os |
( |
| ) |
const |
|
inline |
◆ os_version()
const std::string & JobHistory::os_version |
( |
| ) |
const |
|
inline |
◆ properties()
◆ propertyPairs()
◆ release_version()
const std::string & JobHistory::release_version |
( |
| ) |
const |
|
inline |
◆ start_time()
time_t JobHistory::start_time |
( |
| ) |
const |
|
inline |
◆ type()
const std::string & JobHistory::type |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ version()
const std::string & JobHistory::version |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | lhs, |
|
|
const JobHistory & | rhs ) |
|
friend |
Definition at line 91 of file JobHistory.h.
91{
return rhs.
dump( lhs,
false, 0 ); }
std::ostream & dump(std::ostream &, bool isXML, int indent) const override
◆ m_cmtconfig
std::string JobHistory::m_cmtconfig |
|
private |
◆ m_CVSid
std::vector<std::string> JobHistory::m_CVSid |
|
private |
◆ m_dir
std::string JobHistory::m_dir |
|
private |
◆ m_environ
std::vector<std::string> JobHistory::m_environ |
|
private |
◆ m_hostname
std::string JobHistory::m_hostname |
|
private |
◆ m_machine
std::string JobHistory::m_machine |
|
private |
◆ m_os_version
std::string JobHistory::m_os_version |
|
private |
◆ m_osname
std::string JobHistory::m_osname |
|
private |
◆ m_ppl
◆ m_props
◆ m_release_version
std::string JobHistory::m_release_version |
|
private |
◆ m_start_time
time_t JobHistory::m_start_time |
|
private |
The documentation for this class was generated from the following files: