ATLAS Offline Software
Classes | Namespaces | Macros | Typedefs | Functions
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

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

Macros

#define CALORECGPU_VARSB_APPENDER(THIS, PREFIX, IGNORE)   , CRGPU_CONCAT(PREFIX, THIS)
 
#define CALORECGPU_VARSB_ASSIGNER(THIS, IGNORE1, IGNORE2)   tuple_safe_copy(CRGPU_CONCAT(b, THIS), CRGPU_CONCAT(a, THIS));
 
#define CALORECGPU_VARSB_ENCAPSULATOR_A(...)   CRGPU_MACRO_EXPANSION(CALORECGPU_VARSB_APPENDER, a, __VA_ARGS__ )
 
#define CALORECGPU_VARSB_ENCAPSULATOR_B(...)   CRGPU_MACRO_EXPANSION(CALORECGPU_VARSB_APPENDER, b, __VA_ARGS__ )
 
#define CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN(...)   CRGPU_MACRO_EXPANSION(CALORECGPU_VARSB_ASSIGNER, _ , __VA_ARGS__, )
 
#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)
 

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 347 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_APPENDER

#define CALORECGPU_VARSB_APPENDER (   THIS,
  PREFIX,
  IGNORE 
)    , CRGPU_CONCAT(PREFIX, THIS)

Definition at line 97 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_ASSIGNER

#define CALORECGPU_VARSB_ASSIGNER (   THIS,
  IGNORE1,
  IGNORE2 
)    tuple_safe_copy(CRGPU_CONCAT(b, THIS), CRGPU_CONCAT(a, THIS));

Definition at line 98 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_ENCAPSULATOR_A

#define CALORECGPU_VARSB_ENCAPSULATOR_A (   ...)    CRGPU_MACRO_EXPANSION(CALORECGPU_VARSB_APPENDER, a, __VA_ARGS__ )

Definition at line 100 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN

#define CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN (   ...)    CRGPU_MACRO_EXPANSION(CALORECGPU_VARSB_ASSIGNER, _ , __VA_ARGS__, )

Definition at line 103 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ CALORECGPU_VARSB_ENCAPSULATOR_B

#define CALORECGPU_VARSB_ENCAPSULATOR_B (   ...)    CRGPU_MACRO_EXPANSION(CALORECGPU_VARSB_APPENDER, b, __VA_ARGS__ )

Definition at line 101 of file CaloGPUClusterAndCellDataMonitorOptions.h.

◆ 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)); \
CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN SMALLER_NUMS \
} \
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)); \
CALORECGPU_VARSB_ENCAPSULATOR_ASSIGN SMALLER_NUMS \
} \
}; \

Definition at line 106 of file CaloGPUClusterAndCellDataMonitorOptions.h.

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 }

◆ 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 }
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
CRGPU_CONCAT
#define CRGPU_CONCAT(X, Y)
Helper macro, concatenates two arguments.
Definition: MacroHelpers.h:27
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CALORECGPU_VARSB_ENCAPSULATOR_B
#define CALORECGPU_VARSB_ENCAPSULATOR_B(...)
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:100
create_dcsc_inputs_sqlite.arg
list arg
Definition: create_dcsc_inputs_sqlite.py:48
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
CALORECGPU_VARSB_ENCAPSULATOR_A
#define CALORECGPU_VARSB_ENCAPSULATOR_A(...)
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:99
python.dqu_subprocess.apply
def apply(func, args)
Definition: dqu_subprocess.py:11
impl::output_helper
void output_helper(Stream &s, const T &t, const std::string &after)
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:242
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35