| The Gaudi Framework v32r1 (f65d50dc)

JobHistory.h
Go to the documentation of this file.
1
2 #ifndef GAUDIKERNEL_JOBHISTORY_H
3 #define GAUDIKERNEL_JOBHISTORY_H
4
5 #include "GaudiKernel/HistoryObj.h"
6 #include "GaudiKernel/IVersHistoryObj.h"
7 #include "GaudiKernel/PropertyFwd.h"
8
9 #include <ctime>
10 #include <iosfwd>
11 #include <string>
12 #include <utility>
13 #include <vector>
14
22 class GAUDI_API JobHistory : public HistoryObj, virtual public IVersHistoryObj {
23
24 public:
25 typedef std::vector<std::pair<std::string, const Gaudi::Details::PropertyBase*>> PropertyPairList;
26
27 private: // data
28 std::string m_release_version;
29 std::string m_dir;
30 std::string m_cmtconfig;
31
32 std::string m_osname;
33 std::string m_hostname;
34 std::string m_os_version;
35 std::string m_machine;
36
37 std::vector<std::string> m_environ;
38
39 PropertyList m_props;
40 PropertyPairList m_ppl;
41
42 std::vector<std::string> m_CVSid;
43 time_t m_start_time;
44
45 public: // functions
46 // Constructor.
47 JobHistory();
48 JobHistory( const std::string& rel, const std::string& os, const std::string& host, const std::string& dir,
49 const std::string& osver, const std::string& mach, const std::string& cmtconfig, const time_t& time );
50
51 // Destructor.
52 virtual ~JobHistory();
53
54 // Class IDs
55 const CLID& clID() const override { return classID(); }
56 static const CLID& classID();
57
58 // add a global property
59 void addProperty( const std::string&, const Gaudi::Details::PropertyBase* );
60
61 // Return the job history data.
62 std::string release_version() const { return m_release_version; }
63 std::string os() const { return m_osname; }
64 std::string hostname() const { return m_hostname; }
65 std::string os_version() const { return m_os_version; }
66 std::string machine() const { return m_machine; }
67 std::string dir() const { return m_dir; }
68 std::string cmtconfig() const { return m_cmtconfig; }
69 std::vector<std::string> environment() const { return m_environ; }
70 const PropertyList& properties() const override { return m_props; }
71 const PropertyPairList& propertyPairs() const { return m_ppl; }
72 time_t start_time() const { return m_start_time; }
73
74 void dump( std::ostream&, const bool isXML = false, int indent = 0 ) const override;
75
76 const std::string& name() const override { return m_machine; }
77 const std::string& version() const override { return m_release_version; }
78 const std::string& type() const override { return m_osname; }
79
80 private:
81 };
82
83 // Output stream.
84 GAUDI_API std::ostream& operator<<( std::ostream& lhs, const JobHistory& rhs );
85
86 #endif
plotSpeedupsPyRoot.time
def time
Definition: plotSpeedupsPyRoot.py:152
JobHistory::m_ppl
PropertyPairList m_ppl
Definition: JobHistory.h:40
JobHistory::m_CVSid
std::vector< std::string > m_CVSid
Definition: JobHistory.h:42
JobHistory::m_dir
std::string m_dir
Definition: JobHistory.h:29
JobHistory::properties
const PropertyList & properties() const override
Definition: JobHistory.h:70
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:55
HistoryObj::dump
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
JobHistory::m_os_version
std::string m_os_version
Definition: JobHistory.h:34
JobHistory::os
std::string os() const
Definition: JobHistory.h:63
JobHistory::machine
std::string machine() const
Definition: JobHistory.h:66
JobHistory::m_osname
std::string m_osname
Definition: JobHistory.h:32
JobHistory::dir
std::string dir() const
Definition: JobHistory.h:67
HistoryObj
Base class for History Objects.
Definition: HistoryObj.h:21
HistoryObj.h
JobHistory::m_hostname
std::string m_hostname
Definition: JobHistory.h:33
JobHistory::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: JobHistory.h:55
JobHistory::PropertyPairList
std::vector< std::pair< std::string, const Gaudi::Details::PropertyBase * > > PropertyPairList
Definition: JobHistory.h:25
JobHistory::environment
std::vector< std::string > environment() const
Definition: JobHistory.h:69
JobHistory
JobHistory class definition.
Definition: JobHistory.h:22
IVersHistoryObj.h
JobHistory::start_time
time_t start_time() const
Definition: JobHistory.h:72
std::string
STL class.
PropertyFwd.h
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::hostname
std::string hostname() const
Definition: JobHistory.h:64
operator<<
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const JobHistory &rhs)
Definition: JobHistory.cpp:118
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::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
JobHistory::version
const std::string & version() const override
Definition: JobHistory.h:77
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
JobHistory::m_release_version
std::string m_release_version
Definition: JobHistory.h:28
std::vector
STL class.
JobHistory::propertyPairs
const PropertyPairList & propertyPairs() const
Definition: JobHistory.h:71
JobHistory::type
const std::string & type() const override
Definition: JobHistory.h:78
JobHistory::m_props
PropertyList m_props
Definition: JobHistory.h:39
IVersHistoryObj
Interface for Versioned History Objects.
Definition: IVersHistoryObj.h:18
JobHistory::name
const std::string & name() const override
Definition: JobHistory.h:76
JobHistory::release_version
std::string release_version() const
Definition: JobHistory.h:62
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
std::ostream
STL class.