ATLAS Offline Software
Loading...
Searching...
No Matches
CaloGPUClusterAndCellDataMonitorOptions.h File Reference
#include <tuple>
#include <iostream>
#include <string>
#include <type_traits>
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/StatusCode.h"
#include <Gaudi/Parsers/Factory.h>
#include "MacroHelpers.h"
Include dependency graph for CaloGPUClusterAndCellDataMonitorOptions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  impl::class_can_be_tuple< Check >
struct  impl::struct_tuple_conversion< n >
struct  impl::simple_tuple_conversion< T, Elems >
struct  Gaudi::Parsers::Grammar_< Iterator, T, Skipper, typename std::enable_if_t< impl::class_can_be_tuple_v< T > > >
struct  MatchingOptions
struct  SimpleSingleTool
struct  SimpleToolPair

Namespaces

namespace  impl
namespace  Gaudi
 =============================================================================
namespace  Gaudi::Parsers

Macros

#define CALORECGPU_VARSB_APPENDER(THIS, PREFIX, IGNORE)
#define CALORECGPU_VARSB_ASSIGNER(THIS, IGNORE1, IGNORE2)
#define CALORECGPU_VARSB_ENCAPSULATOR_A(...)
#define CALORECGPU_VARSB_ENCAPSULATOR_B(...)
#define CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN(...)
#define CALORECGPU_VARSB_EXPANDER(THIS_NUM, IGNORE, SMALLER_NUMS)
#define CALORECGPU_OPTIONCLASS_CONSTRUCTORS(CLASSNAME)

Typedefs

template<class T>
using impl::to_tuple_type = decltype(to_tuple_type_helper(std::declval<T>()))

Functions

template<class T>
void impl::tuple_safe_copy (T &dest, const T &source)
template<class T, std::enable_if_t< impl::class_can_be_tuple_v< T > > * = nullptr>
void impl::tuple_safe_copy (T &s, const typename T::TupleType &tuple)
template<class T, std::enable_if_t< impl::class_can_be_tuple_v< T > > * = nullptr>
void impl::tuple_safe_copy (typename T::TupleType &tuple, const T &s)
template<class T, std::enable_if_t< impl::class_can_be_tuple_v< T > > * = nullptr>
void impl::tuple_safe_copy (std::vector< typename T::TupleType > &t_v, const std::vector< T > &s_v)
template<class T, std::enable_if_t< impl::class_can_be_tuple_v< T > > * = nullptr>
void impl::tuple_safe_copy (std::vector< T > &s_v, const std::vector< typename T::TupleType > &t_v)
template<class T>
auto impl::to_tuple_type_helper (const T &)
template<class T, std::enable_if_t< impl::class_can_be_tuple_v< T > > * = nullptr>
auto impl::to_tuple_type_helper (const std::vector< T > &)
template<class Stream, class T>
void impl::output_helper (Stream &s, const T &t, const std::string &after)
template<class Stream, class T>
void impl::output_helper (Stream &s, const std::vector< T > &v, const std::string &after)
template<class ... Tup>
StatusCode Gaudi::Parsers::parse (std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
template<class T>
StatusCode Gaudi::Parsers::parse (std::vector< T > &v, const Gaudi::Parsers::InputData &input)
template<class ... Tup>
std::ostream & operator<< (std::ostream &s, const std::tuple< Tup... > &tup)
template<class T, std::enable_if_t< impl::class_can_be_tuple_v< T > > * = nullptr>
std::ostream & operator<< (std::ostream &s, const T &t)

Variables

template<class T>
static constexpr bool impl::class_can_be_tuple_v = class_can_be_tuple<T>::value

Macro Definition Documentation

◆ CALORECGPU_OPTIONCLASS_CONSTRUCTORS

#define CALORECGPU_OPTIONCLASS_CONSTRUCTORS ( CLASSNAME)
Value:
CLASSNAME() = default; \
CLASSNAME(const TupleType & t) \
{ \
(*this) = from_tuple(t); \
} \

Definition at line 346 of file CaloGPUClusterAndCellDataMonitorOptions.h.

346#define CALORECGPU_OPTIONCLASS_CONSTRUCTORS(CLASSNAME) \
347 CLASSNAME() = default; \
348 CLASSNAME(const TupleType & t) \
349 { \
350 (*this) = from_tuple(t); \
351 } \
352

◆ CALORECGPU_VARSB_APPENDER

#define CALORECGPU_VARSB_APPENDER ( THIS,
PREFIX,
IGNORE )
Value:
#define CRGPU_CONCAT(X, Y)
Helper macro, concatenates two arguments.
static const string PREFIX

Definition at line 96 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_ASSIGNER

#define CALORECGPU_VARSB_ASSIGNER ( THIS,
IGNORE1,
IGNORE2 )
Value:
tuple_safe_copy(CRGPU_CONCAT(b, THIS), CRGPU_CONCAT(a, THIS));
static Double_t a

Definition at line 97 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_ENCAPSULATOR_A

#define CALORECGPU_VARSB_ENCAPSULATOR_A ( ...)
Value:
#define CALORECGPU_VARSB_APPENDER(THIS, PREFIX, IGNORE)
#define CRGPU_MACRO_EXPANSION(MACRO, EXTRA_ARG,...)
Helper macro to apply a macro to all elements of the variadic list, with EXTRA_ARG and the parenthesi...

Definition at line 99 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN

#define CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN ( ...)
Value:
#define CALORECGPU_VARSB_ASSIGNER(THIS, IGNORE1, IGNORE2)

Definition at line 102 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_ENCAPSULATOR_B

#define CALORECGPU_VARSB_ENCAPSULATOR_B ( ...)

◆ CALORECGPU_VARSB_EXPANDER

#define CALORECGPU_VARSB_EXPANDER ( THIS_NUM,
IGNORE,
SMALLER_NUMS )
Value:
template <> struct struct_tuple_conversion<THIS_NUM> \
{ \
template <class T, class TupleT> \
static void s2t(const T & t, TupleT & tup) \
{ \
const auto & [CRGPU_CONCAT(a, THIS_NUM) CALORECGPU_VARSB_ENCAPSULATOR_A SMALLER_NUMS] = t; \
auto & [CRGPU_CONCAT(b, THIS_NUM) CALORECGPU_VARSB_ENCAPSULATOR_B SMALLER_NUMS] = tup; \
tuple_safe_copy(CRGPU_CONCAT(b, THIS_NUM), CRGPU_CONCAT(a, THIS_NUM)); \
} \
template <class TupleT, class T> \
static void t2s(const TupleT & tup, T & t) \
{ \
const auto & [CRGPU_CONCAT(a, THIS_NUM) CALORECGPU_VARSB_ENCAPSULATOR_A SMALLER_NUMS] = tup; \
auto & [CRGPU_CONCAT(b, THIS_NUM) CALORECGPU_VARSB_ENCAPSULATOR_B SMALLER_NUMS] = t; \
tuple_safe_copy(CRGPU_CONCAT(b, THIS_NUM), CRGPU_CONCAT(a, THIS_NUM)); \
} \
}; \
#define CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN(...)
#define CALORECGPU_VARSB_ENCAPSULATOR_B(...)
#define CALORECGPU_VARSB_ENCAPSULATOR_A(...)

Definition at line 105 of file CaloGPUClusterAndCellDataMonitorOptions.h.

105#define CALORECGPU_VARSB_EXPANDER(THIS_NUM, IGNORE, SMALLER_NUMS) \
106 template <> struct struct_tuple_conversion<THIS_NUM> \
107 { \
108 template <class T, class TupleT> \
109 static void s2t(const T & t, TupleT & tup) \
110 { \
111 const auto & [CRGPU_CONCAT(a, THIS_NUM) CALORECGPU_VARSB_ENCAPSULATOR_A SMALLER_NUMS] = t; \
112 auto & [CRGPU_CONCAT(b, THIS_NUM) CALORECGPU_VARSB_ENCAPSULATOR_B SMALLER_NUMS] = tup; \
113 tuple_safe_copy(CRGPU_CONCAT(b, THIS_NUM), CRGPU_CONCAT(a, THIS_NUM)); \
114 CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN SMALLER_NUMS \
115 } \
116 template <class TupleT, class T> \
117 static void t2s(const TupleT & tup, T & t) \
118 { \
119 const auto & [CRGPU_CONCAT(a, THIS_NUM) CALORECGPU_VARSB_ENCAPSULATOR_A SMALLER_NUMS] = tup; \
120 auto & [CRGPU_CONCAT(b, THIS_NUM) CALORECGPU_VARSB_ENCAPSULATOR_B SMALLER_NUMS] = t; \
121 tuple_safe_copy(CRGPU_CONCAT(b, THIS_NUM), CRGPU_CONCAT(a, THIS_NUM)); \
122 CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN SMALLER_NUMS \
123 } \
124 }; \
125

Function Documentation

◆ operator<<() [1/2]

template<class ... Tup>
std::ostream & operator<< ( std::ostream & s,
const std::tuple< Tup... > & tup )

Definition at line 299 of file CaloGPUClusterAndCellDataMonitorOptions.h.

300{
301 std::apply( [&] (const Tup & ... arg)
302 {
303 s << "(";
304
305 size_t num = 0;
306
307 (void) ( (void) impl::output_helper(s, arg, (++num < sizeof...(Tup) ? ", " : "")), ... );
308
309 s << ")";
310
311 }, tup );
312
313 return s;
314}
void output_helper(Stream &s, const T &t, const std::string &after)

◆ operator<<() [2/2]

template<class T, std::enable_if_t< impl::class_can_be_tuple_v< T > > * = nullptr>
std::ostream & operator<< ( std::ostream & s,
const T & t )

Definition at line 318 of file CaloGPUClusterAndCellDataMonitorOptions.h.

319{
320 return s << T::to_tuple(t);
321}