AdcSuppressService.h
Go to the documentation of this file.
1 // AdcSuppressService.h
2 //
3 // David Adams
4 // December 2015
5 //
6 // Service interface for identifying zero-suppressed ticks in an ADC vector.
7 
8 #ifndef AdcSuppressService_H
9 #define AdcSuppressService_H
10 
11 #include <string>
12 #include <iostream>
13 #include <memory>
14 #include <string>
15 #include <iostream>
19 
20 namespace fhicl {
21 class ParameterSet;
22 }
23 namespace art {
24 class ActivityRegistry;
25 }
26 
28 
29 public:
30 
31  typedef unsigned int Channel;
32 
33  // Dtor.
34  virtual ~AdcSuppressService() =default;
35 
36  // Suppress a vector of signals.
37  // sigs: Input ADC vector.
38  // ped: Input pedestal.
39  // keep: I/O boolean vector indicating which signals are retained.
40  virtual int filter(const AdcCountVector& sigs,
41  Channel chan,
42  AdcPedestal ped,
43  AdcFilterVector& keep) const =0;
44 
45  // Print the configuration.
46  virtual std::ostream& print(std::ostream& out =std::cout, std::string prefix =" ") const =0;
47 
48  // Alternate interface.
50  return filter(acs.counts, acs.channel, acs.pedestal, acs.filter);
51  }
52 
53 };
54 
55 #ifndef __CLING__
58 #endif
59 
60 #endif
std::vector< AdcCount > AdcCountVector
Definition: AdcTypes.h:19
std::string string
Definition: nybbler.cc:12
const AdcCountVector & counts
AdcFilterVector filter
std::vector< bool > AdcFilterVector
Definition: AdcTypes.h:27
float AdcPedestal
Definition: AdcTypes.h:25
int filter(AdcCountSelection &acs)
#define DECLARE_ART_SERVICE_INTERFACE(svc, scope)