8 #ifndef LARCOREOBJ_SIMPLETYPESANDCONSTANTS_READOUT_TYPES_H 9 #define LARCOREOBJ_SIMPLETYPESANDCONSTANTS_READOUT_TYPES_H 27 template <std::
size_t Index,
typename ID>
30 template <std::
size_t Index,
typename ID>
33 return geo::details::getAbsIDindex<Index, ID>(id);
36 template <std::
size_t Index,
typename ID>
39 return geo::details::getAbsIDindex<Index, ID>(id);
60 static constexpr
TPCsetID_t InvalidID = std::numeric_limits<TPCsetID_t>::max();
82 explicit operator std::string()
const {
return toString(); }
94 template <std::
size_t Index>
95 constexpr
auto getIndex()
const;
102 static constexpr
auto Level = geo::details::index_for<TPCsetID>();
124 static constexpr
ROPID_t InvalidID = std::numeric_limits<ROPID_t>::max();
129 constexpr
ROPID() =
default;
147 explicit operator std::string()
const {
return toString(); }
159 template <std::
size_t Index>
160 constexpr
auto getIndex()
const;
167 static constexpr
auto Level = geo::details::index_for<ROPID>();
195 template <std::
size_t Index>
198 static_assert(Index <=
Level,
"This ID type does not have the requested Index level.");
199 return details::getAbsIDindex<Index>(*this);
203 template <std::
size_t Index>
206 static_assert(Index <=
Level,
"This ID type does not have the requested Index level.");
207 return details::getAbsIDindex<Index>(*this);
212 #endif // LARCOREOBJ_SIMPLETYPESANDCONSTANTS_READOUT_TYPES_H constexpr CryostatID & asCryostatID()
constexpr TPCsetID & asTPCsetID()
constexpr ParentID_t & parentID()
std::ostream & operator<<(std::ostream &out, TPCsetID const &sid)
Generic output of TPCsetID to stream.
auto & deepestIndex()
Returns the deepest ID available (readout plane's).
static constexpr ROPID_t getInvalidID()
Return the value of the invalid ROP ID as a r-value.
constexpr TPCsetID(CryostatID const &cryoid, TPCsetID_t s)
Constructor: TPC set with index s in the cryostat identified by cryoid.
static constexpr auto first()
unsigned int ROPID_t
Type for the ID number.
IDparameter< readout::ROPID > ROPID
Member type of validated readout::ROPID parameter.
geo::details::AbsIDtype< Index, ID > AbsIDtype
constexpr auto const & deepestIndex() const
Returns the value of the deepest ID available (TPC set's).
unsigned short TPCsetID_t
Type for the ID number.
constexpr auto getIndex() const
Returns the index level Index of this type.
Class identifying a set of TPC sharing readout channels.
constexpr CryostatID const & asCryostatID() const
Conversion to TPCsetID (for convenience of notation).
static constexpr auto first()
constexpr auto getIndex() const
Returns the index level Index of this type.
static constexpr TPCsetID_t InvalidID
Special code for an invalid ID.
std::string writeToString(T const &value)
Write the argument into a string.
typename AbsIDtypeStruct< ID, Index >::type AbsIDtype
auto & deepestIndex()
Returns the deepest ID available (TPC set's).
constexpr ParentID_t const & parentID() const
Return the parent ID of this one (a TPC set ID).
constexpr ROPID(TPCsetID const &tpcsetid, ROPID_t r)
Constructor: readout plane with index r in the TPC set identified by tpcsetid.
ROPID_t ROP
Index of the readout plane within its TPC set.
constexpr TPCsetID const & asTPCsetID() const
Conversion to ROPID (for convenience of notation).
IDparameter< readout::TPCsetID > TPCsetID
Member type of validated readout::TPCsetID parameter.
static constexpr auto first(CryostatID const &id)
static constexpr auto first(TPCsetID const &id)
Definition of data types for geometry description.
Class identifying a set of planes sharing readout channels.
TPCsetID_t TPCset
Index of the TPC set within its cryostat.
constexpr TPCsetID(CryostatID_t c, TPCsetID_t s)
Constructor: TPC set with index s in the cryostat index c.
unsigned int CryostatID_t
Type for the ID number.
constexpr auto getAbsIDindex(ID const &id)
constexpr ParentID_t const & parentID() const
Return the parent ID of this one (a cryostat ID).
static constexpr TPCsetID_t getInvalidID()
Return the value of the invalid TPC ID as a r-value.
constexpr auto const & deepestIndex() const
Returns the value of the deepest ID available (readout plane's).
constexpr ParentID_t & parentID()
static constexpr auto first()
constexpr ROPID(CryostatID_t c, TPCsetID_t s, ROPID_t r)
static constexpr auto first(CryostatID const &id)
static constexpr ROPID_t InvalidID
Special code for an invalid ID.
std::string writeToString(T const &value)
geo::CryostatID CryostatID
The data type to uniquely identify a cryostat.