22 auto const dbegin = fROPfirstChannel.begin(), dend = fROPfirstChannel.end();
23 auto const iNextData = std::upper_bound
25 assert(iNextData != dbegin);
27 return ((iNextData == dend) && (channel >= endChannel()))
28 ?
nullptr: &*std::prev(iNextData);
37 auto const dend = fROPfirstChannel.end();
38 auto const iData = std::find_if(
39 fROPfirstChannel.begin(), dend,
42 return (iData == dend)?
nullptr: &*iData;
Channel-to-wire mapping data structure.
ChannelsInROPStruct const * find(raw::ChannelID_t channel) const
Returns data of the ROP including channel, nullptr if none.
void clear()
Resets the data of the map to like just constructed.
raw::ChannelID_t fEndChannel
ID of the first invalid channel.
Class identifying a set of planes sharing readout channels.
Compares with a channel ID (std::less<>).
unsigned int ChannelID_t
Type representing the ID of a readout channel.
std::vector< ChannelsInROPStruct > fROPfirstChannel
Collection of channel ROP channel information, sorted by first channel.