Loading [MathJax]/jax/output/HTML-CSS/config.js
The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AlgorithmHistory.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 // An object of this class carries the history information
14 // which is specific to a Gaudi algorithm.
15 
16 #include <GaudiKernel/HistoryObj.h>
18 
19 #include <iosfwd>
20 #include <string>
21 #include <typeinfo>
22 #include <vector>
23 
24 namespace Gaudi {
25  class Algorithm;
26 }
27 class JobHistory;
28 
38 
39 public: // typedefs
40  // List of subalgorithm histories. This may change.
41  typedef std::vector<const AlgorithmHistory*> HistoryList;
42 
43 private: // data
44  // Algorithm full type.
45  std::string m_algorithm_type;
46 
47  // Algorithm version.
48  std::string m_algorithm_version;
49 
50  // Algorithm name.
51  std::string m_algorithm_name;
52 
53  // Algorithm
55 
56  // Properties.
58 
59  // Subalgorithm histories.
61 
62  // Link to jobHistory
64 
65 public: // functions
66  // Constructor from the algorithm.
67  explicit AlgorithmHistory( const Gaudi::Algorithm& alg, const JobHistory* job );
68 
69  // All-fields Constructor for persistency
70  explicit AlgorithmHistory( std::string algVersion, std::string algName, std::string algType,
71  const PropertyList& props, const HistoryList& subHists );
72  // Destructor.
73  virtual ~AlgorithmHistory();
74 
75  // Class IDs
76  const CLID& clID() const override { return classID(); }
77  static const CLID& classID();
78 
79  // Return the algorithm type.
80  const std::string& algorithm_type() const { return m_algorithm_type; }
81 
82  // Return the algorithm version.
83  const std::string& algorithm_version() const { return m_algorithm_version; }
84 
85  // Return the algorithm name.
86  const std::string& algorithm_name() const { return m_algorithm_name; }
87 
88  // The actual algorithm
89  const Gaudi::Algorithm* algorithm() const { return m_algorithm; }
90 
91  // Return the algorithm properties.
92  const PropertyList& properties() const override { return m_properties; }
93 
94  // Return the subalgorithm histories.
95  const HistoryList& subalgorithm_histories() const { return m_subalgorithm_histories; }
96 
97  // Return the jobHistory
98  const JobHistory* jobHistory() const { return m_jobHistory; }
99 
100  std::ostream& dump( std::ostream&, bool isXML, int indent ) const override;
101 
102  const std::string& name() const override { return algorithm_name(); }
103  const std::string& type() const override { return algorithm_type(); }
104  const std::string& version() const override { return algorithm_version(); }
105 
106  // Output stream.
107  friend std::ostream& operator<<( std::ostream& lhs, const AlgorithmHistory& rhs ) {
108  return rhs.dump( lhs, false, 0 );
109  }
110 };
AlgorithmHistory::algorithm
const Gaudi::Algorithm * algorithm() const
Definition: AlgorithmHistory.h:89
HistoryObj::classID
static const CLID & classID()
Definition: HistoryObj.cpp:44
AlgorithmHistory::properties
const PropertyList & properties() const override
Definition: AlgorithmHistory.h:92
AlgorithmHistory::name
const std::string & name() const override
Definition: AlgorithmHistory.h:102
AlgorithmHistory::type
const std::string & type() const override
Definition: AlgorithmHistory.h:103
AlgorithmHistory::algorithm_name
const std::string & algorithm_name() const
Definition: AlgorithmHistory.h:86
AlgorithmHistory::algorithm_version
const std::string & algorithm_version() const
Definition: AlgorithmHistory.h:83
check_ParticleID.props
props
Definition: check_ParticleID.py:21
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
AlgorithmHistory::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition: AlgorithmHistory.h:76
AlgorithmHistory::m_algorithm_type
std::string m_algorithm_type
Definition: AlgorithmHistory.h:45
AlgorithmHistory::dump
std::ostream & dump(std::ostream &, bool isXML, int indent) const override
Definition: AlgorithmHistory.cpp:49
AlgorithmHistory::m_properties
PropertyList m_properties
Definition: AlgorithmHistory.h:57
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:81
AlgorithmHistory::m_algorithm_version
std::string m_algorithm_version
Definition: AlgorithmHistory.h:48
HistoryObj
Definition: HistoryObj.h:30
AlgorithmHistory
Definition: AlgorithmHistory.h:37
AlgorithmHistory::m_algorithm_name
std::string m_algorithm_name
Definition: AlgorithmHistory.h:51
IVersHistoryObj.h
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:87
IVersHistoryObj::PropertyList
std::vector< Gaudi::Details::PropertyBase * > PropertyList
Definition: IVersHistoryObj.h:29
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:16
IVersHistoryObj
Definition: IVersHistoryObj.h:27
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
AlgorithmHistory::operator<<
friend std::ostream & operator<<(std::ostream &lhs, const AlgorithmHistory &rhs)
Definition: AlgorithmHistory.h:107
AlgorithmHistory::HistoryList
std::vector< const AlgorithmHistory * > HistoryList
Definition: AlgorithmHistory.h:41
HistoryObj::dump
virtual std::ostream & dump(std::ostream &, bool isXML=false, int indent=0) const =0
AlgorithmHistory::m_subalgorithm_histories
HistoryList m_subalgorithm_histories
Definition: AlgorithmHistory.h:60
AlgorithmHistory::m_jobHistory
const JobHistory * m_jobHistory
Definition: AlgorithmHistory.h:63
AlgorithmHistory::jobHistory
const JobHistory * jobHistory() const
Definition: AlgorithmHistory.h:98
AlgorithmHistory::version
const std::string & version() const override
Definition: AlgorithmHistory.h:104
HistoryObj.h
AlgorithmHistory::subalgorithm_histories
const HistoryList & subalgorithm_histories() const
Definition: AlgorithmHistory.h:95
JobHistory
Definition: JobHistory.h:32
AlgorithmHistory::m_algorithm
const Gaudi::Algorithm * m_algorithm
Definition: AlgorithmHistory.h:54
AlgorithmHistory::algorithm_type
const std::string & algorithm_type() const
Definition: AlgorithmHistory.h:80
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:49