9 #ifndef ICARUSALG_GEOMETRY_DETAILS_CHANNELTOWIREMAP_H
10 #define ICARUSALG_GEOMETRY_DETAILS_CHANNELTOWIREMAP_H
46 template <
typename A,
typename B>
56 template <
typename A,
typename B>
57 static constexpr
bool cmp(
A const&
a, B
const& b)
67 : firstChannel(firstChannel)
68 , nChannels(nChannels)
78 {
return Compare{}(*
this, other); }
125 #endif // ICARUSALG_GEOMETRY_DETAILS_CHANNELTOWIREMAP_H
void setEndChannel(raw::ChannelID_t channel)
Sets the ID of the channels after the last valid one.
readout::ROPID ropid
ID of the ROP we cover.
Classes identifying readout-related concepts.
constexpr bool operator()(A const &a, B const &b) const
ChannelsInROPStruct const * find(raw::ChannelID_t channel) const
Returns data of the ROP including channel, nullptr if none.
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Mapping of ROP channels into wires.
constexpr bool isChannelAbove(raw::ChannelID_t channel) const
Returns if channel is not in a lower ROP than this one.
constexpr bool operator<(ChannelsInROPStruct const &other) const
Strict ordering according to the first channel in ROP.
void clear()
Resets the data of the map to like just constructed.
static constexpr bool cmp(A const &a, B const &b)
raw::ChannelID_t fEndChannel
ID of the first invalid channel.
Class identifying a set of planes sharing readout channels.
static constexpr raw::ChannelID_t channelOf(raw::ChannelID_t channel)
raw::ChannelID_t firstChannel
First channel in ROP.
unsigned int nChannels() const
Returns the number of mapped channels.
raw::ChannelID_t endChannel() const
Returns the ID of the first invalid channel (the last channel, plus 1).
Compares with a channel ID (std::less<>).
unsigned int ChannelID_t
Type representing the ID of a readout channel.
ChannelsInROPStruct(raw::ChannelID_t firstChannel, unsigned int nChannels, readout::ROPID const &ropid)
std::vector< ChannelsInROPStruct > fROPfirstChannel
Collection of channel ROP channel information, sorted by first channel.
ChannelsInROPStruct()=default
void addROP(readout::ROPID const &rid, raw::ChannelID_t firstROPchannel, unsigned int nChannels)