RawDigitPrepService.h
Go to the documentation of this file.
1 // RawDigitPrepService.h
2 
3 #ifndef RawDigitPrepService_H
4 #define RawDigitPrepService_H
5 
6 // David Adams
7 // May 2016
8 //
9 // Interface for a service that extracts the ADC signal vector from
10 // a larsoft raw digit. The latter holds the TPC samples for one channel.
11 
12 #include <iostream>
15 namespace detinfo {
16  class DetectorClocksData;
17 }
18 
19 namespace raw {
20 class RawDigit;
21 }
22 
24 
25 public:
26 
27  virtual ~RawDigitPrepService() = default;
28 
29  using Index = unsigned int;
30  using LongIndex = unsigned long;
31 
32  // Handle begin and end of an event.
33  // Both return 0 for success.
34  virtual int beginEvent(const DuneEventInfo&) const { return 0; }
35  virtual int endEvent(const DuneEventInfo&) const { return 0; }
36 
37  // Prepare the data for a vector of TPC digits. Each digit holds the time samples for one channel.
38  // The preparation includes extraction (float conversion and pedstal subtraction) and optionally
39  // actions such as stuck bit mitigation and coherent noise removal.
40  // If pwires is null, then the caller should manage (delete) the wires referenced in prepdigs.
41  // If pwires is not null, then the ouput wires are recorded and managed in that container.
42  // Any increase in the capacity of that container may trigger relocation of the wire objects and
43  // thus break the pointers in prepdigs. The capacity should be reserved in advance of any calls
44  // to this method.
45  // If not null, the object pwiredData may be filled with intermediate state information as dictated
46  // the configuration of the service implementation.
47  virtual int prepare(detinfo::DetectorClocksData const& clockData,
48  AdcChannelDataMap& prepdigs,
49  std::vector<recob::Wire>* pwires =nullptr,
50  WiredAdcChannelDataMap* pwiredData =nullptr) const =0;
51 
52  // Print parameters.
53  virtual std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const =0;
54 
55 };
56 
57 #ifndef __CLING__
60 #endif
61 
62 #endif
std::string string
Definition: nybbler.cc:12
Raw data description.
General LArSoft Utilities.
virtual int beginEvent(const DuneEventInfo &) const
Contains all timing reference information for the detector.
virtual int endEvent(const DuneEventInfo &) const
std::map< AdcChannel, AdcChannelData > AdcChannelDataMap
#define DECLARE_ART_SERVICE_INTERFACE(svc, scope)