| The Gaudi Framework v29r0 (ff2e7097)

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

- File List
- File Members

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