ATLAS Offline Software
Loading...
Searching...
No Matches
ConfiguredValueUtils.h File Reference
#include <stdexcept>
#include "Gaudi/Property.h"
#include "ConfiguredValue.h"
Include dependency graph for ConfiguredValueUtils.h:

Go to the source code of this file.

Classes

class  ConfiguredValueProperty< T, UnsetResult >

Macros

#define GAUDI_OPERATOR_GENERATOR(OP)
#define REV_GAUDI_OPERATOR_GENERATOR(OP, REVOP)

Functions

template<typename T, bool UnsetResult = false>
bool isset (const Gaudi::Property< ConfiguredValue< T, UnsetResult > > &p)
template<typename T, bool UnsetResult = false>
StatusCode parse (ConfiguredValue< T > &p, const Gaudi::Parsers::InputData &input)
template<typename Exception = std::runtime_error, typename T>
const T & require_set (const T &t)
template<typename... T>
void require_set (const T &... args)

Detailed Description

Author
sutt
Date
Tue 8 Sep 2026 12:34:40 BST
Id
ConfiguredValueUtils.h, v0.0 Tue 8 Sep 2026 12:34:40 BST sutt

Copyright (C) 2026 sutt (sutt@.nosp@m.cern.nosp@m..ch)
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration

Definition in file ConfiguredValueUtils.h.

Macro Definition Documentation

◆ GAUDI_OPERATOR_GENERATOR

#define GAUDI_OPERATOR_GENERATOR ( OP)
Value:
template<typename T, typename U> bool operator OP ( const Gaudi::Property<ConfiguredValue<T>>& p, const U& a ) { return p.value() OP a; }
static Double_t a

Definition at line 24 of file ConfiguredValueUtils.h.

◆ REV_GAUDI_OPERATOR_GENERATOR

#define REV_GAUDI_OPERATOR_GENERATOR ( OP,
REVOP )
Value:
template<typename T, typename U> bool operator OP ( const U& a, const Gaudi::Property<ConfiguredValue<T>>& p ) { return p.value() REVOP a; }

Definition at line 25 of file ConfiguredValueUtils.h.

Function Documentation

◆ isset()

template<typename T, bool UnsetResult = false>
bool isset ( const Gaudi::Property< ConfiguredValue< T, UnsetResult > > & p)

Definition at line 45 of file ConfiguredValueUtils.h.

45{ return p.value().isset(); }

◆ parse()

template<typename T, bool UnsetResult = false>
StatusCode parse ( ConfiguredValue< T > & p,
const Gaudi::Parsers::InputData & input )

Definition at line 49 of file ConfiguredValueUtils.h.

49 {
50 T value;
51 StatusCode sc = parse(value, input);
52 if (sc.isSuccess()) p = value;
53 return sc;
54}
StatusCode parse(ConfiguredValue< T > &p, const Gaudi::Parsers::InputData &input)
static Double_t sc
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ require_set() [1/2]

template<typename... T>
void require_set ( const T &... args)

Definition at line 79 of file ConfiguredValueUtils.h.

79{ (require_set<std::runtime_error>(args), ...); }
const T & require_set(const T &t)

◆ require_set() [2/2]

template<typename Exception = std::runtime_error, typename T>
const T & require_set ( const T & t)

Definition at line 72 of file ConfiguredValueUtils.h.

72 {
73 if ( !t.isset() ) throw Exception( "no matching parameter " + t.name() );
74 return t;
75}