StandardRawDigitPrepService.h
Go to the documentation of this file.
1 // StandardRawDigitPrepService.h
2 //
3 // David Adams
4 // July 2016
5 //
6 // Implementation of service that prepares TPC raw digits for reconstruction.
7 // The data is converted to float, pedestals are subtracted and optionally
8 // stuck bits are mitigated and coherent noise is removed.
9 //
10 // There is an option to construct intermediate states with the following names:
11 // extracted - After pedestal subtraction
12 // mitigated - After mitigation (e.g. stuck bit interpolation)
13 // noiseRemoved - After noise removal
14 //
15 // Configuration:
16 // LogLevel - message logging level: 0=none, 1=initialization, 2+=every event
17 // SkipBad - Skip bad channels as reported by ChannelStatusService.
18 // SkipNoisy - Skip noisy channels as reported by ChannelStatusService.
19 // ChannelStatusOnline [false] - If true, status is retrieved with online channel number.
20 // The current (Aug 2016) DUNE convention is to use offline numbering.
21 // DoMitigation - Run mitigation (e.g. stuck bit removal) on extracted data.
22 // DoEarlySignalFinding - Run signal building before noise removal.
23 // DoNoiseRemoval - Run coherent noise suppression.
24 // DoPedestalAdjustment - Do dynamic pedestal adjustment.
25 // DoDeconvolution - Deconvolute the signal.
26 // DoROI - Build ROIs.
27 // DoWires - Build wires.
28 // DoIntermediateStates - Build intermediate states requested by caller.
29 // DoDump [false] - If true, the info for one tick is displayed in the log.
30 // WiresWithoutROIFlag [2] - How to handle a request for wire building without ROI building.
31 // 0 - Silently ignore
32 // 1 - Warn in ctor only.
33 // 2 - Warn in ctor and every event.
34 // 3 - Abort after message.
35 // DumpChannel [0] - The channel that is dumped.
36 // DumpTick [0] - The tick that is dumped.
37 
38 #ifndef StandardRawDigitPrepService_H
39 #define StandardRawDigitPrepService_H
40 
42 
44 namespace lariov {
45 class ChannelStatusProvider;
46 }
56 
57 class AdcChannelTool;
58 
60 
61 public:
62 
63  using AdcChannelToolPtr = std::unique_ptr<AdcChannelTool>;
64 
66 
67  int prepare(detinfo::DetectorClocksData const& clockData,
68  AdcChannelDataMap& prepdigs,
69  std::vector<recob::Wire>* pwires,
70  WiredAdcChannelDataMap* pintStates) const override;
71 
72  std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const override;
73 
74 private:
75 
76  // Configuration parameters.
78  bool m_SkipBad;
86  bool m_DoROI;
87  bool m_DoWires;
88  unsigned int m_WiresWithoutROIFlag;
89  bool m_DoDump;
91  unsigned int m_DumpChannel;
92  unsigned int m_DumpTick;
93  std::vector<std::string> m_DisplayTools;
94 
106 
107  std::vector<AdcChannelToolPtr> m_DisplayToolPtrs;
108  std::vector<std::string> m_FoundDisplayToolNames;
109 
110 };
111 
113 
114 #endif
std::string string
Definition: nybbler.cc:12
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
const AdcNoiseRemovalService * m_pNoiseRemoval
std::vector< std::string > m_DisplayTools
const ChannelMappingService * m_pChannelMappingService
const AdcChannelDataCopyService * m_pAdcChannelDataCopyService
const AdcMitigationService * m_pmitigateSvc
const PedestalEvaluationService * m_pPedestalEvaluation
const AdcRoiBuildingService * m_pRoiBuildingService
const AdcWireBuildingService * m_pWireBuildingService
const AdcSignalFindingService * m_pAdcSignalFindingService
std::vector< AdcChannelToolPtr > m_DisplayToolPtrs
const AdcDeconvolutionService * m_pDeconvolutionService
const lariov::ChannelStatusProvider * m_pChannelStatusProvider
Class providing information about the quality of channels.
Filters for channels, events, etc.
Contains all timing reference information for the detector.
std::unique_ptr< AdcChannelTool > AdcChannelToolPtr
std::map< AdcChannel, AdcChannelData > AdcChannelDataMap
const RawDigitExtractService * m_pExtractSvc
std::vector< std::string > m_FoundDisplayToolNames