ATLAS Offline Software
Loading...
Searching...
No Matches
PixelReadoutDefinitions.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef PIXELREADOUTDEFINITIONS_H
6#define PIXELREADOUTDEFINITIONS_H
7#include <cstddef> //for size_t
8#include <cstdint> //for uint32_t
9#include <string>
10#include <string_view>
11#include <stdexcept>
12#include <typeinfo>
13#include <format> // For std::format (C++20)
14
15
16namespace InDetDD{
17
27
36
44
45 constexpr uint32_t invalidRow = 0xFFFFFFFF;
46 constexpr uint32_t invalidColumn = 0xFFFFFFFF;
47 constexpr uint32_t invalidFrontEnd = 0xFFFFFFFF;
49 template <typename T>
50 constexpr std::size_t
51 enum2uint(T n, std::string_view callingFunctionName = ""){
52 if (n==T::NONE){
53 throw std::out_of_range(std::format("{} InDetDD::enum2uint: 'NONE' type is out of range for {}", callingFunctionName, typeid(T).name()));
54 }
55 return static_cast<size_t>(n);
56 }
57
58 std::string
60
61 std::string
63
64 std::string
66}
67
68#endif
Message Stream Member.
std::string PixelModuleTypeName(const PixelModuleType &t)
std::string PixelDiodeTypeName(const PixelDiodeType &t)
constexpr uint32_t invalidColumn
constexpr uint32_t invalidRow
constexpr std::size_t enum2uint(T n, std::string_view callingFunctionName="")
Convert an enum class to size_t for use as an array index.
constexpr uint32_t invalidFrontEnd
std::string PixelReadoutTechnologyName(const PixelReadoutTechnology &t)