Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:00:28

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
0003 *                                                                                   *
0004 * This software is distributed under the terms of the Apache version 2 licence,     *
0005 * copied verbatim in the file "LICENSE".                                            *
0006 *                                                                                   *
0007 * In applying this licence, CERN does not waive the privileges and immunities       *
0008 * granted to it by virtue of its status as an Intergovernmental Organization        *
0009 * or submit itself to any jurisdiction.                                             *
0010 \***********************************************************************************/
0011 #ifndef GAUDIKERNEL_ALGTOOLHISTORY_H
0012 #define GAUDIKERNEL_ALGTOOLHISTORY_H
0013 
0014 #include "GaudiKernel/HistoryObj.h"
0015 #include "GaudiKernel/IVersHistoryObj.h"
0016 
0017 class AlgTool;
0018 class JobHistory;
0019 
0020 #include <memory>
0021 #include <string>
0022 #include <vector>
0023 
0024 /** @class AlgToolHistory AlgToolHistory.h
0025  *
0026  *  AlgToolHistory class definition
0027  *
0028  *  @author: Charles Leggett
0029  *
0030  */
0031 
0032 class GAUDI_API AlgToolHistory : public HistoryObj, public IVersHistoryObj {
0033 
0034 private: // data
0035   // Algtool full type.
0036   std::string m_type;
0037 
0038   // Algtool version.
0039   std::string m_version;
0040 
0041   // Algtool name.
0042   std::string m_name;
0043 
0044   // Pointer to the algtool
0045   const AlgTool* m_tool;
0046 
0047   // Properties.
0048   PropertyList m_properties;
0049 
0050   // Link to jobHistory
0051   const JobHistory* m_jobHistory;
0052 
0053 public:
0054   AlgToolHistory( const AlgTool& alg, const JobHistory* job );
0055 
0056   AlgToolHistory( std::string algVersion, std::string algName, std::string algType, const AlgTool* tool,
0057                   const PropertyList& props, const JobHistory* job );
0058 
0059   // Class IDs
0060   const CLID&        clID() const override { return classID(); }
0061   static const CLID& classID();
0062 
0063   // Return the algtool type.
0064   const std::string& algtool_type() const { return m_type; }
0065 
0066   // Return the algtool version.
0067   const std::string& algtool_version() const { return m_version; }
0068 
0069   // Return the algtool name.
0070   const std::string& algtool_name() const { return m_name; }
0071 
0072   // Pointer to the algtool
0073   const AlgTool* algtool_instance() const { return m_tool; }
0074 
0075   // Return the algorithm properties.
0076   const PropertyList& properties() const override { return m_properties; }
0077 
0078   // Return the jobHistory
0079   const JobHistory* jobHistory() const { return m_jobHistory; }
0080 
0081   std::ostream& dump( std::ostream&, bool isXML, int indent ) const override;
0082 
0083   const std::string& name() const override { return algtool_name(); }
0084   const std::string& type() const override { return algtool_type(); }
0085   const std::string& version() const override { return algtool_version(); }
0086 
0087   friend std::ostream& operator<<( std::ostream& lhs, const AlgToolHistory& rhs ) { return rhs.dump( lhs, false, 0 ); }
0088 };
0089 
0090 #endif