ATLAS Offline Software
Loading...
Searching...
No Matches
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>>
requires (std::is_arithmetic_v<T>)
void helpZero (Range &v)
template<std::ranges::contiguous_range OuterRange, typename InnerRange = std::ranges::range_value_t<OuterRange>, typename T = std::ranges::range_value_t<InnerRange>>
requires (std::ranges::contiguous_range<InnerRange> && std::is_arithmetic_v<T>)
void helpZero (OuterRange &vv)

Variables

unsigned int constexpr sideC = 0
unsigned int constexpr sideA = 1
std::initializer_list< unsigned int > constexpr sides {sideC, sideA}
int constexpr ZDCSumsGlobalZDCSide = 0
unsigned int constexpr ZDCModuleZDCType = 0
unsigned int constexpr ZDCModuleRPDType = 1
unsigned int constexpr ZDCModuleEMModule = 0
unsigned int constexpr nChannels = 16
unsigned int constexpr nRows = 4
unsigned int constexpr 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>>
requires (std::ranges::contiguous_range<InnerRange> && std::is_arithmetic_v<T>)
void RPDUtils::helpZero ( OuterRange & vv)

Definition at line 31 of file RPDUtils.h.

31 {
32 for (auto & v : vv) {
33 helpZero(v);
34 }
35 };
void helpZero(Range &v)
Definition RPDUtils.h:27

◆ helpZero() [2/2]

template<std::ranges::contiguous_range Range, typename T = std::ranges::range_value_t<Range>>
requires (std::is_arithmetic_v<T>)
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/6]

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

◆ operator<<() [2/6]

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

◆ operator<<() [3/6]

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

◆ operator<<() [4/6]

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

◆ operator<<() [5/6]

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<<() [6/6]

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 }

◆ operator<<<>()

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

◆ 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 };
unsigned int constexpr sideC
Definition RPDUtils.h:15
unsigned int constexpr sideA
Definition RPDUtils.h:16

Variable Documentation

◆ nChannels

unsigned int constexpr RPDUtils::nChannels = 16
constexpr

Definition at line 23 of file RPDUtils.h.

◆ nCols

unsigned int constexpr RPDUtils::nCols = 4
constexpr

Definition at line 25 of file RPDUtils.h.

◆ nRows

unsigned int constexpr RPDUtils::nRows = 4
constexpr

Definition at line 24 of file RPDUtils.h.

◆ sideA

unsigned int constexpr RPDUtils::sideA = 1
constexpr

Definition at line 16 of file RPDUtils.h.

◆ sideC

unsigned int constexpr RPDUtils::sideC = 0
constexpr

Definition at line 15 of file RPDUtils.h.

◆ sides

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

Definition at line 17 of file RPDUtils.h.

17{sideC, sideA};

◆ ZDCModuleEMModule

unsigned int constexpr RPDUtils::ZDCModuleEMModule = 0
constexpr

Definition at line 22 of file RPDUtils.h.

◆ ZDCModuleRPDType

unsigned int constexpr RPDUtils::ZDCModuleRPDType = 1
constexpr

Definition at line 21 of file RPDUtils.h.

◆ ZDCModuleZDCType

unsigned int constexpr RPDUtils::ZDCModuleZDCType = 0
constexpr

Definition at line 20 of file RPDUtils.h.

◆ ZDCSumsGlobalZDCSide

int constexpr RPDUtils::ZDCSumsGlobalZDCSide = 0
constexpr

Definition at line 19 of file RPDUtils.h.