Classes | Typedefs | Functions | Variables
geo::details Namespace Reference

Classes

struct  AbsIDtypeStruct
 
struct  AbsIDtypeStruct< ID, Index, std::enable_if_t<(Index==ID::Level)> >
 
struct  ActiveAreaCalculator
 Class computing the active area of the plane. More...
 
struct  Comparer
 Class managing comparisons between T objects via a Key key. More...
 
class  cryostat_id_iterator_base
 Base forward iterator browsing all cryostat IDs in the detector. More...
 
class  GeoContainerData
 
class  GeoIDdataContainerItemIterator
 Item iterator for geo::GeoIDdataContainer class. More...
 
class  GeoIDdataContainerIterator
 Iterator for geo::GeoIDdataContainer class. More...
 
class  geometry_element_iterator
 Forward iterator browsing all geometry elements in the detector. More...
 
class  geometry_iterator_base
 Base class for geometry iterators (note: this is not an iterator) More...
 
class  geometry_iterator_types
 Base class for geometry iterators, containing some type definitions. More...
 
class  plane_id_iterator_base
 Base forward iterator browsing all plane IDs in the detector. More...
 
struct  RelIDtypeStruct
 
struct  RelIDtypeStruct< ID, 0U >
 
class  ROP_id_iterator_base
 Base forward iterator browsing all readout plane IDs in the detector. More...
 
class  TestTrackerClassBase
 Class telling whether a test needs to be run. More...
 
class  TPC_id_iterator_base
 Base forward iterator browsing all TPC IDs in the detector. More...
 
class  TPCset_id_iterator_base
 Base forward iterator browsing all TPC set IDs in the detector. More...
 
struct  TransformationMatrixConverter
 
class  wire_id_iterator_base
 Base forward iterator browsing all wire IDs in the detector. More...
 

Typedefs

template<std::size_t Index, typename ID >
using AbsIDtype = typename AbsIDtypeStruct< ID, Index >::type
 
template<std::size_t UpIndex, typename ID >
using RelIDtype = typename RelIDtypeStruct< ID, UpIndex >::type
 

Functions

template<std::size_t Levels = 4U>
static std::array< unsigned int, Levels > extractMaxGeometryElements (geo::GeometryData_t::CryostatList_t const &Cryostats)
 Extracts the maximum number of elements per type. More...
 
template<typename T >
auto static_less (T a, T b)
 Function translation of std::less. More...
 
template<typename GEOIDITER >
bool operator== (geometry_element_iterator< GEOIDITER > const &iter, GEOIDITER const &id_iter)
 Comparison operator: geometry ID and element point to the same ID. More...
 
template<typename GEOIDITER >
bool operator== (GEOIDITER const &id_iter, geometry_element_iterator< GEOIDITER > const &iter)
 Comparison operator: geometry ID and element point to the same ID. More...
 
template<typename GEOIDITER >
bool operator!= (geometry_element_iterator< GEOIDITER > const &iter, GEOIDITER const &id_iter)
 Comparison operator: geometry ID and element point to different IDs. More...
 
template<typename GEOIDITER >
bool operator!= (GEOIDITER const &id_iter, geometry_element_iterator< GEOIDITER > const &iter)
 Comparison operator: geometry ID and element point to different IDs. More...
 
template<std::size_t N, typename T >
auto initializerListToArray (std::initializer_list< T > values)
 Returns a STL array of size N filled with values from the argument. More...
 
template<typename T >
std::string writeToString (T const &value)
 Write the argument into a string. More...
 
template<typename ID >
constexpr std::size_t geoElementLevel ()
 
template<std::size_t Index, typename ID >
constexpr auto getAbsIDindex (ID const &id)
 
template<std::size_t Index, typename ID >
auto & getAbsIDindex (ID &id)
 
template<std::size_t UpIndex, typename ID >
auto getRelIDindex (ID const &id)
 

Variables

template<typename ID >
constexpr bool isTopGeoElementID = std::is_void_v<typename ID::ParentID_t>
 Whether ID represents an element on top of the hierarchy. More...
 

Typedef Documentation

template<std::size_t Index, typename ID >
using geo::details::AbsIDtype = typedef typename AbsIDtypeStruct<ID, Index>::type

Definition at line 46 of file geo_types.h.

template<std::size_t UpIndex, typename ID >
using geo::details::RelIDtype = typedef typename RelIDtypeStruct<ID, UpIndex>::type

Definition at line 52 of file geo_types.h.

Function Documentation

template<std::size_t Levels = 4U>
static std::array<unsigned int, Levels> geo::details::extractMaxGeometryElements ( geo::GeometryData_t::CryostatList_t const &  Cryostats)
static

Extracts the maximum number of elements per type.

Template Parameters
Levelsthe number of detector elements to discover
Parameters
Cryostatsthe sorted list of cryostats in the detector
Returns
an array with maximum number of cryostats, TPCs, planes and wires

The returned array includes:

  • index [0]: number of cryostats
  • index [1]: maximum number of TPCs in any of the cryostats (enabled only if Levels is 2 or higher)
  • index [2]: maximum number of wire planes in any of the TPCs (enabled only if Levels is 3 or higher)
  • index [3]: maximum number of wires in any of the wire planes (enabled only if Levels is 4)
template<typename ID >
constexpr std::size_t geo::details::geoElementLevel ( )

Definition at line 37 of file geo_types.h.

37  {
38  if constexpr(isTopGeoElementID<ID>) return 0U;
39  else return geoElementLevel<typename ID::ParentID_t>() + 1U;
40  } // geoElementLevel()
unsigned int ID
constexpr std::size_t geoElementLevel()
Definition: geo_types.h:37
template<std::size_t Index, typename ID >
constexpr auto geo::details::getAbsIDindex ( ID const &  id)

Definition at line 55 of file geo_types.h.

56  {
57  static_assert(Index <= ID::Level, "Index not available for this type.");
58  if constexpr (Index == ID::Level) return id.deepestIndex();
59  else return getAbsIDindex<Index>(id.parentID());
60  }
Level
Definition: Level.h:13
unsigned int Index
auto & getAbsIDindex(ID &id)
Definition: geo_types.h:63
template<std::size_t Index, typename ID >
auto& geo::details::getAbsIDindex ( ID &  id)

Definition at line 63 of file geo_types.h.

64  {
65  static_assert(Index <= ID::Level, "Index not available for this type.");
66  if constexpr (Index == ID::Level) return id.deepestIndex();
67  else return getAbsIDindex<Index>(id.parentID());
68  }
Level
Definition: Level.h:13
unsigned int Index
auto & getAbsIDindex(ID &id)
Definition: geo_types.h:63
template<std::size_t UpIndex, typename ID >
auto geo::details::getRelIDindex ( ID const &  id)

Definition at line 71 of file geo_types.h.

72  {
73  static_assert
74  (UpIndex <= ID::Level, "Index not available for this type.");
75  if constexpr (UpIndex == 0) return id.deepestIndex();
76  else return getRelIDindex<UpIndex - 1U>(id.parentID());
77  }
Level
Definition: Level.h:13
auto getRelIDindex(ID const &id)
Definition: geo_types.h:71
template<std::size_t N, typename T >
auto geo::details::initializerListToArray ( std::initializer_list< T >  values)

Returns a STL array of size N filled with values from the argument.

Definition at line 421 of file GeometryIDmapper.h.

421  {
422  std::array<T, N> data;
423  std::copy(values.begin(), values.end(), data.begin());
424  return data;
425 } // geo::details::initializerListToArray()
Q_UINT16 values[128]
T copy(T const &v)
template<typename GEOIDITER >
bool geo::details::operator!= ( geometry_element_iterator< GEOIDITER > const &  iter,
GEOIDITER const &  id_iter 
)

Comparison operator: geometry ID and element point to different IDs.

Definition at line 5993 of file GeometryCore.h.

5994 {
5995  return iter.id_iterator() != id_iter;
5996 } // operator!=(iterator_t, id_iterator_t)
template<typename GEOIDITER >
bool geo::details::operator!= ( GEOIDITER const &  id_iter,
geometry_element_iterator< GEOIDITER > const &  iter 
)
inline

Comparison operator: geometry ID and element point to different IDs.

Definition at line 743 of file GeometryCore.h.

747  { return iter != id_iter; }
template<typename GEOIDITER >
bool geo::details::operator== ( geometry_element_iterator< GEOIDITER > const &  iter,
GEOIDITER const &  id_iter 
)

Comparison operator: geometry ID and element point to the same ID.

Definition at line 5986 of file GeometryCore.h.

5987 {
5988  return iter.id_iterator() == id_iter;
5989 } // operator==(iterator_t, id_iterator_t)
template<typename GEOIDITER >
bool geo::details::operator== ( GEOIDITER const &  id_iter,
geometry_element_iterator< GEOIDITER > const &  iter 
)
inline

Comparison operator: geometry ID and element point to the same ID.

Definition at line 729 of file GeometryCore.h.

733  { return iter == id_iter; }
template<typename T >
auto geo::details::static_less ( a,
b 
)

Function translation of std::less.

Definition at line 62 of file DriftPartitions.h.

63  { return std::less<T>()(a, b); }
const double a
static bool * b
Definition: config.cpp:1043
template<typename T >
std::string geo::details::writeToString ( T const &  value)
inline

Write the argument into a string.

Definition at line 864 of file geo_types.h.

864  {
865  std::ostringstream sstr;
866  sstr << value;
867  return sstr.str();
868  } // writeToString()

Variable Documentation

template<typename ID >
constexpr bool geo::details::isTopGeoElementID = std::is_void_v<typename ID::ParentID_t>

Whether ID represents an element on top of the hierarchy.

Definition at line 34 of file geo_types.h.