Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
lariov::ChannelStatusProvider Class Referenceabstract

Class providing information about the quality of channels. More...

#include <ChannelStatusProvider.h>

Inheritance diagram for lariov::ChannelStatusProvider:
lar::UncopiableAndUnmovableClass detvar::RandomChannelStatusProvider lariov::SimpleChannelStatus lariov::SIOVChannelStatusProvider

Public Types

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

 ChannelStatusProvider ()=default
 Default constructor. More...
 
 ChannelStatusProvider (ChannelStatusProvider const &)=delete
 
 ChannelStatusProvider (ChannelStatusProvider &&)=delete
 
ChannelStatusProvideroperator= (ChannelStatusProvider const &)=delete
 
ChannelStatusProvideroperator= (ChannelStatusProvider &&)=delete
 
virtual ~ChannelStatusProvider ()=default
 Virtual destructor; destructs nothing. More...
 
virtual bool IsPresent (raw::ChannelID_t channel) const =0
 Returns whether the specified channel is physical and connected to wire. More...
 
virtual bool IsBad (raw::ChannelID_t channel) const =0
 Returns whether the specified channel is bad in the current run. More...
 
virtual bool IsNoisy (raw::ChannelID_t channel) const =0
 Returns whether the specified channel is noisy in the current run. More...
 
virtual bool IsGood (raw::ChannelID_t channel) const
 Returns whether the specified channel is physical and good. 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...
 
virtual ChannelSet_t GoodChannels () const =0
 Returns a copy of set of good channel IDs for the current run. More...
 
virtual ChannelSet_t BadChannels () const =0
 Returns a copy of set of bad channel IDs for the current run. More...
 
virtual ChannelSet_t NoisyChannels () const =0
 Returns a copy of set of noisy channel IDs for the current run. More...
 

Static Public Member Functions

static bool IsValidStatus (Status_t status)
 Returns whether the specified status is a valid one. More...
 

Static Public Attributes

static constexpr Status_t InvalidStatus = std::numeric_limits<Status_t>::max()
 Value or invalid status. More...
 

Additional Inherited Members

- Private Member Functions inherited from lar::UncopiableClass
 UncopiableClass ()=default
 Default constructor. More...
 
 ~UncopiableClass ()=default
 Default destructor. More...
 
 UncopiableClass (UncopiableClass const &)=delete
 Deleted copy and move constructors and assignments. More...
 
 UncopiableClass (UncopiableClass &&)=default
 
UncopiableClassoperator= (UncopiableClass const &)=delete
 
UncopiableClassoperator= (UncopiableClass &&)=default
 
- Private Member Functions inherited from lar::UnmovableClass
 UnmovableClass ()=default
 Default constructor. More...
 
 ~UnmovableClass ()=default
 Default destructor. More...
 
 UnmovableClass (UnmovableClass const &)=default
 Default copy constructor and assignment. More...
 
UnmovableClassoperator= (UnmovableClass const &)=default
 
 UnmovableClass (UnmovableClass &&)=delete
 Deleted move constructor and assignment. More...
 
UnmovableClassoperator= (UnmovableClass &&)=delete
 

Detailed Description

Class providing information about the quality of channels.


This class provides only a simple interface. Experiments need to implement and configure their own class implementing this interface. The simplest implementation is provided in LArSoft: SimpleChannelStatus.

Currently, the class provides interface for the following information:

It also has a stub interface to inform the object of which time we are interested in.

Definition at line 49 of file ChannelStatusProvider.h.

Member Typedef Documentation

Type of set of channel IDs.

Definition at line 56 of file ChannelStatusProvider.h.

type representing channel status

Definition at line 53 of file ChannelStatusProvider.h.

Constructor & Destructor Documentation

lariov::ChannelStatusProvider::ChannelStatusProvider ( )
default

Default constructor.

lariov::ChannelStatusProvider::ChannelStatusProvider ( ChannelStatusProvider const &  )
delete
lariov::ChannelStatusProvider::ChannelStatusProvider ( ChannelStatusProvider &&  )
delete
virtual lariov::ChannelStatusProvider::~ChannelStatusProvider ( )
virtualdefault

Virtual destructor; destructs nothing.

Member Function Documentation

virtual ChannelSet_t lariov::ChannelStatusProvider::BadChannels ( ) const
pure virtual

Returns a copy of set of bad channel IDs for the current run.

Implemented in lariov::SIOVChannelStatusProvider, lariov::SimpleChannelStatus, and detvar::RandomChannelStatusProvider.

virtual ChannelSet_t lariov::ChannelStatusProvider::GoodChannels ( ) const
pure virtual

Returns a copy of set of good channel IDs for the current run.

Implemented in lariov::SIOVChannelStatusProvider, lariov::SimpleChannelStatus, and detvar::RandomChannelStatusProvider.

virtual bool lariov::ChannelStatusProvider::HasStatus ( raw::ChannelID_t  channel) const
inlinevirtual

Returns whether the specified status is a valid one.

Definition at line 93 of file ChannelStatusProvider.h.

94  { return IsValidStatus(Status(channel)); }
uint8_t channel
Definition: CRTFragment.hh:201
virtual Status_t Status(raw::ChannelID_t channel) const
Returns a status integer with arbitrary meaning.
static bool IsValidStatus(Status_t status)
Returns whether the specified status is a valid one.
virtual bool lariov::ChannelStatusProvider::IsBad ( raw::ChannelID_t  channel) const
pure virtual

Returns whether the specified channel is bad in the current run.

Implemented in lariov::SimpleChannelStatus, lariov::SIOVChannelStatusProvider, and detvar::RandomChannelStatusProvider.

virtual bool lariov::ChannelStatusProvider::IsGood ( raw::ChannelID_t  channel) const
inlinevirtual

Returns whether the specified channel is physical and good.

Reimplemented in lariov::SIOVChannelStatusProvider, and lariov::SimpleChannelStatus.

Definition at line 84 of file ChannelStatusProvider.h.

84  {
85  return IsPresent(channel) && !IsBad(channel) && !IsNoisy(channel);
86  }
virtual bool IsBad(raw::ChannelID_t channel) const =0
Returns whether the specified channel is bad in the current run.
virtual bool IsNoisy(raw::ChannelID_t channel) const =0
Returns whether the specified channel is noisy in the current run.
uint8_t channel
Definition: CRTFragment.hh:201
virtual bool IsPresent(raw::ChannelID_t channel) const =0
Returns whether the specified channel is physical and connected to wire.
virtual bool lariov::ChannelStatusProvider::IsNoisy ( raw::ChannelID_t  channel) const
pure virtual

Returns whether the specified channel is noisy in the current run.

Implemented in lariov::SimpleChannelStatus, lariov::SIOVChannelStatusProvider, and detvar::RandomChannelStatusProvider.

virtual bool lariov::ChannelStatusProvider::IsPresent ( raw::ChannelID_t  channel) const
pure virtual

Returns whether the specified channel is physical and connected to wire.

Implemented in lariov::SimpleChannelStatus, lariov::SIOVChannelStatusProvider, and detvar::RandomChannelStatusProvider.

static bool lariov::ChannelStatusProvider::IsValidStatus ( Status_t  status)
inlinestatic

Returns whether the specified status is a valid one.

Definition at line 114 of file ChannelStatusProvider.h.

115  { return status != InvalidStatus; }
static constexpr Status_t InvalidStatus
Value or invalid status.
virtual ChannelSet_t lariov::ChannelStatusProvider::NoisyChannels ( ) const
pure virtual

Returns a copy of set of noisy channel IDs for the current run.

Implemented in lariov::SIOVChannelStatusProvider, lariov::SimpleChannelStatus, and detvar::RandomChannelStatusProvider.

ChannelStatusProvider& lariov::ChannelStatusProvider::operator= ( ChannelStatusProvider const &  )
delete
ChannelStatusProvider& lariov::ChannelStatusProvider::operator= ( ChannelStatusProvider &&  )
delete
virtual Status_t lariov::ChannelStatusProvider::Status ( raw::ChannelID_t  channel) const
inlinevirtual

Returns a status integer with arbitrary meaning.

Reimplemented in lariov::SIOVChannelStatusProvider.

Definition at line 89 of file ChannelStatusProvider.h.

90  { return InvalidStatus; }
static constexpr Status_t InvalidStatus
Value or invalid status.

Member Data Documentation

constexpr Status_t lariov::ChannelStatusProvider::InvalidStatus = std::numeric_limits<Status_t>::max()
static

Value or invalid status.

Definition at line 60 of file ChannelStatusProvider.h.


The documentation for this class was generated from the following file: