ATLAS Offline Software
Public Member Functions | Private Types | Private Attributes | List of all members
InDetGNNHardScatterSelection::internal::VertexVarGetter< T > Class Template Reference

#include <DataPrepUtilities.h>

Collaboration diagram for InDetGNNHardScatterSelection::internal::VertexVarGetter< T >:

Public Member Functions

 VertexVarGetter (const std::string &name, const std::string &default_flag)
 
NamedVar operator() (const SG::AuxElement &btag) const
 

Private Types

typedef SG::AuxElement AE
 

Private Attributes

AE::ConstAccessor< T > m_getter
 
AE::ConstAccessor< char > m_default_flag
 
std::string m_name
 

Detailed Description

template<typename T>
class InDetGNNHardScatterSelection::internal::VertexVarGetter< T >

Definition at line 58 of file InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/DataPrepUtilities.h.

Member Typedef Documentation

◆ AE

template<typename T >
typedef SG::AuxElement InDetGNNHardScatterSelection::internal::VertexVarGetter< T >::AE
private

Constructor & Destructor Documentation

◆ VertexVarGetter()

template<typename T >
InDetGNNHardScatterSelection::internal::VertexVarGetter< T >::VertexVarGetter ( const std::string &  name,
const std::string &  default_flag 
)
inline

Member Function Documentation

◆ operator()()

template<typename T >
NamedVar InDetGNNHardScatterSelection::internal::VertexVarGetter< T >::operator() ( const SG::AuxElement btag) const
inline

Definition at line 71 of file InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/DataPrepUtilities.h.

71  {
72  T ret_value = m_getter(btag);
73  bool is_default = m_default_flag(btag);
74  if constexpr (std::is_floating_point<T>::value) {
75  if (std::isnan(ret_value) && !is_default) {
76  throw std::runtime_error(
77  "Found NAN value for '" + m_name
78  + "'. This is only allowed when using a default"
79  " value for this input");
80  }
81  }
82  return {m_name, is_default ? NAN : ret_value};
83  }

Member Data Documentation

◆ m_default_flag

template<typename T >
AE::ConstAccessor<char> InDetGNNHardScatterSelection::internal::VertexVarGetter< T >::m_default_flag
private

◆ m_getter

template<typename T >
AE::ConstAccessor<T> InDetGNNHardScatterSelection::internal::VertexVarGetter< T >::m_getter
private

◆ m_name

template<typename T >
std::string InDetGNNHardScatterSelection::internal::VertexVarGetter< T >::m_name
private

The documentation for this class was generated from the following file:
InDetGNNHardScatterSelection::internal::VertexVarGetter::m_default_flag
AE::ConstAccessor< char > m_default_flag
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/DataPrepUtilities.h:62
athena.value
value
Definition: athena.py:124
InDetGNNHardScatterSelection::internal::VertexVarGetter::m_name
std::string m_name
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/DataPrepUtilities.h:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDetGNNHardScatterSelection::internal::VertexVarGetter::m_getter
AE::ConstAccessor< T > m_getter
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/DataPrepUtilities.h:61
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35