16 #include "fhiclcpp/ParameterSet.h"
17 #include "cetlib/container_algorithms.h"
18 #include "cetlib_except/exception.h"
33 using chan_vect_t = std::vector<raw::ChannelID_t>;
36 auto BadChannels = pset.get<chan_vect_t>(
"BadChannels", {});
41 auto NoisyChannels = pset.get<chan_vect_t>(
"NoisyChannels", {});
53 fMaxChannel = MaxChannel;
54 fMaxPresentChannel = MaxGoodChannel;
57 fGoodChannels.reset();
88 <std::pair<ChannelSet_t::const_iterator, ChannelSet_t::const_iterator>>
108 throw cet::exception(
"SimpleChannelStatus")
109 <<
"Can't fill good channel list since no largest channel was set up\n";
113 while (channel <= last_channel) {
117 for (
auto iter: VetoedIDs) {
120 while (iter.first != iter.second) {
123 if (*(iter.first) > channel)
break;
125 if (*(iter.first) == channel) {
140 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.
virtual ChannelSet_t BadChannels() const override
Returns a copy of set of bad channel IDs for the current run.
std::unique_ptr< ChannelSet_t > fGoodChannels
cached set of good channels (lazy evaluation)
virtual bool IsPresent(raw::ChannelID_t channel) const override
Returns whether the specified channel is physical and connected to wire.
virtual ChannelSet_t NoisyChannels() const override
Returns a copy of set of noisy channel IDs for the current run.
raw::ChannelID_t fMaxPresentChannel
largest ID among present channels
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
Channel quality provider with information from configuration file.
constexpr bool isValidChannelID(raw::ChannelID_t channel)
lariov::ChannelStatusProvider::ChannelSet_t ChannelSet_t
void FillGoodChannels() const
Fills the collection of good channels.
virtual ChannelSet_t GoodChannels() const override
Returns a copy of set of good channel IDs for the current run.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
raw::ChannelID_t fMaxChannel
largest ID among existing channels
SimpleChannelStatus(fhicl::ParameterSet const &pset)
Configuration.