| The Gaudi Framework v27r1

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