| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

# JobHistory Class Reference

JobHistory class definition. More...

`#include <JobHistory.h>`

Inheritance diagram for JobHistory:
[legend]
Collaboration diagram for JobHistory:
[legend]

List of all members.

## Public Types
typedef std::vector< std::pair < std::string, const Property * > > | PropertyPairList
## Public Member Functions
| 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)
| ~JobHistory ()
virtual const CLID & | clID () const
| Retrieve reference to class definition structure.
void | addProperty (const std::string &, const Property *)
std::string | release_version () const
std::string | os () const
std::string | hostname () const
std::string | os_version () const
std::string | machine () const
std::string | dir () const
std::string | cmtconfig () const
std::vector< std::string > | environment () const
const PropertyList & | properties () const
const PropertyPairList & | propertyPairs () const
time_t | start_time () const
void | dump (std::ostream &, const bool isXML=false, int indent=0) const
const std::string & | name () const
const std::string & | version () const
const std::string & | type () const
## Static Public Member Functions
static const CLID & | classID ()
| Retrieve reference to class definition structure (static access)
## Private Attributes
std::string | m_release_version
std::string | m_dir
std::string | m_cmtconfig
std::string | m_osname
std::string | m_hostname
std::string | m_os_version
std::string | m_machine
std::vector< std::string > | m_environ
PropertyList | m_props
PropertyPairList | m_ppl
std::vector< std::string > | m_CVSid
time_t | m_start_time

## Detailed Description

JobHistory class definition.

Author:
  : Charles Leggett

Definition at line 25 of file JobHistory.h.

## Member Typedef Documentation

typedef std::vector< std::pair<std::string,const Property*> > JobHistory::PropertyPairList

Definition at line 29 of file JobHistory.h.

## Constructor & Destructor Documentation

JobHistory::JobHistory | ( | ) |

Definition at line 33 of file JobHistory.cpp.

    : m_start_time(0) {

      time(&m_start_time);

      std::string rel;

      if  ( (rel = System::getEnv("ATLAS_BASE_RELEASE")) != "UNKNOWN" ) {
        m_release_version = rel;
      } else if ( (rel = System::getEnv("GAUDIROOT")) != "UNKNOWN" ) {
        m_release_version = rel;
      } else {
        m_release_version = "UNKNOWN";
      }
      m_dir = System::getEnv("PWD");
      m_cmtconfig = System::getEnv("CMTCONFIG");

      m_osname = System::osName();
      m_hostname = System::hostName();
      m_os_version = System::osVersion();
      m_machine = System::machineType();

      m_environ = System::getEnv();

    }

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 59 of file JobHistory.cpp.

                                              :
      m_release_version(rel), m_dir(dir), m_cmtconfig(cmtconfig), m_osname(os),
      m_hostname(host),
      m_os_version(osver), m_machine(mach), m_start_time(time) {

    }

JobHistory::~JobHistory | ( | ) |

Definition at line 75 of file JobHistory.cpp.

                            {
    }

## Member Function Documentation

void JobHistory::addProperty | ( | const std::string & | client,
|  | const Property * | prop
| ) |  |

Definition at line 87 of file JobHistory.cpp.

                                                                         {
    //  if (m_props.find(prop) == m_props.end()) {
        m_ppl.push_back( std::pair<std::string, const Property*>(client,prop) );
    //  }
    }

const CLID & JobHistory::classID | ( | ) | `[static]`

Retrieve reference to class definition structure (static access)

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 79 of file JobHistory.cpp.

                        {

      static CLID CLID_JobHistory = 247994533;
      return CLID_JobHistory;

    }

virtual const CLID& JobHistory::clID | ( | ) | const`[inline, virtual]`

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 64 of file JobHistory.h.

    { return classID(); }

std::string JobHistory::cmtconfig | ( | ) | const`[inline]`

Definition at line 77 of file JobHistory.h.

    { return m_cmtconfig; }

std::string JobHistory::dir | ( | ) | const`[inline]`

Definition at line 76 of file JobHistory.h.

    { return m_dir; }

void JobHistory::dump | ( | std::ostream & | ost,
|  | const bool | isXML = `false`,
|  | int | indent = `0`
| ) |  | const`[virtual]`

Implements HistoryObj.

Definition at line 95 of file JobHistory.cpp.

                                                                         {

      if (!isXML) {
        ost << "Release: " << release_version() << endl;
        ost << "OS:      " << os() << endl;
        ost << "OS ver:  " << os_version() << endl;
        ost << "Host:    " << hostname() << endl;
        ost << "Machine: " << machine() << endl;
        ost << "Run dir: " << dir() << endl;
        ost << "CMTCONFIG: " << cmtconfig() << endl;
        ost << "Job start time: " << start_time() << endl << endl;
        ost << "Properties: [" << endl;;
        for ( JobHistory::PropertyPairList::const_iterator
                ipprop=propertyPairs().begin();
              ipprop!=propertyPairs().end(); ++ipprop ) {
          std::string client = ipprop->first;
          const Property* prop = ipprop->second;
          ost << client << ":  ";
          prop->fillStream(ost);
          ost << endl;
        }
        ost << "]" << endl;
        vector<string> env = environment();
        for (vector<string>::const_iterator itr=env.begin();  itr != env.end();
             ++itr) {
          ost << *itr << endl;
        }
      } else {

      }

    }

std::vector<std::string> JobHistory::environment | ( | ) | const`[inline]`

Definition at line 78 of file JobHistory.h.

    { return m_environ; }

std::string JobHistory::hostname | ( | ) | const`[inline]`

Definition at line 73 of file JobHistory.h.

    { return m_hostname; }

std::string JobHistory::machine | ( | ) | const`[inline]`

Definition at line 75 of file JobHistory.h.

    { return m_machine; }

const std::string& JobHistory::name | ( | ) | const`[inline, virtual]`

Implements IVersHistoryObj.

Definition at line 85 of file JobHistory.h.

    { return m_machine; }

std::string JobHistory::os | ( | ) | const`[inline]`

Definition at line 72 of file JobHistory.h.

    { return m_osname; }

std::string JobHistory::os_version | ( | ) | const`[inline]`

Definition at line 74 of file JobHistory.h.

    { return m_os_version; }

const PropertyList& JobHistory::properties | ( | ) | const`[inline, virtual]`

Implements IVersHistoryObj.

Definition at line 79 of file JobHistory.h.

    { return m_props; }

const PropertyPairList& JobHistory::propertyPairs | ( | ) | const`[inline]`

Definition at line 80 of file JobHistory.h.

    { return m_ppl; }

std::string JobHistory::release_version | ( | ) | const`[inline]`

Definition at line 71 of file JobHistory.h.

    { return m_release_version; }

time_t JobHistory::start_time | ( | ) | const`[inline]`

Definition at line 81 of file JobHistory.h.

    { return m_start_time; }

const std::string& JobHistory::type | ( | ) | const`[inline, virtual]`

Implements IVersHistoryObj.

Definition at line 87 of file JobHistory.h.

    { return m_osname; }

const std::string& JobHistory::version | ( | ) | const`[inline, virtual]`

Implements IVersHistoryObj.

Definition at line 86 of file JobHistory.h.

    { return m_release_version;}

## Member Data Documentation

std::string JobHistory::m_cmtconfig`[private]`

Definition at line 35 of file JobHistory.h.

std::vector<std::string> JobHistory::m_CVSid`[private]`

Definition at line 47 of file JobHistory.h.

std::string JobHistory::m_dir`[private]`

Definition at line 34 of file JobHistory.h.

std::vector<std::string> JobHistory::m_environ`[private]`

Definition at line 42 of file JobHistory.h.

std::string JobHistory::m_hostname`[private]`

Definition at line 38 of file JobHistory.h.

std::string JobHistory::m_machine`[private]`

Definition at line 40 of file JobHistory.h.

std::string JobHistory::m_os_version`[private]`

Definition at line 39 of file JobHistory.h.

std::string JobHistory::m_osname`[private]`

Definition at line 37 of file JobHistory.h.

PropertyPairList JobHistory::m_ppl`[private]`

Definition at line 45 of file JobHistory.h.

PropertyList JobHistory::m_props`[private]`

Definition at line 44 of file JobHistory.h.

std::string JobHistory::m_release_version`[private]`

Definition at line 33 of file JobHistory.h.

time_t JobHistory::m_start_time`[private]`

Definition at line 48 of file JobHistory.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiKernel/GaudiKernel/JobHistory.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiKernel/src/Lib/JobHistory.cpp

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