Dune35tZeroSuppressService.h
Go to the documentation of this file.
1 // Dune35tZeroSuppressService.h
2 //
3 // David Adams
4 // November 2015
5 //
6 // Utility/service wrapper for 35-ton zero suppression.
7 //
8 // The algorithm is that described by James Russell at the September 2015
9 // DUNE collaboration meeting:
10 // https://indico.fnal.gov/conferenceOtherViews.py?view=standard&confId=10100
11 // and is described with later modifications at
12 // https://cdcvs.fnal.gov/redmine/projects/35ton/wiki/Data_compression_and_zero_suppression
13 
14 #ifndef Dune35tZeroSuppressService_H
15 #define Dune35tZeroSuppressService_H
16 
18 
19 #include <memory>
20 #include <string>
21 #include <iostream>
22 
23 namespace fhicl {
24 class ParameterSet;
25 }
26 namespace art {
27 class ActivityRegistry;
28 }
29 
31 
32 public:
33 
34  typedef unsigned int Index;
35 
36  // Ctor from parameters.
37  Dune35tZeroSuppressService(AdcCount ts, AdcCount tl, AdcCount td, Index ns, Index nl, Index nd, Index nt);
38 
39  // Ctor from FCL.
41 
42  // Filter an array of signals. Result is written to keep.
43  int filter(const AdcCountVector& sigs, Channel chan, AdcPedestal ped, AdcFilterVector& keep) const;
44 
45  // Print the configuration.
46  std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const;
47 
48  // Set the debug flag.
49  void setDebug(int dbg);
50 
51 private:
52 
53  // Parameters.
57  Index m_ns;
58  Index m_nl;
59  Index m_nd;
60  Index m_nt;
62 
63 };
64 
66 
67 #endif
std::vector< AdcCount > AdcCountVector
Definition: AdcTypes.h:19
bool dbg
std::string string
Definition: nybbler.cc:12
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
std::vector< bool > AdcFilterVector
Definition: AdcTypes.h:27
float AdcPedestal
Definition: AdcTypes.h:25
short AdcCount
Definition: AdcTypes.h:18
QAsciiDict< Entry > ns
std::string nl(std::size_t i=1)