The Gaudi Framework  master (d98a2936)
ServiceHistory.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 #pragma once
12 
13 #include <GaudiKernel/HistoryObj.h>
15 
16 #include <string>
17 #include <vector>
18 
19 class IService;
20 class JobHistory;
21 
31 
32 public:
34  ServiceHistory( const IService*, const JobHistory* );
35  ServiceHistory( const IService&, const JobHistory* );
36 
37  // Class IDs
38  const CLID& clID() const override { return classID(); }
39  static const CLID& classID();
40 
41  // Return the service properties.
42  const PropertyList& properties() const override { return m_properties; }
43 
44  const IService* service() const { return m_pService; }
45 
46  const JobHistory* jobHistory() const { return m_jobHistory; }
47 
48  std::ostream& dump( std::ostream&, const bool isXML, int indent ) const override;
49 
50  const std::string& name() const override { return m_name; }
51  const std::string& type() const override { return m_type; }
52  const std::string& version() const override { return m_version; }
53 
54  // Output stream.
55  friend std::ostream& operator<<( std::ostream& lhs, const ServiceHistory& rhs ) { return rhs.dump( lhs, false, 0 ); }
56 
57 private:
59  const JobHistory* m_jobHistory{ nullptr };
60  std::string m_name, m_type, m_version;
61  PropertyList m_properties;
62 };
IService
Definition: IService.h:26
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:44
ServiceHistory::m_properties
PropertyList m_properties
Definition: ServiceHistory.h:61
ServiceHistory::service
const IService * service() const
Definition: ServiceHistory.h:44
DataObject::m_version
unsigned char m_version
Version number.
Definition: DataObject.h:42
ServiceHistory::jobHistory
const JobHistory * jobHistory() const
Definition: ServiceHistory.h:46
ServiceHistory::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: ServiceHistory.h:38
ServiceHistory::operator<<
friend std::ostream & operator<<(std::ostream &lhs, const ServiceHistory &rhs)
Definition: ServiceHistory.h:55
HistoryObj
Definition: HistoryObj.h:30
IVersHistoryObj.h
ServiceHistory::type
const std::string & type() const override
Definition: ServiceHistory.h:51
ServiceHistory
Definition: ServiceHistory.h:30
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:16
IVersHistoryObj
Definition: IVersHistoryObj.h:27
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:48
HistoryObj.h
ServiceHistory::name
const std::string & name() const override
Definition: ServiceHistory.h:50
JobHistory
Definition: JobHistory.h:32
ServiceHistory::version
const std::string & version() const override
Definition: ServiceHistory.h:52
ServiceHistory::m_pService
const IService * m_pService
Definition: ServiceHistory.h:58
ServiceHistory::properties
const PropertyList & properties() const override
Definition: ServiceHistory.h:42
ServiceHistory::m_version
std::string m_version
Definition: ServiceHistory.h:60
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:49