ATLAS Offline Software
Classes | Functions | Variables
RPDUtils Namespace Reference

Classes

class  OptionalToolProperty
 

Functions

unsigned int ZDCSideToSideIndex (int const ZDCSide)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const std::vector< T > &v)
 
template std::ostream & operator<< (std::ostream &, const std::vector< float > &)
 
template<class T >
std::ostream & operator<< (std::ostream &os, OptionalToolProperty< T > const &obj)
 
template std::ostream & operator<< (std::ostream &, OptionalToolProperty< bool > const &)
 
template std::ostream & operator<< (std::ostream &, OptionalToolProperty< unsigned int > const &)
 
template std::ostream & operator<< (std::ostream &, OptionalToolProperty< float > const &)
 
template std::ostream & operator<< (std::ostream &, OptionalToolProperty< std::vector< float >> const &)
 
template<typename T >
std::string vecToString (std::vector< T > const &v)
 
template std::string vecToString (std::vector< float > const &v)
 
template<std::ranges::contiguous_range Range, typename T = std::ranges::range_value_t<Range>>
void helpZero (Range &v) requires(std
 
template<std::ranges::contiguous_range OuterRange, typename InnerRange = std::ranges::range_value_t<OuterRange>, typename T = std::ranges::range_value_t<InnerRange>>
void helpZero (OuterRange &vv) requires(std
 

Variables

unsigned constexpr int sideC = 0
 
unsigned constexpr int sideA = 1
 
constexpr std::initializer_list< unsigned int > sides {sideC, sideA}
 
constexpr int ZDCSumsGlobalZDCSide = 0
 
unsigned constexpr int ZDCModuleZDCType = 0
 
unsigned constexpr int ZDCModuleRPDType = 1
 
unsigned constexpr int ZDCModuleEMModule = 0
 
unsigned constexpr int nChannels = 16
 
unsigned constexpr int nRows = 4
 
unsigned constexpr int nCols = 4
 

Function Documentation

◆ helpZero() [1/2]

template<std::ranges::contiguous_range OuterRange, typename InnerRange = std::ranges::range_value_t<OuterRange>, typename T = std::ranges::range_value_t<InnerRange>>
void RPDUtils::helpZero ( OuterRange &  vv)

Definition at line 31 of file RPDUtils.h.

31  {
32  for (auto & v : vv) {
33  helpZero(v);
34  }
35  };

◆ helpZero() [2/2]

template<std::ranges::contiguous_range Range, typename T = std::ranges::range_value_t<Range>>
void RPDUtils::helpZero ( Range v)

Definition at line 27 of file RPDUtils.h.

27  {
28  std::fill(v.begin(), v.end(), 0);
29  };

◆ operator<<() [1/7]

template std::ostream& RPDUtils::operator<< ( std::ostream &  ,
const std::vector< float > &   
)

◆ operator<<() [2/7]

template std::ostream& RPDUtils::operator<< ( std::ostream &  ,
OptionalToolProperty< bool > const  
)

◆ operator<<() [3/7]

template std::ostream& RPDUtils::operator<< ( std::ostream &  ,
OptionalToolProperty< float > const  
)

◆ operator<<() [4/7]

template std::ostream& RPDUtils::operator<< ( std::ostream &  ,
OptionalToolProperty< std::vector< float >> const  
)

◆ operator<<() [5/7]

template std::ostream& RPDUtils::operator<< ( std::ostream &  ,
OptionalToolProperty< unsigned int > const  
)

◆ operator<<() [6/7]

template<typename T >
std::ostream & RPDUtils::operator<< ( std::ostream &  os,
const std::vector< T > &  v 
)

Definition at line 19 of file RPDUtils.cxx.

19  {
20  os << "{ ";
21  std::copy(v.begin(), v.end(), std::ostream_iterator<T>(os, ", "));
22  os << "}";
23  return os;
24  }

◆ operator<<() [7/7]

template<class T >
std::ostream& RPDUtils::operator<< ( std::ostream &  os,
OptionalToolProperty< T > const obj 
)

Definition at line 37 of file RPDUtils.cxx.

37  {
38  if (obj.has_value()) {
39  return os << obj.value();
40  }
41  return os << "None";
42  }

◆ vecToString() [1/2]

template std::string RPDUtils::vecToString ( std::vector< float > const v)

◆ vecToString() [2/2]

template<typename T >
std::string RPDUtils::vecToString ( std::vector< T > const v)

Definition at line 57 of file RPDUtils.cxx.

57  {
58  std::ostringstream oss;
59  oss << "{ ";
60  std::copy(v.begin(), v.end(), std::ostream_iterator<T>(oss, ", "));
61  oss << "}";
62  return oss.str();
63  }

◆ ZDCSideToSideIndex()

unsigned int RPDUtils::ZDCSideToSideIndex ( int const  ZDCSide)

Definition at line 7 of file RPDUtils.cxx.

7  {
8  switch (ZDCSide) {
9  case -1:
10  return sideC;
11  case 1:
12  return sideA;
13  default:
14  throw std::runtime_error("Invalid ZDC side: " + std::to_string(ZDCSide));
15  }
16  return 0;
17  };

Variable Documentation

◆ nChannels

unsigned constexpr int RPDUtils::nChannels = 16
constexpr

Definition at line 23 of file RPDUtils.h.

◆ nCols

unsigned constexpr int RPDUtils::nCols = 4
constexpr

Definition at line 25 of file RPDUtils.h.

◆ nRows

unsigned constexpr int RPDUtils::nRows = 4
constexpr

Definition at line 24 of file RPDUtils.h.

◆ sideA

unsigned constexpr int RPDUtils::sideA = 1
constexpr

Definition at line 16 of file RPDUtils.h.

◆ sideC

unsigned constexpr int RPDUtils::sideC = 0
constexpr

Definition at line 15 of file RPDUtils.h.

◆ sides

constexpr std::initializer_list<unsigned int> RPDUtils::sides {sideC, sideA}
constexpr

Definition at line 17 of file RPDUtils.h.

◆ ZDCModuleEMModule

unsigned constexpr int RPDUtils::ZDCModuleEMModule = 0
constexpr

Definition at line 22 of file RPDUtils.h.

◆ ZDCModuleRPDType

unsigned constexpr int RPDUtils::ZDCModuleRPDType = 1
constexpr

Definition at line 21 of file RPDUtils.h.

◆ ZDCModuleZDCType

unsigned constexpr int RPDUtils::ZDCModuleZDCType = 0
constexpr

Definition at line 20 of file RPDUtils.h.

◆ ZDCSumsGlobalZDCSide

constexpr int RPDUtils::ZDCSumsGlobalZDCSide = 0
constexpr

Definition at line 19 of file RPDUtils.h.

RPDUtils::helpZero
void helpZero(OuterRange &vv) requires(std
Definition: RPDUtils.h:31
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
RPDUtils::sideA
unsigned constexpr int sideA
Definition: RPDUtils.h:16
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
python.PyAthena.v
v
Definition: PyAthena.py:154
RPDUtils::sideC
unsigned constexpr int sideC
Definition: RPDUtils.h:15
calibdata.copy
bool copy
Definition: calibdata.py:27
python.PyAthena.obj
obj
Definition: PyAthena.py:132
PlotCalibFromCool.vv
vv
Definition: PlotCalibFromCool.py:716