ATLAS Offline Software
|
Constant of a ToolWithConstants. More...
#include <ToolWithConstants.h>
Classes | |
class | CProperty |
Internal wrapper for Gaudi::Property. More... | |
Public Types | |
using | Context = ToolConstantsContext |
Alias for the context object. More... | |
Public Member Functions | |
template<class OWNER > | |
ToolConstant (OWNER *owner, const std::string &name, const std::string &doc="") | |
Declare a constant with no default. More... | |
template<class OWNER > | |
ToolConstant (OWNER *owner, const std::string &name, const char *doc) | |
Declare a constant with no default. More... | |
template<class OWNER , typename U = T, typename = std::enable_if_t<std::is_arithmetic_v<U> >> | |
ToolConstant (OWNER *owner, const std::string &name, const T &deflt, const std::string &doc="") | |
Declare a constant with a default. More... | |
T | operator() (const Context &c) const |
Retrieve the value of a constant. More... | |
T | operator() () const |
Retrieve the value of a constant. More... | |
virtual std::string | name () const override |
Return the name of this constant. More... | |
virtual bool | setFromJO () const override |
Was this constant set through job options? More... | |
Private Attributes | |
CProperty | m_prop |
Internal Property instance, for getting JO settings from Gaudi. More... | |
int | m_toolVersion |
Version of the owning tool. More... | |
Constant of a ToolWithConstants.
See ToolWithContants
below for usage information.
Definition at line 200 of file ToolWithConstants.h.
using CaloUtils::ToolConstant< T >::Context = ToolConstantsContext |
Alias for the context object.
Definition at line 205 of file ToolWithConstants.h.
CaloUtils::ToolConstant< T >::ToolConstant | ( | OWNER * | owner, |
const std::string & | name, | ||
const std::string & | doc = "" |
||
) |
Declare a constant with no default.
owner | The owning ToolWithConstants . |
name | Name of the constant. |
doc | Documentation string. |
CaloUtils::ToolConstant< T >::ToolConstant | ( | OWNER * | owner, |
const std::string & | name, | ||
const char * | doc | ||
) |
Declare a constant with no default.
owner | The owning ToolWithConstants . |
name | Name of the constant. |
doc | Documentation string. |
(Needed in addition to the previous signature in order to avoid ambiguities; otherwise, if a char* is given for the third argument, it would match the following signature instead of the previous one.)
CaloUtils::ToolConstant< T >::ToolConstant | ( | OWNER * | owner, |
const std::string & | name, | ||
const T & | deflt, | ||
const std::string & | doc = "" |
||
) |
Declare a constant with a default.
owner | The owning ToolWithConstants . |
name | Name of the constant. |
deflt | Default value. |
doc | Documentation string. |
Only possible for arithmetic types, not Array<N>
.
|
overridevirtual |
Return the name of this constant.
Implements CaloUtils::IToolConstant.
T CaloUtils::ToolConstant< T >::operator() | ( | ) | const |
Retrieve the value of a constant.
This variant may only be used if the constant was initialized via JO.
T CaloUtils::ToolConstant< T >::operator() | ( | const Context & | c | ) | const |
Retrieve the value of a constant.
c | Context for accessing condtions (as returned from context()). |
|
overridevirtual |
Was this constant set through job options?
Implements CaloUtils::IToolConstant.
|
private |
Internal Property instance, for getting JO settings from Gaudi.
Definition at line 350 of file ToolWithConstants.h.
|
private |
Version of the owning tool.
Definition at line 353 of file ToolWithConstants.h.