LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Class providing information about the quality of channels. More...
#include "SimpleChannelStatus.h"
Public Types | |
using | ChannelSet_t = lariov::ChannelStatusProvider::ChannelSet_t |
Public Member Functions | |
SimpleChannelStatus (fhicl::ParameterSet const &pset) | |
Configuration. More... | |
raw::ChannelID_t | MaxChannel () const |
Returns the ID of the largest known channel. More... | |
raw::ChannelID_t | MaxChannelPresent () const |
Returns the ID of the largest present channel. More... | |
Single channel queries | |
Returns whether the specified channel is physical and connected to wire | |
virtual bool | IsPresent (raw::ChannelID_t channel) const override |
Returns whether the specified channel is physical and good. More... | |
virtual bool | IsGood (raw::ChannelID_t channel) const override |
Returns whether the specified channel is physical and good. More... | |
virtual bool | IsBad (raw::ChannelID_t channel) const override |
Returns whether the specified channel is bad in the current run. More... | |
virtual bool | IsNoisy (raw::ChannelID_t channel) const override |
Returns whether the specified channel is noisy in the current run. More... | |
Global channel queries | |
Returns a copy of set of good channel IDs for the current run | |
virtual ChannelSet_t | GoodChannels () const override |
Returns a copy of set of bad channel IDs for the current run. More... | |
virtual ChannelSet_t | BadChannels () const override |
Returns a copy of set of bad channel IDs for the current run. More... | |
virtual ChannelSet_t | NoisyChannels () const override |
Returns a copy of set of noisy channel IDs for the current run. More... | |
Configuration functions | |
void | Setup (raw::ChannelID_t MaxChannel, raw::ChannelID_t MaxGoodChannel) |
Sets the service provider up. More... | |
void | Setup (raw::ChannelID_t MaxChannel) |
Sets the service provider up. More... | |
Protected Member Functions | |
void | FillGoodChannels () const |
Fills the collection of good channels. More... | |
Protected Attributes | |
ChannelSet_t | fBadChannels |
set of bad channels More... | |
ChannelSet_t | fNoisyChannels |
set of noisy channels More... | |
raw::ChannelID_t | fMaxChannel |
largest ID among existing channels More... | |
raw::ChannelID_t | fMaxPresentChannel |
largest ID among present channels More... | |
std::unique_ptr< ChannelSet_t > | fGoodChannels |
cached set of good channels (lazy evaluation) More... | |
Class providing information about the quality of channels.
This class serves information read from a FHiCL configuration file. Time-dependent (or, run-dependent) information is not supported.
All and only the channels up to the one specified in the Setup() call (that one included) are considered present. If no valid ID is specified, all channels are supposed present.
LArSoft interface to this class is through the service SimpleChannelStatusService.
Definition at line 49 of file SimpleChannelStatus.h.
using lariov::SimpleChannelStatus::ChannelSet_t = lariov::ChannelStatusProvider::ChannelSet_t |
Definition at line 51 of file SimpleChannelStatus.h.
|
explicit |
Configuration.
Definition at line 30 of file SimpleChannelStatus.cpp.
References BadChannels(), fBadChannels, fNoisyChannels, fhicl::ParameterSet::get(), NoisyChannels(), and Setup().
|
inlineoverridevirtual |
Returns a copy of set of bad channel IDs for the current run.
Definition at line 85 of file SimpleChannelStatus.h.
References fBadChannels.
Referenced by SimpleChannelStatus().
|
protected |
Fills the collection of good channels.
Definition at line 88 of file SimpleChannelStatus.cpp.
References fBadChannels, fGoodChannels, fMaxChannel, fMaxPresentChannel, fNoisyChannels, GoodChannels(), raw::isValidChannelID(), and lar::dump::vector().
Referenced by GoodChannels().
|
overridevirtual |
Returns a copy of set of bad channel IDs for the current run.
Definition at line 79 of file SimpleChannelStatus.cpp.
References fGoodChannels, and FillGoodChannels().
Referenced by FillGoodChannels(), and IsNoisy().
|
inlineoverridevirtual |
Returns whether the specified channel is bad in the current run.
Definition at line 70 of file SimpleChannelStatus.h.
References fBadChannels.
Referenced by IsGood().
|
inlineoverridevirtual |
Returns whether the specified channel is physical and good.
Definition at line 66 of file SimpleChannelStatus.h.
References IsBad(), IsNoisy(), and IsPresent().
|
inlineoverridevirtual |
Returns whether the specified channel is noisy in the current run.
Definition at line 74 of file SimpleChannelStatus.h.
References fNoisyChannels, and GoodChannels().
Referenced by IsGood().
|
overridevirtual |
Returns whether the specified channel is physical and good.
Definition at line 71 of file SimpleChannelStatus.cpp.
References fMaxPresentChannel, and raw::isValidChannelID().
Referenced by IsGood().
|
inline |
Returns the ID of the largest known channel.
Definition at line 99 of file SimpleChannelStatus.h.
References fMaxChannel.
Referenced by MaxChannelPresent(), and Setup().
|
inline |
Returns the ID of the largest present channel.
Definition at line 102 of file SimpleChannelStatus.h.
References fMaxPresentChannel, MaxChannel(), and Setup().
|
inlineoverridevirtual |
Returns a copy of set of noisy channel IDs for the current run.
Definition at line 89 of file SimpleChannelStatus.h.
References fNoisyChannels.
Referenced by SimpleChannelStatus().
void lariov::SimpleChannelStatus::Setup | ( | raw::ChannelID_t | MaxChannel, |
raw::ChannelID_t | MaxGoodChannel | ||
) |
Sets the service provider up.
MaxChannel | ID of the last channel |
MaxGoodChannel | ID of the last good channel |
Sets the largest ID of a physically present channel. All valid IDs smaller than this one are also considered present. If MaxGoodChannel is invalid, all channels are considered present.
Definition at line 58 of file SimpleChannelStatus.cpp.
References fGoodChannels, fMaxChannel, fMaxPresentChannel, and MaxChannel().
Referenced by MaxChannelPresent(), SimpleChannelStatus(), and lariov::SimpleChannelStatusService::SimpleChannelStatusService().
|
inline |
Sets the service provider up.
MaxChannel | ID of the last channel |
As Setup(raw::ChannelID_t, raw::ChannelID_t), but assumes all channels to be present.
Definition at line 127 of file SimpleChannelStatus.h.
References Setup().
Referenced by Setup().
|
protected |
set of bad channels
Definition at line 139 of file SimpleChannelStatus.h.
Referenced by BadChannels(), FillGoodChannels(), IsBad(), and SimpleChannelStatus().
|
mutableprotected |
cached set of good channels (lazy evaluation)
Definition at line 146 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), GoodChannels(), and Setup().
|
protected |
largest ID among existing channels
Definition at line 142 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), MaxChannel(), and Setup().
|
protected |
largest ID among present channels
Definition at line 143 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), IsPresent(), MaxChannelPresent(), and Setup().
|
protected |
set of noisy channels
Definition at line 140 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), IsNoisy(), NoisyChannels(), and SimpleChannelStatus().