All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
icaruscode/icaruscode/TPC/SignalProcessing/RecoWire/DeconTools/IROIFinder.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////
2 ///
3 /// \file IROIFinder.h
4 ///
5 /// \brief This provides an interface for tools which are tasked with
6 /// finding ROI's in input waveforms. This allows different
7 /// approaches to be tried interchangeably
8 ///
9 /// \author T. Usher
10 ///
11 ////////////////////////////////////////////////////////////////////////
12 
13 #ifndef IROIFinder_H
14 #define IROIFinder_H
15 
16 #include "fhiclcpp/ParameterSet.h"
17 #include "TProfile.h"
18 
19 namespace art
20 {
21  class TFileDirectory;
22 }
23 
24 namespace icarus_tool
25 {
26  enum HistogramType : int
27  {
38  };
39 
40  using HistogramMap = std::map<int, TProfile*>;
41 
42  class IROIFinder
43  {
44  public:
45  virtual ~IROIFinder() noexcept = default;
46 
47  virtual void configure(const fhicl::ParameterSet& pset) = 0;
48  virtual void initializeHistograms(art::TFileDirectory&) const = 0;
49  virtual size_t plane() const = 0;
50 
51  // Define the waveform container
52  using Waveform = std::vector<float>;
53 
54  // Define the ROI and its container
55  using CandidateROI = std::pair<size_t, size_t>;
56  using CandidateROIVec = std::vector<CandidateROI>;
57 
58  // Find the ROI's
59  virtual void FindROIs(const Waveform&, size_t, size_t, double, CandidateROIVec&) const = 0;
60  };
61 }
62 
63 #endif
virtual void configure(const fhicl::ParameterSet &pset)=0
virtual void initializeHistograms(art::TFileDirectory &) const =0
virtual void FindROIs(const Waveform &, size_t, size_t, double, CandidateROIVec &) const =0
virtual size_t plane() const =0
virtual ~IROIFinder() noexcept=default