ATLAS Offline Software
|
Hold constants for a tool. More...
#include "CaloUtils/exceptions.h"
#include "CaloInterface/IToolWithConstants.h"
#include "CaloConditions/ToolConstants.h"
#include "AthenaBaseComps/AthCheckMacros.h"
#include "StoreGate/ReadCondHandleKey.h"
#include "StoreGate/ReadCondHandle.h"
#include "AthenaKernel/errorcheck.h"
#include "CxxUtils/concepts.h"
#include "Gaudi/Property.h"
#include <string>
#include <sstream>
#include <type_traits>
#include "CaloUtils/ToolWithConstants.icc"
Go to the source code of this file.
Classes | |
struct | CaloUtils::ToolConstantsContext |
Context object for retrieving ToolConstant values. More... | |
class | CaloUtils::IToolConstant |
Internal interface for dealing with a collection of ToolConstants . More... | |
class | CaloUtils::ToolWithConstantsImpl |
Internal implementation object. More... | |
class | CaloUtils::ToolConstant< T > |
Constant of a ToolWithConstants. More... | |
class | CaloUtils::ToolConstant< T >::CProperty |
Internal wrapper for Gaudi::Property. More... | |
class | CaloUtils::ToolWithConstants< BASE > |
Namespaces | |
Gaudi | |
============================================================================= | |
Gaudi::Parsers | |
CaloUtils | |
Macros | |
#define | ATH_TWC_REQUIRES ATH_REQUIRES( requires (BASE& b, Gaudi::Property<int>& p) { { b.declareProperty(p) }; } ) |
Hold constants for a tool. More... | |
Functions | |
template<unsigned int N> | |
StatusCode | Gaudi::Parsers::parse (CaloRec::Array< N > &, const std::string &) |
Hold constants for a tool.
See the class ToolWithConstants
below for more information.
Definition in file ToolWithConstants.h.
#define ATH_TWC_REQUIRES ATH_REQUIRES( requires (BASE& b, Gaudi::Property<int>& p) { { b.declareProperty(p) }; } ) |
Hold constants for a tool.
Certain tools, such as correction tools, have a large number of constants associated with them. One does not want to hard-code these constants; instead, the tools should be able to get them either from job options or from a COOL database.
This class extends Gaudi components to manage a set of ‘Constants’, which are like properties but can be set either from job options or from COOL (or possibly defaulted). The constants may either be scalar arithmetic types (floating-point, integer, boolean) or an specialization of CxxUtils::Array<N>. (Note, however, that the values are always stored as single-precision floating-point.)
A Constant may be declared similarly to a Gaudi property. To retrieve its value, call context() and then pass that to the operator() method of the Constant.
This is probably best shown as an example.
Constants that come from COOL are kept in a ToolConstants
conditions object; the key of this object is set from the DBHandleKey
property. Constants for multiple tools may be combined in a single ToolConstants
object. Each tool has a string prefix (unique within such a group) that is added to the constant name when it is looked up in the ToolConstants
object.
For data that are stored as inline COOL data, a conditions algorithm is used to populate a ToolConstants
object from COOL.
Settings from COOL may be overridden with settings from job options. For values that are arrays, the value should be set as a string.
Definition at line 436 of file ToolWithConstants.h.