Back to home page

EIC code displayed by LXR

 
 

    


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

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_SERVICEHISTORY_H
0012 #define GAUDIKERNEL_SERVICEHISTORY_H
0013 
0014 #include "GaudiKernel/HistoryObj.h"
0015 #include "GaudiKernel/IVersHistoryObj.h"
0016 
0017 #include <string>
0018 #include <vector>
0019 
0020 class IService;
0021 class JobHistory;
0022 
0023 /** @class ServiceHistory ServiceHistory.h
0024  *
0025  *  ServiceHistory class definition
0026  *
0027  *  @author: Charles Leggett
0028  *
0029  */
0030 
0031 class GAUDI_API ServiceHistory : public HistoryObj, public IVersHistoryObj {
0032 
0033 public:
0034   ServiceHistory();
0035   ServiceHistory( const IService*, const JobHistory* );
0036   ServiceHistory( const IService&, const JobHistory* );
0037 
0038   // Class IDs
0039   const CLID&        clID() const override { return classID(); }
0040   static const CLID& classID();
0041 
0042   // Return the service properties.
0043   const PropertyList& properties() const override { return m_properties; }
0044 
0045   const IService* service() const { return m_pService; }
0046 
0047   const JobHistory* jobHistory() const { return m_jobHistory; }
0048 
0049   std::ostream& dump( std::ostream&, const bool isXML, int indent ) const override;
0050 
0051   const std::string& name() const override { return m_name; }
0052   const std::string& type() const override { return m_type; }
0053   const std::string& version() const override { return m_version; }
0054 
0055   // Output stream.
0056   friend std::ostream& operator<<( std::ostream& lhs, const ServiceHistory& rhs ) { return rhs.dump( lhs, false, 0 ); }
0057 
0058 private:
0059   const IService*   m_pService;
0060   const JobHistory* m_jobHistory{ nullptr };
0061   std::string       m_name, m_type, m_version;
0062   PropertyList      m_properties;
0063 };
0064 
0065 #endif