ATLAS Offline Software
Functions
InDetGNNHardScatterSelection::internal::get Namespace Reference

Functions

VarFromVertex varFromVertex (const std::string &name, EDMType, const std::string &defaultflag)
 

Function Documentation

◆ varFromVertex()

VarFromVertex InDetGNNHardScatterSelection::internal::get::varFromVertex ( const std::string &  name,
EDMType  type,
const std::string &  defaultflag 
)

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

72  {
73  if(default_flag.size() == 0 || name==default_flag)
74  {
75  switch (type) {
76  case EDMType::INT: return VertexVarGetterNoDefault<int>(name);
77  case EDMType::FLOAT: return VertexVarGetterNoDefault<float>(name);
78  case EDMType::DOUBLE: return VertexVarGetterNoDefault<double>(name);
79  case EDMType::CHAR: return VertexVarGetterNoDefault<char>(name);
80  case EDMType::UCHAR: return VertexVarGetterNoDefault<unsigned char>(name);
81  default: {
82  throw std::logic_error("Unknown EDM type");
83  }
84  }
85  }
86  else{
87  switch (type) {
88  case EDMType::INT: return VertexVarGetter<int>(name, default_flag);
89  case EDMType::FLOAT: return VertexVarGetter<float>(name, default_flag);
90  case EDMType::DOUBLE: return VertexVarGetter<double>(name, default_flag);
91  case EDMType::CHAR: return VertexVarGetter<char>(name, default_flag);
92  case EDMType::UCHAR: return VertexVarGetter<unsigned char>(name, default_flag);
93  default: {
94  throw std::logic_error("Unknown EDM type");
95  }
96  }
97  }
98  }
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78