16 #include "cetlib_except/exception.h" 35 using chan_vect_t = std::vector<raw::ChannelID_t>;
39 = pset.
get<chan_vect_t>(
"BadChannels", chan_vect_t());
41 BadChannels.begin(), BadChannels.end(),
47 = pset.
get<chan_vect_t>(
"NoisyChannels", chan_vect_t());
49 NoisyChannels.begin(), NoisyChannels.end(),
96 <std::pair<ChannelSet_t::const_iterator, ChannelSet_t::const_iterator>>
117 <<
"Can't fill good channel list since no largest channel was set up\n";
121 while (channel <= last_channel) {
125 for (
auto iter: VetoedIDs) {
128 while (iter.first != iter.second) {
131 if (*(iter.first) > channel)
break;
133 if (*(iter.first) == channel) {
148 if (bGood) GoodChannels.insert(channel);
ChannelSet_t fNoisyChannels
set of noisy channels
void Setup(raw::ChannelID_t MaxChannel, raw::ChannelID_t MaxGoodChannel)
Sets the service provider up.
std::unique_ptr< ChannelSet_t > fGoodChannels
cached set of good channels (lazy evaluation)
raw::ChannelID_t MaxChannel() const
Returns the ID of the largest known channel.
raw::ChannelID_t fMaxPresentChannel
largest ID among present channels
virtual bool IsPresent(raw::ChannelID_t channel) const override
Returns whether the specified channel is physical and good.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
ChannelSet_t fBadChannels
set of bad channels
virtual ChannelSet_t NoisyChannels() const override
Returns a copy of set of noisy channel IDs for the current run.
T get(std::string const &key) const
Channel quality provider with information from configuration file.
constexpr bool isValidChannelID(raw::ChannelID_t channel)
lariov::ChannelStatusProvider::ChannelSet_t ChannelSet_t
Filters for channels, events, etc.
void FillGoodChannels() const
Fills the collection of good channels.
virtual ChannelSet_t BadChannels() const override
Returns a copy of set of bad channel IDs for the current run.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
virtual ChannelSet_t GoodChannels() const override
Returns a copy of set of bad channel IDs for the current run.
raw::ChannelID_t fMaxChannel
largest ID among existing channels
SimpleChannelStatus(fhicl::ParameterSet const &pset)
Configuration.
cet::coded_exception< error, detail::translate > exception