Public Types | Public Member Functions | Private Attributes | List of all members
filter::ChannelFilter Class Reference

#include <ChannelFilter.h>

Public Types

enum  ChannelStatus { GOOD = 0, NOISY = 1, DEAD = 2, NOTPHYSICAL = 3 }
 

Public Member Functions

 ChannelFilter ()
 
bool BadChannel (uint32_t channel) const
 
bool NoisyChannel (uint32_t channel) const
 
std::set< uint32_t > SetOfBadChannels () const
 
std::set< uint32_t > SetOfNoisyChannels () const
 
ChannelStatus GetChannelStatus (uint32_t channel) const
 

Private Attributes

lariov::ChannelStatusProvider const & provider
 object doing the job More...
 

Detailed Description

Definition at line 26 of file ChannelFilter.h.

Member Enumeration Documentation

Enumerator
GOOD 
NOISY 
DEAD 
NOTPHYSICAL 

Definition at line 30 of file ChannelFilter.h.

Constructor & Destructor Documentation

filter::ChannelFilter::ChannelFilter ( )

Definition at line 44 of file ChannelFilter.cxx.

44  :
46 {
47 
48  MF_LOG_ERROR("ChannelFilter") << "ChannelFilter is now deprecated."
49  " Replace it with ChannelStatusService";
50 
51 } // function try
52 catch (art::Exception& e) { // automatic rethrow happens at end of block
53  if (e.categoryCode() == art::errors::ServiceNotFound) {
54  MF_LOG_SYSTEM("ChannelFilter") <<
55  "Failed to obtain an instance of ChannelStatusService service;"
56  " you should update your configuration, *and* update the code using"
57  " ChannelFilter, that is deprecated."
58  " An example are in ChannelFilter class documentation"
59  ;
60  }
61 } // filter::ChannelFilter::ChannelFilter() (function catch)
#define MF_LOG_ERROR(category)
const double e
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:45
#define MF_LOG_SYSTEM(category)

Member Function Documentation

bool filter::ChannelFilter::BadChannel ( uint32_t  channel) const

Definition at line 65 of file ChannelFilter.cxx.

65  {
66  return provider.IsBad(channel);
67 }
virtual bool IsBad(raw::ChannelID_t channel) const =0
Returns whether the specified channel is bad in the current run.
uint8_t channel
Definition: CRTFragment.hh:201
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:45
filter::ChannelFilter::ChannelStatus filter::ChannelFilter::GetChannelStatus ( uint32_t  channel) const

Definition at line 85 of file ChannelFilter.cxx.

86 {
87 
88  if (provider.IsGood(channel)) return GOOD;
89  else if (!provider.IsPresent(channel)) return NOTPHYSICAL;
90  else if (provider.IsBad(channel)) return DEAD;
91  else if (provider.IsNoisy(channel)) return NOISY;
92  else return DEAD; //assume all other status are equivalent to DEAD
93 }
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 IsGood(raw::ChannelID_t channel) const
Returns whether the specified channel is physical and good.
virtual bool IsPresent(raw::ChannelID_t channel) const =0
Returns whether the specified channel is physical and connected to wire.
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:45
bool filter::ChannelFilter::NoisyChannel ( uint32_t  channel) const

Definition at line 70 of file ChannelFilter.cxx.

70  {
71  return provider.IsNoisy(channel);
72 }
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
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:45
std::set< uint32_t > filter::ChannelFilter::SetOfBadChannels ( ) const

Definition at line 75 of file ChannelFilter.cxx.

75  {
76  return provider.BadChannels();
77 }
virtual ChannelSet_t BadChannels() const =0
Returns a copy of set of bad channel IDs for the current run.
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:45
std::set< uint32_t > filter::ChannelFilter::SetOfNoisyChannels ( ) const

Definition at line 80 of file ChannelFilter.cxx.

80  {
81  return provider.NoisyChannels();
82 }
virtual ChannelSet_t NoisyChannels() const =0
Returns a copy of set of noisy channel IDs for the current run.
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:45

Member Data Documentation

lariov::ChannelStatusProvider const& filter::ChannelFilter::provider
private

object doing the job

Definition at line 45 of file ChannelFilter.h.


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