AdcRegularSignalFinder.h
Go to the documentation of this file.
1 // AdcRegularSignalFinder.h
2 
3 // David Adams
4 // December 2017
5 //
6 // Tool to find and flag regularly-spaced signal regions in ADC data.
7 //
8 // Configuration:
9 // LogLevel - 0=silent, 1=init, 2=each event, >2=more
10 // Period - Period for ROIs, i.e. one ROI is found every Period ticks
11 // Length - # ticks in each ROI (0 means same as Period)
12 //
13 // If Period is zero, then the period and length are obtained from the
14 // data passed in each call to update (or view). The period is the
15 // length of the first ROI (roi.second + 1 - roi.first).
16 // The configured length is the length of the second ROI, if present,
17 // or otherwise is the same as the period.
18 //
19 // The first ROI starts at tick 0. We may later add a parameter "Offset" to
20 // start at a later tick. The last ROI ends at the last tick and may be
21 // shorter than the others.
22 //
23 // The output results holds:
24 // int roiPeriod - period (actual)
25 // int roiLength - length (actual)
26 // int roiCount - # ROIs found
27 
28 #ifndef AdcRegularSignalFinder_H
29 #define AdcRegularSignalFinder_H
30 
32 #include "fhiclcpp/ParameterSet.h"
34 #include <string>
35 #include <vector>
36 
37 class HistogramManager;
38 class TH1;
39 
41 : public TpcDataTool {
42 
43 public:
44 
45  AdcRegularSignalFinder(AdcIndex per, AdcIndex len, int lev);
47 
48  DataMap view(const AdcChannelData& acd) const override;
49 
50  DataMap update(AdcChannelData& acd) const override;
51 
52 private:
53 
54  using Name = std::string;
55 
56  // Configuration data.
60 
61 };
62 
63 
64 #endif
std::string string
Definition: nybbler.cc:12
static constexpr double ps
Definition: Units.h:99
AdcRegularSignalFinder(AdcIndex per, AdcIndex len, int lev)
unsigned int AdcIndex
Definition: AdcTypes.h:15
DataMap view(const AdcChannelData &acd) const override
DataMap update(AdcChannelData &acd) const override