The Gaudi Framework  master (37c0b60a)
ServiceHistory.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_SERVICEHISTORY_H
12 #define GAUDIKERNEL_SERVICEHISTORY_H
13 
14 #include <GaudiKernel/HistoryObj.h>
16 
17 #include <string>
18 #include <vector>
19 
20 class IService;
21 class JobHistory;
22 
32 
33 public:
35  ServiceHistory( const IService*, const JobHistory* );
36  ServiceHistory( const IService&, const JobHistory* );
37 
38  // Class IDs
39  const CLID& clID() const override { return classID(); }
40  static const CLID& classID();
41 
42  // Return the service properties.
43  const PropertyList& properties() const override { return m_properties; }
44 
45  const IService* service() const { return m_pService; }
46 
47  const JobHistory* jobHistory() const { return m_jobHistory; }
48 
49  std::ostream& dump( std::ostream&, const bool isXML, int indent ) const override;
50 
51  const std::string& name() const override { return m_name; }
52  const std::string& type() const override { return m_type; }
53  const std::string& version() const override { return m_version; }
54 
55  // Output stream.
56  friend std::ostream& operator<<( std::ostream& lhs, const ServiceHistory& rhs ) { return rhs.dump( lhs, false, 0 ); }
57 
58 private:
60  const JobHistory* m_jobHistory{ nullptr };
61  std::string m_name, m_type, m_version;
63 };
64 
65 #endif
IService
Definition: IService.h:28
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:65
ServiceHistory::m_properties
PropertyList m_properties
Definition: ServiceHistory.h:62
std::string
STL class.
ServiceHistory::service
const IService * service() const
Definition: ServiceHistory.h:45
std::vector< Gaudi::Details::PropertyBase * >
DataObject::m_version
unsigned char m_version
Version number.
Definition: DataObject.h:41
ServiceHistory::jobHistory
const JobHistory * jobHistory() const
Definition: ServiceHistory.h:47
ServiceHistory::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: ServiceHistory.h:39
ServiceHistory::operator<<
friend std::ostream & operator<<(std::ostream &lhs, const ServiceHistory &rhs)
Definition: ServiceHistory.h:56
HistoryObj
Definition: HistoryObj.h:31
IVersHistoryObj.h
std::ostream
STL class.
ServiceHistory::type
const std::string & type() const override
Definition: ServiceHistory.h:52
ServiceHistory
Definition: ServiceHistory.h:31
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
IVersHistoryObj
Definition: IVersHistoryObj.h:28
HistoryObj::dump
virtual std::ostream & dump(std::ostream &, bool isXML=false, int indent=0) const =0
ServiceHistory::dump
std::ostream & dump(std::ostream &, const bool isXML, int indent) const override
Definition: ServiceHistory.cpp:84
HistoryObj.h
ServiceHistory::name
const std::string & name() const override
Definition: ServiceHistory.h:51
JobHistory
Definition: JobHistory.h:33
ServiceHistory::version
const std::string & version() const override
Definition: ServiceHistory.h:53
ServiceHistory::m_pService
const IService * m_pService
Definition: ServiceHistory.h:59
ServiceHistory::properties
const PropertyList & properties() const override
Definition: ServiceHistory.h:43
ServiceHistory::m_version
std::string m_version
Definition: ServiceHistory.h:61
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81