| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

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

# AlgorithmHistory Class Reference

AlgorithmHistory class definition. More...

`#include <AlgorithmHistory.h>`

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

List of all members.

## Public Types
typedef std::vector< const AlgorithmHistory * > | HistoryList
## Public Member Functions
| AlgorithmHistory (const Algorithm &alg, const JobHistory *job)
| AlgorithmHistory (const std::string &algVersion, const std::string &algName, const std::string &algType, const PropertyList &props, const HistoryList &subHists)
virtual | ~AlgorithmHistory ()
virtual const CLID & | clID () const
| Retrieve reference to class definition structure.
const std::string & | algorithm_type () const
const std::string & | algorithm_version () const
const std::string & | algorithm_name () const
const Algorithm * | algorithm () const
const PropertyList & | properties () const
const HistoryList & | subalgorithm_histories () const
const JobHistory * | jobHistory () const
void | dump (std::ostream &, const bool isXML=false, int indent=0) const
const std::string & | name () const
const std::string & | type () const
const std::string & | version () const
## Static Public Member Functions
static const CLID & | classID ()
| Retrieve reference to class definition structure (static access)
## Private Attributes
std::string | m_algorithm_type
std::string | m_algorithm_version
std::string | m_algorithm_name
const Algorithm * | m_algorithm
PropertyList | m_properties
HistoryList | m_subalgorithm_histories
const JobHistory * | m_jobHistory

## Detailed Description

AlgorithmHistory class definition.

Author:
  : Charles Leggett

Definition at line 29 of file AlgorithmHistory.h.

## Member Typedef Documentation

typedef std::vector<const AlgorithmHistory*> AlgorithmHistory::HistoryList

Definition at line 34 of file AlgorithmHistory.h.

## Constructor & Destructor Documentation

AlgorithmHistory::AlgorithmHistory | ( | const Algorithm & | alg,
|  | const JobHistory * | job
| ) |  | `[explicit]`

Definition at line 32 of file AlgorithmHistory.cpp.

    :
      m_algorithm_type(System::typeinfoName(typeid(alg))),
      m_algorithm_version(alg.version()),
      m_algorithm_name(alg.name()),
      m_algorithm( &alg ),
      m_properties(alg.getProperties()),
      m_jobHistory(job)
    {
      assert( alg.subAlgorithms() != 0 );

      for ( vector<Algorithm*>::const_iterator
            ialg=alg.subAlgorithms()->begin();
            ialg!=alg.subAlgorithms()->end(); ++ ialg ) {
        m_subalgorithm_histories.push_back(new AlgorithmHistory(**ialg, job));
      }
    }

AlgorithmHistory::AlgorithmHistory | ( | const std::string & | algVersion,
|  | const std::string & | algName,
|  | const std::string & | algType,
|  | const PropertyList & | props,
|  | const HistoryList & | subHists
| ) |  | `[explicit]`

AlgorithmHistory::~AlgorithmHistory | ( | ) | `[virtual]`

Definition at line 68 of file AlgorithmHistory.cpp.

                                        {
      for ( HistoryList::const_iterator
            iphist=m_subalgorithm_histories.begin();
            iphist!=m_subalgorithm_histories.end(); ++iphist ) {
        delete *iphist;
      }
    }

## Member Function Documentation

const Algorithm* AlgorithmHistory::algorithm | ( | ) | const`[inline]`

Definition at line 87 of file AlgorithmHistory.h.

    { return m_algorithm; }

const std::string& AlgorithmHistory::algorithm_name | ( | ) | const`[inline]`

Definition at line 84 of file AlgorithmHistory.h.

    { return m_algorithm_name; }

const std::string& AlgorithmHistory::algorithm_type | ( | ) | const`[inline]`

Definition at line 78 of file AlgorithmHistory.h.

    { return m_algorithm_type; }

const std::string& AlgorithmHistory::algorithm_version | ( | ) | const`[inline]`

Definition at line 81 of file AlgorithmHistory.h.

    { return m_algorithm_version; }

const CLID & AlgorithmHistory::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 AlgorithmHistory.cpp.

                              {

      static CLID CLID_AlgorithmHistory = 56809101;  //from `clid AlgorithmHistory`
      return CLID_AlgorithmHistory;

    }

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

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented from HistoryObj.

Definition at line 74 of file AlgorithmHistory.h.

    { return classID(); }

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

Implements HistoryObj.

Definition at line 89 of file AlgorithmHistory.cpp.

                                                                           {

      if (!isXML) {
        ost << "Type: " << algorithm_type() << endl;
        ost << "Name: " << algorithm_name() << endl;
        ost << "Version: " << algorithm_version() << endl;
        // Properties.
        ost << "Properties: [" << endl;;
        for ( AlgorithmHistory::PropertyList::const_iterator
                ipprop=properties().begin();
              ipprop!=properties().end(); ++ipprop ) {
          const Property& prop = **ipprop;
          prop.fillStream(ost);
          ost << endl;
        }
        ost << "]" << endl;
        // Subalgorithms.
        if ( subalgorithm_histories().size() == 0 ) {
          ost << "No subalgorithms.";
        } else {
          ost << "Subalgorithms: {" << endl;
          for ( AlgorithmHistory::HistoryList::const_iterator
                  iphist=subalgorithm_histories().begin();
                iphist!=subalgorithm_histories().end(); ++iphist ) {
            if ( iphist==subalgorithm_histories().begin() ) {
              ost << "----------" << endl;
            }
            ost << **iphist << endl;
            ost << "----------" << endl;
          }
          ost << "}";
        }
      } else {
        ind += 2;
        indent(ost,ind);
        ost << "<COMPONENT name=\"" << algorithm_name()
            << "\" class=\"" << convert_string(algorithm_type())
            << "\" version=\"" << algorithm_version()
            << "\">" << std::endl;

        for ( AlgorithmHistory::PropertyList::const_iterator
                ipprop=properties().begin();
              ipprop!=properties().end(); ++ipprop ) {
          const Property& prop = **ipprop;
          indent(ost,ind+2);
          ost << "<PROPERTY name=\"" << prop.name()
              << "\" value=\"" << convert_string(prop.toString())
              << "\" documentation=\"" << convert_string(prop.documentation())
              << "\">" << std::endl;
        }

        // Subalgs
        if ( subalgorithm_histories().size() != 0 ) {
          for ( AlgorithmHistory::HistoryList::const_iterator
                  iphist=subalgorithm_histories().begin();
                iphist!=subalgorithm_histories().end(); ++iphist ) {
            (*iphist)->dump(ost,isXML,ind+2);
          }

        }

        indent(ost,ind);
        ost << "</COMPONENT>" << std::endl;

      }
    }

const JobHistory* AlgorithmHistory::jobHistory | ( | ) | const`[inline]`

Definition at line 97 of file AlgorithmHistory.h.

    { return m_jobHistory; }

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

Implements IVersHistoryObj.

Definition at line 102 of file AlgorithmHistory.h.

    { return algorithm_name(); }

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

Implements IVersHistoryObj.

Definition at line 90 of file AlgorithmHistory.h.

    { return m_properties; }

const HistoryList& AlgorithmHistory::subalgorithm_histories | ( | ) | const`[inline]`

Definition at line 93 of file AlgorithmHistory.h.

        { return m_subalgorithm_histories; }

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

Implements IVersHistoryObj.

Definition at line 103 of file AlgorithmHistory.h.

    { return algorithm_type(); }

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

Implements IVersHistoryObj.

Definition at line 104 of file AlgorithmHistory.h.

    { return algorithm_version(); }

## Member Data Documentation

const Algorithm* AlgorithmHistory::m_algorithm`[private]`

Definition at line 48 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_name`[private]`

Definition at line 45 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_type`[private]`

Definition at line 39 of file AlgorithmHistory.h.

std::string AlgorithmHistory::m_algorithm_version`[private]`

Definition at line 42 of file AlgorithmHistory.h.

const JobHistory* AlgorithmHistory::m_jobHistory`[private]`

Definition at line 57 of file AlgorithmHistory.h.

PropertyList AlgorithmHistory::m_properties`[private]`

Definition at line 51 of file AlgorithmHistory.h.

HistoryList AlgorithmHistory::m_subalgorithm_histories`[private]`

Definition at line 54 of file AlgorithmHistory.h.

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

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

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