LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 27 of file ChannelFilter.h.

Member Enumeration Documentation

Enumerator
GOOD 
NOISY 
DEAD 
NOTPHYSICAL 

Definition at line 31 of file ChannelFilter.h.

Constructor & Destructor Documentation

filter::ChannelFilter::ChannelFilter ( )

Definition at line 45 of file ChannelFilter.cxx.

References e, LOG_ERROR, LOG_SYSTEM, and art::errors::ServiceNotFound.

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

Member Function Documentation

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

Definition at line 66 of file ChannelFilter.cxx.

References provider.

66  {
67  return provider.IsBad(channel);
68 }
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:46
filter::ChannelFilter::ChannelStatus filter::ChannelFilter::GetChannelStatus ( uint32_t  channel) const

Definition at line 86 of file ChannelFilter.cxx.

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

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

Definition at line 71 of file ChannelFilter.cxx.

References provider.

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

Definition at line 76 of file ChannelFilter.cxx.

References provider.

76  {
77  return provider.BadChannels();
78 }
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:46
std::set< uint32_t > filter::ChannelFilter::SetOfNoisyChannels ( ) const

Definition at line 81 of file ChannelFilter.cxx.

References provider.

81  {
82  return provider.NoisyChannels();
83 }
lariov::ChannelStatusProvider const & provider
object doing the job
Definition: ChannelFilter.h:46

Member Data Documentation

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

object doing the job

Definition at line 46 of file ChannelFilter.h.

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


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