All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions | Variables
geo::details Namespace Reference

Classes

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

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 GEOIT >
std::enable_if_t
< std::is_base_of_v
< geometry_iterator_base,
GEOIT >, std::ostream & > 
operator<< (std::ostream &out, GEOIT const &it)
 Stream output for all geometry ID iterator types: prints the pointed 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 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()
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  }
constexpr auto getAbsIDindex(ID const &id)
Definition: geo_types.h:55
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  }
constexpr auto getAbsIDindex(ID const &id)
Definition: geo_types.h:55
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  }
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()
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 5992 of file GeometryCore.h.

5993 {
5994  return iter.id_iterator() != id_iter;
5995 } // 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 751 of file GeometryCore.h.

755  { return iter != id_iter; }
template<typename GEOIT >
std::enable_if_t<std::is_base_of_v<geometry_iterator_base, GEOIT>, std::ostream&> geo::details::operator<< ( std::ostream &  out,
GEOIT const &  it 
)

Stream output for all geometry ID iterator types: prints the pointed ID.

Definition at line 721 of file GeometryCore.h.

722  { return out << "geometry_iterator{ " << *it << " }"; }
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 5985 of file GeometryCore.h.

5986 {
5987  return iter.id_iterator() == id_iter;
5988 } // 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 737 of file GeometryCore.h.

741  { 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); }
process_name gaushit a
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()
temporary value

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.