Class providing information about the quality of channels. More...
#include <SimpleChannelStatus.h>
Public Types | |
using | ChannelSet_t = lariov::ChannelStatusProvider::ChannelSet_t |
Public Types inherited from lariov::ChannelStatusProvider | |
using | Status_t = unsigned short |
type representing channel status More... | |
using | ChannelSet_t = std::set< raw::ChannelID_t > |
Type of set of channel IDs. More... | |
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 connected to wire. 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 good 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... | |
Public Member Functions inherited from lariov::ChannelStatusProvider | |
ChannelStatusProvider ()=default | |
Default constructor. More... | |
ChannelStatusProvider (ChannelStatusProvider const &)=delete | |
ChannelStatusProvider (ChannelStatusProvider &&)=delete | |
ChannelStatusProvider & | operator= (ChannelStatusProvider const &)=delete |
ChannelStatusProvider & | operator= (ChannelStatusProvider &&)=delete |
virtual | ~ChannelStatusProvider ()=default |
Virtual destructor; destructs nothing. More... | |
virtual Status_t | Status (raw::ChannelID_t channel) const |
Returns a status integer with arbitrary meaning. More... | |
virtual bool | HasStatus (raw::ChannelID_t channel) const |
Returns whether the specified status is a valid one. 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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from lariov::ChannelStatusProvider | |
static bool | IsValidStatus (Status_t status) |
Returns whether the specified status is a valid one. More... | |
Static Public Attributes inherited from lariov::ChannelStatusProvider | |
static constexpr Status_t | InvalidStatus = std::numeric_limits<Status_t>::max() |
Value or invalid status. 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.
Definition at line 51 of file SimpleChannelStatus.h.
|
explicit |
Configuration.
Definition at line 29 of file SimpleChannelStatus.cpp.
|
inlineoverridevirtual |
Returns a copy of set of bad channel IDs for the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 85 of file SimpleChannelStatus.h.
|
protected |
Fills the collection of good channels.
Definition at line 80 of file SimpleChannelStatus.cpp.
|
overridevirtual |
Returns a copy of set of good channel IDs for the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 71 of file SimpleChannelStatus.cpp.
|
inlineoverridevirtual |
Returns whether the specified channel is bad in the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 70 of file SimpleChannelStatus.h.
|
inlineoverridevirtual |
Returns whether the specified channel is physical and good.
Reimplemented from lariov::ChannelStatusProvider.
Definition at line 66 of file SimpleChannelStatus.h.
|
inlineoverridevirtual |
Returns whether the specified channel is noisy in the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 74 of file SimpleChannelStatus.h.
|
overridevirtual |
Returns whether the specified channel is physical and connected to wire.
Implements lariov::ChannelStatusProvider.
Definition at line 63 of file SimpleChannelStatus.cpp.
|
inline |
Returns the ID of the largest known channel.
Definition at line 99 of file SimpleChannelStatus.h.
|
inline |
Returns the ID of the largest present channel.
Definition at line 102 of file SimpleChannelStatus.h.
|
inlineoverridevirtual |
Returns a copy of set of noisy channel IDs for the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 89 of file SimpleChannelStatus.h.
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 50 of file SimpleChannelStatus.cpp.
|
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.
|
protected |
set of bad channels
Definition at line 139 of file SimpleChannelStatus.h.
|
mutableprotected |
cached set of good channels (lazy evaluation)
Definition at line 146 of file SimpleChannelStatus.h.
|
protected |
largest ID among existing channels
Definition at line 142 of file SimpleChannelStatus.h.
|
protected |
largest ID among present channels
Definition at line 143 of file SimpleChannelStatus.h.
|
protected |
set of noisy channels
Definition at line 140 of file SimpleChannelStatus.h.