LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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 48 of file SimpleChannelStatus.h.
using lariov::SimpleChannelStatus::ChannelSet_t = lariov::ChannelStatusProvider::ChannelSet_t |
Definition at line 50 of file SimpleChannelStatus.h.
|
explicit |
Configuration.
Definition at line 27 of file SimpleChannelStatus.cpp.
References BadChannels(), fBadChannels, fNoisyChannels, fhicl::ParameterSet::get(), and NoisyChannels().
|
inlineoverridevirtual |
Returns a copy of set of bad channel IDs for the current run.
Definition at line 89 of file SimpleChannelStatus.h.
Referenced by SimpleChannelStatus().
|
protected |
Fills the collection of good channels.
Definition at line 72 of file SimpleChannelStatus.cpp.
References fBadChannels, fGoodChannels, fMaxChannel, fMaxPresentChannel, fNoisyChannels, GoodChannels(), and raw::isValidChannelID().
Referenced by GoodChannels().
|
overridevirtual |
Returns a copy of set of bad channel IDs for the current run.
Definition at line 63 of file SimpleChannelStatus.cpp.
References fGoodChannels, and FillGoodChannels().
Referenced by FillGoodChannels().
|
inlineoverridevirtual |
Returns whether the specified channel is bad in the current run.
Definition at line 71 of file SimpleChannelStatus.h.
|
inlineoverridevirtual |
Returns whether the specified channel is physical and good.
Definition at line 65 of file SimpleChannelStatus.h.
|
inlineoverridevirtual |
Returns whether the specified channel is noisy in the current run.
Definition at line 77 of file SimpleChannelStatus.h.
|
overridevirtual |
Returns whether the specified channel is physical and good.
Definition at line 55 of file SimpleChannelStatus.cpp.
References fMaxPresentChannel, and raw::isValidChannelID().
|
inline |
Returns the ID of the largest known channel.
Definition at line 100 of file SimpleChannelStatus.h.
Referenced by Setup().
|
inline |
Returns the ID of the largest present channel.
Definition at line 103 of file SimpleChannelStatus.h.
|
inlineoverridevirtual |
Returns a copy of set of noisy channel IDs for the current run.
Definition at line 92 of file SimpleChannelStatus.h.
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 43 of file SimpleChannelStatus.cpp.
References fGoodChannels, fMaxChannel, fMaxPresentChannel, and MaxChannel().
Referenced by 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 126 of file SimpleChannelStatus.h.
References Setup().
Referenced by Setup().
|
protected |
set of bad channels
Definition at line 137 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), and SimpleChannelStatus().
|
mutableprotected |
cached set of good channels (lazy evaluation)
Definition at line 144 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), GoodChannels(), and Setup().
|
protected |
largest ID among existing channels
Definition at line 140 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), and Setup().
|
protected |
largest ID among present channels
Definition at line 141 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), IsPresent(), and Setup().
|
protected |
set of noisy channels
Definition at line 138 of file SimpleChannelStatus.h.
Referenced by FillGoodChannels(), and SimpleChannelStatus().