LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 28 of file ChannelFilter.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

filter::ChannelFilter::ChannelFilter ( )

Definition at line 40 of file ChannelFilter.cxx.

References e, MF_LOG_ERROR, MF_LOG_SYSTEM, and art::errors::ServiceNotFound.

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

Member Function Documentation

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

Definition at line 58 of file ChannelFilter.cxx.

References provider.

59 {
60  return provider.IsBad(channel);
61 }
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:42
filter::ChannelFilter::ChannelStatus filter::ChannelFilter::GetChannelStatus ( uint32_t  channel) const

Definition at line 82 of file ChannelFilter.cxx.

References DEAD, GOOD, NOISY, NOTPHYSICAL, and provider.

83 {
84 
85  if (provider.IsGood(channel))
86  return GOOD;
87  else if (!provider.IsPresent(channel))
88  return NOTPHYSICAL;
89  else if (provider.IsBad(channel))
90  return DEAD;
91  else if (provider.IsNoisy(channel))
92  return NOISY;
93  else
94  return DEAD; //assume all other status are equivalent to DEAD
95 }
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:42
bool filter::ChannelFilter::NoisyChannel ( uint32_t  channel) const

Definition at line 64 of file ChannelFilter.cxx.

References provider.

65 {
66  return provider.IsNoisy(channel);
67 }
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:42
std::set< uint32_t > filter::ChannelFilter::SetOfBadChannels ( ) const

Definition at line 70 of file ChannelFilter.cxx.

References provider.

71 {
72  return provider.BadChannels();
73 }
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:42
std::set< uint32_t > filter::ChannelFilter::SetOfNoisyChannels ( ) const

Definition at line 76 of file ChannelFilter.cxx.

References provider.

77 {
78  return provider.NoisyChannels();
79 }
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:42

Member Data Documentation

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

object doing the job

Definition at line 42 of file ChannelFilter.h.

Referenced by BadChannel(), GetChannelStatus(), NoisyChannel(), SetOfBadChannels(), and SetOfNoisyChannels().


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