Public Types | Public Member Functions | Static Public Member Functions | List of all members
AdcChannelTool Class Reference

#include <AdcChannelTool.h>

Inheritance diagram for AdcChannelTool:
AdcChannelTool_update TpcDataTool AcdDigitReader AcdWireReader Adc2dConvolute AdcChannelDumper AdcChannelFFT AdcChannelMetric AdcChannelPlotter AdcChannelSplitter AdcChannelTrimmer AdcCodeMitigator AdcDataDumper AdcDataPlotter AdcDeconvoluteFFT AdcDetectorPlotter AdcDPhase3x1x1LocalRoiBuilder AdcDPhase3x1x1RoiBuilder AdcEventViewer AdcKeepAllSignalFinder AdcMultiChannelPlotter AdcMultiThreshSignalFinder AdcNoiseSignalFinder AdcPedestalFitter AdcRangeSampleScaler AdcRegularSignalFinder AdcResultDumper AdcRoiShifter AdcRoiSlicer AdcRoiToTree AdcRoiViewer AdcSampleFiller AdcSampleScaler AdcThresholdSignalFinder AdcTickModViewer AdcTimingMitigator AdcToRoi2d AdcUnderflowFlagger BaselineDetrend CnrByGroup CnrGroupWeighted DuneAdcSignalFinder ExpTailPedRemover ExpTailRemover FclStickyCodeFlagger FembLinearCalibration FembMappedAdcModifier FloatArrayGainCalibration PddpVintageDeconvoluter PdspNoiseRemoval RemoveBadChannels Roi2dToAdc SubtractBaseline Tpc2dDeconvolute TpcDataTool_update UndershootCorr VintageDeconvoluter

Public Types

using Index = unsigned int
 

Public Member Functions

virtual ~AdcChannelTool ()=default
 
virtual DataMap update (AdcChannelData &) const
 
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 Public Member Functions

static int interfaceNotImplemented ()
 

Detailed Description

Definition at line 54 of file AdcChannelTool.h.

Member Typedef Documentation

using AdcChannelTool::Index = unsigned int

Definition at line 58 of file AdcChannelTool.h.

Constructor & Destructor Documentation

virtual AdcChannelTool::~AdcChannelTool ( )
virtualdefault

Member Function Documentation

virtual DataMap AdcChannelTool::beginEvent ( const DuneEventInfo ) const
inlinevirtual

Reimplemented in AdcEventViewer, AdcPedestalFitter, and AdcChannelDftPlotter.

Definition at line 100 of file AdcChannelTool.h.

100 { return DataMap(); }
virtual DataMap AdcChannelTool::close ( const DataMap dmin = nullptr)
inlinevirtual

Reimplemented in AdcRoiViewer.

Definition at line 110 of file AdcChannelTool.h.

110 { return DataMap(); }
virtual DataMap AdcChannelTool::endEvent ( const DuneEventInfo ) const
inlinevirtual

Reimplemented in AdcEventViewer, AdcDetectorPlotter, and AdcChannelDftPlotter.

Definition at line 103 of file AdcChannelTool.h.

103 { return DataMap(); }
static int AdcChannelTool::interfaceNotImplemented ( )
inlinestatic

Definition at line 62 of file AdcChannelTool.h.

62 { return -999; }
DataMap AdcChannelTool::update ( AdcChannelData acd) const
inlinevirtual
DataMap AdcChannelTool::updateMap ( AdcChannelDataMap acds) const
inlinevirtual

Reimplemented in AdcChannelMetric, AdcPedestalFitter, Adc2dConvolute, PdspNoiseRemoval, CnrGroupWeighted, CnrByGroup, and AdcResultDumper.

Definition at line 138 of file AdcChannelTool.h.

138  {
139  if ( updateWithView() ) return viewMap(acds);
140  DataMap ret;
141  DataMap::IntVector failedChannels;
142  std::set<int> failedCodeSet;
143  for ( AdcChannelDataMap::value_type& iacd : acds ) {
144  DataMap dm = update(iacd.second);
146  else if ( dm.status() ) {
147  failedChannels.push_back(iacd.first);
148  failedCodeSet.insert(dm.status());
149  if ( ! ret.status() ) ret.setStatus(dm.status());
150  }
151  else ret += dm;
152  }
153  DataMap::IntVector failedCodes(failedCodeSet.begin(), failedCodeSet.end());
154  ret.setIntVector("failedChannels", failedChannels);
155  ret.setIntVector("failedCodes", failedCodes);
156  return ret;
157 }
DataMap & setStatus(int stat)
Definition: DataMap.h:130
virtual DataMap viewMap(const AdcChannelDataMap &acds) const
static int interfaceNotImplemented()
virtual DataMap update(AdcChannelData &) const
std::vector< int > IntVector
Definition: DataMap.h:50
int status() const
Definition: DataMap.h:202
void setIntVector(Name name, const IntVector &val)
Definition: DataMap.h:132
virtual bool updateWithView() const
virtual bool AdcChannelTool::updateWithView ( ) const
inlinevirtual
DataMap AdcChannelTool::view ( const AdcChannelData acd) const
inlinevirtual
DataMap AdcChannelTool::viewMap ( const AdcChannelDataMap acds) const
inlinevirtual

Reimplemented in AdcRoiViewer, AdcEventViewer, AdcChannelMetric, AdcTickModViewer, AdcDataPlotter, AdcDetectorPlotter, AdcMultiChannelPlotter, AdcChannelPlotter, AdcRoiToTree, AdcDataDumper, and AdcResultDumper.

Definition at line 162 of file AdcChannelTool.h.

162  {
163  if ( viewWithUpdate() ) {
164  AdcChannelDataMap adcstmp(acds);
165  return updateMap(adcstmp);
166  }
167  DataMap ret;
168  int nfail = 0;
169  for ( const AdcChannelDataMap::value_type& iacd : acds ) {
170  DataMap dm = view(iacd.second);
172  else if ( dm.status() ) ++nfail;
173  else ret += dm;
174  }
175  ret.setStatus(nfail);
176  return ret;
177 }
virtual bool viewWithUpdate() const
DataMap & setStatus(int stat)
Definition: DataMap.h:130
static int interfaceNotImplemented()
virtual DataMap view(const AdcChannelData &acd) const
int status() const
Definition: DataMap.h:202
virtual DataMap updateMap(AdcChannelDataMap &acds) const
std::map< AdcChannel, AdcChannelData > AdcChannelDataMap
virtual bool AdcChannelTool::viewWithUpdate ( ) const
inlinevirtual

Reimplemented in AdcChannelTool_update, and TpcDataTool_update.

Definition at line 97 of file AdcChannelTool.h.

97 { return false; }

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