Mapping for TPC identifiers.
More...
#include "GeometryIDmapper.h"
|
index_type | size () const |
| Returns the number of elements in the mapping. More...
|
|
bool | empty () const |
| Returns whether the mapping has no elements (false by assumptions). More...
|
|
unsigned int | dimSize () const |
| Dimensions of the Level dimension of this mapping. More...
|
|
bool | hasElement (GeoID const &id) const |
| Returns whether this mapping hosts data for the specified ID. More...
|
|
GeoID | firstID () const |
| Returns the ID of the first element with GeoID type. More...
|
|
GeoID | lastID () const |
| Returns the ID of the last covered element with GeoID type. More...
|
|
static constexpr unsigned int | dimensions () |
| Dimensions of the ID of this mapping. More...
|
|
template<typename Index>
class geo::TPCIDmapper< Index >
Mapping for TPC identifiers.
- Template Parameters
-
Index | (default: std::size_t ) type of flat index |
- See also
geo::GeoIDmapper
A customized version of geo::GeoIDmapper
offering TPC ID-specific interface.
Definition at line 31 of file GeometryIDmapper.h.
Prepares the mapping with the specified sizes.
- Parameters
-
nCryo | number of cryostats |
nTPCs | number of TPCs per cryostat |
The mapping is sized to map nCryo
cryostats, each with nTPCs
TPCs.
Definition at line 273 of file GeometryIDmapper.h.
geo::GeoIDmapper< geo::TPCID, Index > BaseMapper_t
Base class.
Sets all dimension sizes to 0
.
- See also
resize()
The mapping needs to be resized before it is useful again.
Dimensions of the ID of this mapping.
Dimensions of the Level
dimension of this mapping.
Returns whether the mapping has no elements (false
by assumptions).
Returns the ID of the first element with GeoID
type.
Returns whether this mapping covers the specified cryostat.
Definition at line 299 of file GeometryIDmapper.h.
bool hasElement(GeoID const &id) const
Returns whether this mapping hosts data for the specified ID.
Returns whether this mapping hosts data for the specified ID.
Returns whether this mapping covers the specified TPC.
Definition at line 302 of file GeometryIDmapper.h.
bool hasElement(GeoID const &id) const
Returns whether this mapping hosts data for the specified ID.
Returns the ID corresponding to the specified linear index
.
Returns the linear index corresponding to the specified ID.
Returns the ID of the last covered element with GeoID
type.
Returns the linear index corresponding to the specified ID.
Returns the ID corresponding to the specified linear index
.
Resizes the mapping to accommodate the specified dimension sizes.
- Parameters
-
dims | number of elements on all levels of the mapping |
- See also
resizeAs()
The size of each dimension is specified by the corresponding number, starting from the size of the outer dimension (cryostat).
template<typename Index>
void geo::TPCIDmapper< Index >::resize |
( |
unsigned int |
nCryo, |
|
|
unsigned int |
nTPCs |
|
) |
| |
|
inline |
Prepares the mapping for the specified sizes.
- Parameters
-
nCryo | number of cryostats |
nTPCs | number of TPCs |
- See also
resizeAs()
The mapping is sized to map nCryo
cryostats, each with nTPCs
TPCs.
Definition at line 289 of file GeometryIDmapper.h.
void resize(std::initializer_list< unsigned int > dims)
Resizes the mapping to accommodate the specified dimension sizes.
Resizes the mapping to reflect the one from another mapping.
- Parameters
-
other | ID mapping to take dimensions from |
The size of each dimension is taken by the matching one in other
.
Returns the number of elements in the mapping.
The documentation for this class was generated from the following file: