| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

# DataHistory.h

Go to the documentation of this file.

    00001 // $Id: DataHistory.h,v 1.1 2006/11/09 10:24:05 mato Exp $
    00002
    00003 #ifndef GAUDIKERNEL_DATAHISTORY_H
    00004 #define GAUDIKERNEL_DATAHISTORY_H
    00005
    00006 // History for an event data object.
    00007
    00008 #include "GaudiKernel/HistoryObj.h"
    00009
    00010 #include <vector>
    00011 #include <string>
    00012 #include <iostream>
    00013 #include "GaudiKernel/StatusCode.h"
    00014 #include "GaudiKernel/ClassID.h"
    00015
    00016 class AlgorithmHistory;
    00017
    00025 class GAUDI_API DataHistory: public HistoryObj {
    00026
    00027 public:
    00028
    00029   class DataHistoryOrder {
    00030   public:
    00031     bool operator() ( const DataHistory* lhs, const DataHistory* rhs ) const {
    00032       if (lhs->m_dataClassID == rhs->m_dataClassID) {
    00033         if (lhs->m_dataKey == rhs->m_dataKey) {
    00034           return ( lhs->m_algHist < rhs->m_algHist );
    00035         } else {
    00036           return ( lhs->m_dataKey < rhs->m_dataKey );
    00037         }
    00038       } else {
    00039         return (lhs->m_dataClassID < rhs->m_dataClassID);
    00040       }
    00041
    00042     }
    00043     bool operator() ( const DataHistory& lhs, const DataHistory& rhs ) const {
    00044       if (lhs.m_dataClassID == rhs.m_dataClassID) {
    00045         if (lhs.m_dataKey == rhs.m_dataKey) {
    00046           return ( lhs.m_algHist < rhs.m_algHist );
    00047         } else {
    00048           return ( lhs.m_dataKey < rhs.m_dataKey );
    00049         }
    00050       } else {
    00051         return (lhs.m_dataClassID < rhs.m_dataClassID);
    00052       }
    00053     }
    00054   };
    00055
    00056   DataHistory(const CLID& id, const std::string& key, AlgorithmHistory* alg);
    00057
    00058   ~DataHistory(){};
    00059
    00060   virtual const CLID& clID() const { return DataHistory::classID(); }
    00061   static const CLID& classID();
    00062
    00063
    00064   std::string dataKey() const { return m_dataKey; }
    00065   const CLID& dataClassID() const { return m_dataClassID; }
    00066
    00067   AlgorithmHistory* algorithmHistory() const { return m_algHist; }
    00068
    00069
    00070 private:
    00071
    00072   CLID m_dataClassID;
    00073   std::string m_dataKey;
    00074   AlgorithmHistory* m_algHist;
    00075
    00076
    00077 };
    00078
    00079 GAUDI_API std::ostream& operator<<(std::ostream& lhs, const DataHistory& rhs);
    00080
    00081 #endif