All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbndcode/sbndcode/Calibration/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 /// Ported from ICARUS to SBND by A. Scarff
12 ////////////////////////////////////////////////////////////////////////
13 #ifndef IROIFinder_H
14 #define IROIFinder_H
15 #include "fhiclcpp/ParameterSet.h"
16 namespace art
17 {
18  class TFileDirectory;
19 }
20 namespace sbnd_tool
21 {
22  class IROIFinder
23  {
24  public:
25  virtual ~IROIFinder() noexcept = default;
26 
27  virtual void configure(const fhicl::ParameterSet& pset) = 0;
28  virtual void initializeHistograms(art::TFileDirectory&) const = 0;
29  virtual size_t plane() const = 0;
30 
31  // Define the waveform container
32  using Waveform = std::vector<float>;
33 
34  // Define the ROI and its container
35  using CandidateROI = std::pair<size_t, size_t>;
36  using CandidateROIVec = std::vector<CandidateROI>;
37 
38  // Find the ROI's
39  virtual void FindROIs(const Waveform&, size_t, CandidateROIVec&) const = 0;
40  };
41 }
42 #endif
virtual void configure(const fhicl::ParameterSet &pset)=0
virtual ~IROIFinder() noexcept=default
virtual size_t plane() const =0
virtual void initializeHistograms(art::TFileDirectory &) const =0
virtual void FindROIs(const Waveform &, size_t, CandidateROIVec &) const =0