10 #ifndef LARCOREALG_GEOMETRY_DETAILS_EXTRACTMAXGEOMETRYELEMENTS_H
11 #define LARCOREALG_GEOMETRY_DETAILS_EXTRACTMAXGEOMETRYELEMENTS_H
25 namespace geo::details {
44 template <std::
size_t Levels = 4U>
54 template <std::size_t Levels >
55 std::array<unsigned int, Levels>
59 static_assert(Levels > 0U);
60 static_assert(Levels <= 4U);
62 std::array<unsigned int, Levels> maxElements;
65 auto setMax = [&maxElements](std::size_t index,
unsigned int value)
66 {
if (maxElements[index] <
value) maxElements[index] =
value; };
68 setMax(0U, Cryostats.size());
69 if constexpr(Levels > 1U) {
71 setMax(1U, cryo.NTPC());
72 if constexpr(Levels > 2U) {
74 setMax(2U,
TPC.Nplanes());
75 if constexpr(Levels > 3U) {
77 setMax(3U, plane.Nwires());
92 #endif // LARCOREALG_GEOMETRY_DETAILS_EXTRACTMAXGEOMETRYELEMENTS_H
Encapsulate the construction of a single cyostat.
Simple data structure holding the data of the geometry.
Geometry information for a single TPC.
static std::array< unsigned int, Levels > extractMaxGeometryElements(geo::GeometryData_t::CryostatList_t const &Cryostats)
Extracts the maximum number of elements per type.
std::vector< geo::CryostatGeo > CryostatList_t
Type of list of cryostats.
Geometry information for a single cryostat.
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Encapsulate the construction of a single detector plane.
Encapsulate the construction of a single detector plane.