Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ExternallyConfiguredAlgorithm.h
Go to the documentation of this file.
1
8#ifndef PANDORA_EXTERNALLY_CONFIGURED_ALGORITHM_H
9#define PANDORA_EXTERNALLY_CONFIGURED_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
13#include <map>
14#include <unordered_map>
15
16namespace pandora
17{
18
23{
24public:
29
33 virtual ~ExternalParameters();
34
35private:
40
42
44};
45
46//------------------------------------------------------------------------------------------------------------------------------------------
47
54{
55public:
60
68 static StatusCode SetExternalParameters(const Pandora &pandora, const std::string &algorithmType, ExternalParameters *const pExternalParameters);
69
70protected:
76 bool ExternalParametersPresent() const;
77
85
86private:
91 {
92 public:
97
106 bool ExternalParametersPresent(const pandora::Pandora &pandora, const std::string &algorithmType) const;
107
117 ExternalParameters *GetExternalParameters(const pandora::Pandora &pandora, const std::string &algorithmType) const;
118
126 pandora::StatusCode SetExternalParameters(const pandora::Pandora &pandora, const std::string &algorithmType, ExternalParameters *const pExternalParameters);
127
134 void RemoveExternalParameters(const pandora::Pandora &pandora, const std::string &algorithmType);
135
136 private:
137 typedef std::map<const std::string, ExternalParameters*> AlgTypeToParametersMap;
138 typedef std::unordered_map<const Pandora*, AlgTypeToParametersMap> TheMap;
139
141 };
142
144};
145
146} // namespace pandora
147
148#endif // #ifndef PANDORA_EXTERNALLY_CONFIGURED_ALGORITHM_H
Header file for the algorithm class.
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
unsigned int m_nParameterAccessAttempts
The number of attempts made to access the external parameters.
void RegisterParameterAccessAttempt()
Register an attempt to access the external parameters during algorithm configuration.
pandora::StatusCode SetExternalParameters(const pandora::Pandora &pandora, const std::string &algorithmType, ExternalParameters *const pExternalParameters)
Set the external parameters associated with an algorithm instance of a specific type,...
void RemoveExternalParameters(const pandora::Pandora &pandora, const std::string &algorithmType)
Remove the external parameters associated with an algorithm instance of a specific type,...
std::unordered_map< const Pandora *, AlgTypeToParametersMap > TheMap
std::map< const std::string, ExternalParameters * > AlgTypeToParametersMap
Externally configured algorithm class. Provides ability for external specification of algorithm-defin...
bool ExternalParametersPresent() const
Whether external parameters are present.
ExternalParameters * GetExternalParameters() const
Get the external parameters associated with algorithm instances created by a given Pandora instance....
static ExternalParametersMap m_externalParametersMap
The external parameters map.
static StatusCode SetExternalParameters(const Pandora &pandora, const std::string &algorithmType, ExternalParameters *const pExternalParameters)
Set the external parameters associated with an algorithm instance of a specific type,...
Pandora class.
Definition Pandora.h:40
StatusCode
The StatusCode enum.