Public Member Functions | Private Attributes | List of all members
RemoveBadChannels Class Reference

#include <RemoveBadChannels.h>

Inheritance diagram for RemoveBadChannels:
TpcDataTool

Public Member Functions

 RemoveBadChannels (fhicl::ParameterSet const &ps)
 
 ~RemoveBadChannels () override=default
 
DataMap update (AdcChannelData &acd) const override
 

Private Attributes

int m_LogLevel
 
bool m_RemoveBadChs
 
bool m_RemoveNoisyChs
 
const lariov::ChannelStatusProviderm_pChannelStatusProvider
 

Additional Inherited Members

- Private Types inherited from AdcChannelTool
using Index = unsigned int
 
- Private Member Functions inherited from TpcDataTool
virtual DataMap updateTpcData (TpcData &) const
 
virtual DataMap viewTpcData (const TpcData &) const
 
virtual int forwardTpcData () const
 
- Private Member Functions inherited from AdcChannelTool
virtual ~AdcChannelTool ()=default
 
virtual DataMap view (const AdcChannelData &acd) const
 
virtual DataMap updateMap (AdcChannelDataMap &acds) const
 
virtual DataMap viewMap (const AdcChannelDataMap &acds) const
 
virtual bool updateWithView () const
 
virtual bool viewWithUpdate () const
 
virtual DataMap beginEvent (const DuneEventInfo &) const
 
virtual DataMap endEvent (const DuneEventInfo &) const
 
virtual DataMap close (const DataMap *dmin=nullptr)
 
- Static Private Member Functions inherited from AdcChannelTool
static int interfaceNotImplemented ()
 

Detailed Description

Definition at line 19 of file RemoveBadChannels.h.

Constructor & Destructor Documentation

RemoveBadChannels::RemoveBadChannels ( fhicl::ParameterSet const &  ps)

Definition at line 18 of file RemoveBadChannels_tool.cc.

19 : m_LogLevel(ps.get<int>("LogLevel"))
20 , m_RemoveBadChs(ps.get<bool>("RemoveBadChs"))
21 , m_RemoveNoisyChs(ps.get<bool>("RemoveNoisyChs")) {
22  const string myname = "RemoveBadChannels::ctor: ";
23  if ( m_LogLevel >= 1 ) {
24  cout << myname << "Parameters:" << endl;
25  cout << myname << " LogLevel: " << m_LogLevel << endl;
26  cout << myname << " RemoveBadChs: " << m_RemoveBadChs << endl;
27  cout << myname << " RemoveNoisyChs: " << m_RemoveNoisyChs << endl;
28  }
30  if ( m_pChannelStatusProvider == nullptr ) {
31  cout << myname << "WARNING: Channel status provider not found." << endl;
32  }
33 }
static constexpr double ps
Definition: Units.h:99
const lariov::ChannelStatusProvider * m_pChannelStatusProvider
QTextStream & endl(QTextStream &s)
RemoveBadChannels::~RemoveBadChannels ( )
overridedefault

Member Function Documentation

DataMap RemoveBadChannels::update ( AdcChannelData acd) const
overridevirtual

Reimplemented from AdcChannelTool.

Definition at line 37 of file RemoveBadChannels_tool.cc.

37  {
38  const string myname = "RemoveBadChannels::update: ";
39  if ( m_LogLevel >= 2 ) cout << "Processing run " << acd.run() << " event " << acd.event()
40  << " channel " << acd.channel() << endl;
41  DataMap ret;
42 
43  //Set channel output to 0 for bad channels
46  if ( m_LogLevel >= 2 ) cout << "Zeroing " << acd.run() << " event " << acd.event() << " channel " << acd.channel() << endl;
47  for ( float& sam : acd.samples ) sam = 0;
48  }
49 
50  return ret;
51 }
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.
AdcIndex run() const
AdcIndex event() const
Channel channel() const
const lariov::ChannelStatusProvider * m_pChannelStatusProvider
AdcSignalVector samples
QTextStream & endl(QTextStream &s)

Member Data Documentation

int RemoveBadChannels::m_LogLevel
private

Definition at line 32 of file RemoveBadChannels.h.

const lariov::ChannelStatusProvider* RemoveBadChannels::m_pChannelStatusProvider
private

Definition at line 37 of file RemoveBadChannels.h.

bool RemoveBadChannels::m_RemoveBadChs
private

Definition at line 33 of file RemoveBadChannels.h.

bool RemoveBadChannels::m_RemoveNoisyChs
private

Definition at line 34 of file RemoveBadChannels.h.


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