The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
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
18
19#include <iosfwd>
20#include <string>
21#include <typeinfo>
22#include <vector>
23
24namespace Gaudi {
25 class Algorithm;
26}
27class JobHistory;
28
36
38
39public: // typedefs
40 // List of subalgorithm histories. This may change.
41 typedef std::vector<const AlgorithmHistory*> HistoryList;
42
43private: // data
44 // Algorithm full type.
45 std::string m_algorithm_type;
46
47 // 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
65public: // 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.
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};
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
#define GAUDI_API
Definition Kernel.h:49
const std::string & algorithm_name() const
std::string m_algorithm_name
const std::string & name() const override
const JobHistory * m_jobHistory
const std::string & algorithm_version() const
const std::string & version() const override
const JobHistory * jobHistory() const
const PropertyList & properties() const override
std::string m_algorithm_version
const CLID & clID() const override
Retrieve reference to class definition structure.
const std::string & type() const override
std::vector< const AlgorithmHistory * > HistoryList
friend std::ostream & operator<<(std::ostream &lhs, const AlgorithmHistory &rhs)
const HistoryList & subalgorithm_histories() const
std::ostream & dump(std::ostream &, bool isXML, int indent) const override
AlgorithmHistory(const Gaudi::Algorithm &alg, const JobHistory *job)
const Gaudi::Algorithm * m_algorithm
const Gaudi::Algorithm * algorithm() const
const std::string & algorithm_type() const
HistoryList m_subalgorithm_histories
PropertyList m_properties
std::string m_algorithm_type
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:87
Base class for History Objects.
Definition HistoryObj.h:30
virtual std::ostream & dump(std::ostream &, bool isXML=false, int indent=0) const =0
static const CLID & classID()
Interface for Versioned History Objects.
std::vector< Gaudi::Details::PropertyBase * > PropertyList
JobHistory class definition.
Definition JobHistory.h:32
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1