| # Gaudi Framework, version v21r11 |

Home |  | Generated: 30 Sep 2010

# AlgToolHistory.cpp

Go to the documentation of this file.

    00001
    00002 //
    00003 // $Id: AlgToolHistory.cpp,v 1.1 2006/11/09 10:24:05 mato Exp $
    00004 //
    00005 // GaudiHistory/AlgToolHistory.cpp
    00006 //
    00007 // Contains history information for an AlgTool
    00008 //
    00009 //
    00010 // @author: Charles Leggett
    00011 //
    00013
    00014 #include "GaudiKernel/AlgToolHistory.h"
    00015 #include "GaudiKernel/JobHistory.h"
    00016 #include "GaudiKernel/AlgTool.h"
    00017
    00018 #include <iostream>
    00019
    00020 using std::ostream;
    00021 using std::endl;
    00022
    00023 AlgToolHistory::AlgToolHistory(const AlgTool& alg, const JobHistory* job)
    00024 :
    00025   m_type(alg.type()),
    00026   m_version("UNKNOWN"),
    00027   m_name(alg.name()),
    00028   m_tool( &alg ),
    00029   m_properties(alg.getProperties()),
    00030   m_jobHistory(job)
    00031 {
    00032 }
    00033
    00034 //**********************************************************************
    00035
    00036 AlgToolHistory::AlgToolHistory(const std::string& algVersion,
    00037                                const std::string& algName,
    00038                                const std::string& algType,
    00039                                const AlgTool* tool,
    00040                                const PropertyList& props,
    00041                                const JobHistory* job):
    00042   m_type(algType),   // FIXME type_info???
    00043   m_version(algVersion),
    00044   m_name(algName),
    00045   m_tool(tool),
    00046   m_properties(props),
    00047   m_jobHistory(job)
    00048 {}
    00049
    00050 //**********************************************************************
    00051
    00052 const CLID& AlgToolHistory::classID() {
    00053
    00054   static CLID CLID_AlgToolHistory = 171959758;   // from `clid AlgToolHistory`
    00055   return CLID_AlgToolHistory;
    00056
    00057 }
    00058
    00059 //**********************************************************************
    00060
    00061 ostream& operator<<(ostream& lhs, const AlgToolHistory& rhs) {
    00062   lhs << "Type: " << rhs.algtool_type() << endl;
    00063   lhs << "Name: " << rhs.algtool_name() << endl;
    00064   lhs << "Version: " << rhs.algtool_version() << endl;
    00065   lhs << "Parent: " << rhs.algtool_instance()->name() << endl;
    00066   // Properties.
    00067   lhs << "Properties: [" << endl;;
    00068   for ( AlgToolHistory::PropertyList::const_iterator
    00069         ipprop=rhs.properties().begin();
    00070         ipprop!=rhs.properties().end(); ++ipprop ) {
    00071     const Property& prop = **ipprop;
    00072     prop.fillStream(lhs);
    00073     lhs << endl;
    00074   }
    00075   lhs << "]" << endl;
    00076   return lhs;
    00077 }