LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
geo::details::GeometryIterationPolicy Class Reference

#include "GeometryIterationPolicy.h"

Inheritance diagram for geo::details::GeometryIterationPolicy:
geo::details::ReadoutIterationPolicy

Public Member Functions

 GeometryIterationPolicy ()=default
 
 GeometryIterationPolicy (GeometryCore const *geom)
 
unsigned int NSiblings (CryostatID const &id) const
 
unsigned int NSiblings (TPCID const &id) const
 
template<typename GeoID >
GeoID GetEndID () const
 
template<typename GeoID , typename ContextID >
GeoID GetEndID (ContextID const &id) const
 
template<>
CryostatID GetEndID () const
 Initializes the specified ID with the invalid ID after the last cryostat. More...
 
template<>
TPCID GetEndID () const
 
template<>
TPCID GetEndID (CryostatID const &id) const
 

Protected Member Functions

CryostatID EndCryostatID () const
 
TPCID EndTPCID () const
 
TPCID EndTPCID (CryostatID const &id) const
 

Protected Attributes

GeometryCore const * fGeom {nullptr}
 

Detailed Description

Definition at line 9 of file GeometryIterationPolicy.h.

Constructor & Destructor Documentation

geo::details::GeometryIterationPolicy::GeometryIterationPolicy ( )
default
geo::details::GeometryIterationPolicy::GeometryIterationPolicy ( GeometryCore const *  geom)
explicit

Definition at line 6 of file GeometryIterationPolicy.cxx.

6 : fGeom{geom} {}

Member Function Documentation

CryostatID geo::details::GeometryIterationPolicy::EndCryostatID ( ) const
protected

Definition at line 19 of file GeometryIterationPolicy.cxx.

References fGeom, and geo::GeometryCore::Ncryostats().

Referenced by geo::details::ReadoutIterationPolicy::EndTPCsetID(), and GetEndID().

20  {
21  return CryostatID{fGeom->Ncryostats()};
22  }
IDparameter< geo::CryostatID > CryostatID
Member type of validated geo::CryostatID parameter.
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
Definition: GeometryCore.h:303
TPCID geo::details::GeometryIterationPolicy::EndTPCID ( ) const
protected

Definition at line 25 of file GeometryIterationPolicy.cxx.

References fGeom, geo::TPCID::first(), geo::GeometryCore::MaxTPCs(), and geo::GeometryCore::Ncryostats().

Referenced by geo::details::ReadoutIterationPolicy::EndPlaneID(), and GetEndID().

26  {
27  auto id = TPCID::first();
28  if (fGeom->MaxTPCs() != 0) { id.Cryostat = fGeom->Ncryostats(); }
29  return id;
30  }
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
Definition: GeometryCore.h:303
static constexpr auto first()
Definition: geo_types.h:328
unsigned int MaxTPCs() const
Returns the largest number of TPCs a cryostat in the detector has.
TPCID geo::details::GeometryIterationPolicy::EndTPCID ( CryostatID const &  id) const
protected

Definition at line 32 of file GeometryIterationPolicy.cxx.

References geo::details::GetNextID().

33  {
34  return {GetNextID(id, *this), 0};
35  }
GeoID GetNextID(GeoID const &id, IterationPolicy const &policy)
Returns the ID next to the specified one.
Definition: id_iterators.h:285
template<typename GeoID >
GeoID geo::details::GeometryIterationPolicy::GetEndID ( ) const
template<typename GeoID , typename ContextID >
GeoID geo::details::GeometryIterationPolicy::GetEndID ( ContextID const &  id) const
template<>
CryostatID geo::details::GeometryIterationPolicy::GetEndID ( ) const
inline

Initializes the specified ID with the invalid ID after the last cryostat.

Definition at line 33 of file GeometryIterationPolicy.h.

References EndCryostatID().

34  {
35  return EndCryostatID();
36  }
template<>
TPCID geo::details::GeometryIterationPolicy::GetEndID ( ) const
inline

Definition at line 40 of file GeometryIterationPolicy.h.

References EndTPCID().

41  {
42  return EndTPCID();
43  }
template<>
TPCID geo::details::GeometryIterationPolicy::GetEndID ( CryostatID const &  id) const
inline
unsigned int geo::details::GeometryIterationPolicy::NSiblings ( CryostatID const &  id) const

Definition at line 8 of file GeometryIterationPolicy.cxx.

References fGeom, and geo::GeometryCore::NSiblingElements().

9  {
10  return fGeom->NSiblingElements(id);
11  }
unsigned int NSiblingElements(CryostatID const &) const
Returns the number of cryostats in the detector.
Definition: GeometryCore.h:305
unsigned int geo::details::GeometryIterationPolicy::NSiblings ( TPCID const &  id) const

Definition at line 13 of file GeometryIterationPolicy.cxx.

References fGeom, and geo::GeometryCore::NSiblingElements().

14  {
15  return fGeom->NSiblingElements(id);
16  }
unsigned int NSiblingElements(CryostatID const &) const
Returns the number of cryostats in the detector.
Definition: GeometryCore.h:305

Member Data Documentation

GeometryCore const* geo::details::GeometryIterationPolicy::fGeom {nullptr}
protected

Definition at line 28 of file GeometryIterationPolicy.h.

Referenced by EndCryostatID(), EndTPCID(), and NSiblings().


The documentation for this class was generated from the following files: