The Gaudi Framework  v33r0 (d5ea422b)
ServiceHistory.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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  virtual ~ServiceHistory() = default;
39 
40  // Class IDs
41  const CLID& clID() const override { return classID(); }
42  static const CLID& classID();
43 
44  // Return the service properties.
45  const PropertyList& properties() const override { return m_properties; }
46 
47  const IService* service() const { return m_pService; }
48 
49  const JobHistory* jobHistory() const { return m_jobHistory; }
50 
51  void dump( std::ostream&, const bool isXML = false, int indent = 0 ) const override;
52 
53  const std::string& name() const override { return m_name; }
54  const std::string& type() const override { return m_type; }
55  const std::string& version() const override { return m_version; }
56 
57 private:
59  const JobHistory* m_jobHistory{nullptr};
60  std::string m_name, m_type, m_version;
62 };
63 
64 // Output stream.
66 
67 #endif
const JobHistory * jobHistory() const
static const CLID & classID()
Definition: HistoryObj.cpp:65
virtual void dump(std::ostream &, const bool isXML=false, int indent=0) const =0
List of properties.
Definition: PropertyList.h:26
Base class for History Objects.
Definition: HistoryObj.h:31
JobHistory class definition.
Definition: JobHistory.h:32
PropertyList m_properties
GAUDI_API std::ostream & operator<<(std::ostream &lhs, const ServiceHistory &rhs)
const CLID & clID() const override
Retrieve reference to class definition structure.
const IService * service() const
STL class.
unsigned char m_version
Version number.
Definition: DataObject.h:45
const std::string & type() const override
General service interface definition.
Definition: IService.h:28
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
std::string m_version
ServiceHistory class definition.
const std::string & name() const override
const std::string & version() const override
Interface for Versioned History Objects.
#define GAUDI_API
Definition: Kernel.h:81
const IService * m_pService
STL class.
const PropertyList & properties() const override