| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

# JobHistory.h

Go to the documentation of this file.

    00001 // $Id: JobHistory.h,v 1.1 2006/11/09 10:24:05 mato Exp $
    00002
    00003 #ifndef GAUDIKERNEL_JOBHISTORY_H
    00004 #define GAUDIKERNEL_JOBHISTORY_H
    00005
    00006 #include "GaudiKernel/HistoryObj.h"
    00007 #include "GaudiKernel/IVersHistoryObj.h"
    00008
    00009 #include <string>
    00010 #include <vector>
    00011 #include <utility>
    00012 #include <iosfwd>
    00013 #include <ctime>
    00014
    00023 class Property;
    00024
    00025 class GAUDI_API JobHistory: public HistoryObj, virtual public IVersHistoryObj {
    00026
    00027 public:
    00028
    00029   typedef std::vector< std::pair<std::string,const Property*> > PropertyPairList;
    00030
    00031 private:  // data
    00032
    00033   std::string m_release_version;
    00034   std::string m_dir;
    00035   std::string m_cmtconfig;
    00036
    00037   std::string m_osname;
    00038   std::string m_hostname;
    00039   std::string m_os_version;
    00040   std::string m_machine;
    00041
    00042   std::vector<std::string> m_environ;
    00043
    00044   PropertyList m_props;
    00045   PropertyPairList m_ppl;
    00046
    00047   std::vector<std::string> m_CVSid;
    00048   time_t m_start_time;
    00049
    00050 public:  // functions
    00051
    00052   // Constructor.
    00053   JobHistory();
    00054   JobHistory(const std::string& rel, const std::string& os,
    00055              const std::string& host, const std::string& dir,
    00056              const std::string& osver, const std::string& mach,
    00057              const std::string& cmtconfig,
    00058              const time_t& time);
    00059
    00060   // Destructor.
    00061   ~JobHistory();
    00062
    00063   // Class IDs
    00064   virtual const CLID& clID() const { return classID(); }
    00065   static const CLID& classID();
    00066
    00067   // add a global property
    00068   void addProperty( const std::string&, const Property* );
    00069
    00070   // Return the job history data.
    00071   std::string release_version() const { return m_release_version; }
    00072   std::string os() const { return m_osname; }
    00073   std::string hostname() const { return m_hostname; }
    00074   std::string os_version() const { return m_os_version; }
    00075   std::string machine() const { return m_machine; }
    00076   std::string dir() const { return m_dir; }
    00077   std::string cmtconfig() const { return m_cmtconfig; }
    00078   std::vector<std::string> environment() const { return m_environ; }
    00079   const PropertyList& properties() const { return m_props; }
    00080   const PropertyPairList& propertyPairs() const { return m_ppl; }
    00081   time_t start_time() const { return m_start_time; }
    00082
    00083   void dump(std::ostream &, const bool isXML=false, int indent=0) const;
    00084
    00085   const std::string& name() const { return m_machine; }
    00086   const std::string& version() const { return m_release_version;}
    00087   const std::string& type() const { return m_osname; }
    00088
    00089 private:
    00090
    00091 };
    00092
    00093 // Output stream.
    00094 GAUDI_API std::ostream& operator<<(std::ostream& lhs, const JobHistory& rhs);
    00095
    00096 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines