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

#include <AdcKeepAllSignalFinder.h>

Inheritance diagram for AdcKeepAllSignalFinder:
TpcDataTool AdcChannelTool

Public Member Functions

 AdcKeepAllSignalFinder (fhicl::ParameterSet const &ps)
 
DataMap view (const AdcChannelData &acd) const override
 
DataMap update (AdcChannelData &acd) const override
 
- Public Member Functions inherited from TpcDataTool
virtual DataMap updateTpcData (TpcData &) const
 
virtual DataMap viewTpcData (const TpcData &) const
 
virtual int forwardTpcData () const
 
- Public Member Functions inherited from AdcChannelTool
virtual ~AdcChannelTool ()=default
 
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)
 

Private Types

using Name = std::string
 

Private Attributes

int m_LogLevel
 
Name m_DataPath
 

Additional Inherited Members

- Public Types inherited from AdcChannelTool
using Index = unsigned int
 
- Static Public Member Functions inherited from AdcChannelTool
static int interfaceNotImplemented ()
 

Detailed Description

Definition at line 28 of file AdcKeepAllSignalFinder.h.

Member Typedef Documentation

Definition at line 41 of file AdcKeepAllSignalFinder.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file AdcKeepAllSignalFinder_tool.cc.

15 : m_LogLevel(ps.get<int>("LogLevel")),
16  m_DataPath(ps.get<Name>("DataPath")) {
17  const string myname = "AdcKeepAllSignalFinder::ctor: ";
18  if ( m_LogLevel >= 1 ) {
19  cout << myname << "Configuration parameters:" << endl;
20  cout << myname << " LogLevel: " << m_LogLevel << endl;
21  cout << myname << " DataPath: " << m_DataPath << endl;
22  }
23 }
ChannelGroupService::Name Name
static constexpr double ps
Definition: Units.h:99
QTextStream & endl(QTextStream &s)

Member Function Documentation

DataMap AdcKeepAllSignalFinder::update ( AdcChannelData acd) const
overridevirtual

Reimplemented from AdcChannelTool.

Definition at line 27 of file AdcKeepAllSignalFinder_tool.cc.

27  {
28  const string myname = "AdcKeepAllSignalFinder::update: ";
29  DataMap ret;
30  Index nvie = acdtop.viewSize(m_DataPath);
31  Index nroi = 0;
32  for ( Index ivie=0; ivie<nvie; ++ivie ) {
33  AdcChannelData* pacd = acdtop.mutableViewEntry(m_DataPath, ivie);
34  if ( pacd == nullptr ) {
35  cout << myname << "WARNING: Skipping null data." << endl;
36  continue;
37  }
38  AdcChannelData& acd = *pacd;
39  AdcIndex nsam = acd.samples.size();
40  acd.signal.clear();
41  acd.rois.clear();
42  if ( nsam == 0 ) {
43  cout << myname << "ERROR: No samples found in channel " << acd.channel()
44  << " view " << ivie << endl;
45  return ret.setStatus(1);
46  }
47  if ( m_LogLevel >= 2 ) {
48  cout << myname << "Building ROI for channel " << acd.channel()
49  << " view " << ivie << "/" << nvie << "." << endl;
50  }
51  acd.signal.resize(nsam, true);
52  acd.roisFromSignal();
53  nroi += acd.rois.size();
54  }
55  ret.setInt("nroi", nroi);
56  return ret;
57 }
DataMap & setStatus(int stat)
Definition: DataMap.h:130
unsigned int Index
AdcRoiVector rois
void setInt(Name name, int val)
Definition: DataMap.h:131
unsigned int AdcIndex
Definition: AdcTypes.h:15
Channel channel() const
AdcFilterVector signal
AdcChannelData * mutableViewEntry(Name vpnam, AdcIndex ient)
AdcSignalVector samples
QTextStream & endl(QTextStream &s)
DataMap AdcKeepAllSignalFinder::view ( const AdcChannelData acd) const
overridevirtual

Reimplemented from AdcChannelTool.

Definition at line 61 of file AdcKeepAllSignalFinder_tool.cc.

61  {
62  AdcChannelData acdtmp;
63  acdtmp.samples = acd.samples;
64  return update(acdtmp);
65 }
DataMap update(AdcChannelData &acd) const override
AdcSignalVector samples

Member Data Documentation

Name AdcKeepAllSignalFinder::m_DataPath
private

Definition at line 45 of file AdcKeepAllSignalFinder.h.

int AdcKeepAllSignalFinder::m_LogLevel
private

Definition at line 44 of file AdcKeepAllSignalFinder.h.


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