AdcDataDumper.h
Go to the documentation of this file.
1 // AdcDataDumper.h
2 
3 // David Adams
4 // June 2017
5 //
6 // Tool to dump information about an ADC channel data map.
7 //
8 // Configuration:
9 // FileName: Name of the output file. Blank for std out.
10 // The following substitutions are made:
11 // %PAT% --> the pattern passed by the caller
12 // %CHAN1% --> the first channel number
13 // %CHAN2% --> the last channel number
14 // Prefix: Prefix for each line.
15 // NewFile: If true, a new file is created for each event.
16 // ShowChannelCount: If true, display channel count
17 // ShowTickCounts: Show the numbers of raw, sample flag, siginal entries
18 // Also show the number of ROIs.
19 // ShowRaw - Show the raw data.
20 // ShowPrepared - Show the prepared (pedstal removed, ...) data.
21 // ShowFirst - First tick number to display
22 // ShowRebin - Rebinning factor for show.
23 // Displayed values are averages over this number of ticks.
24 // ShowMax - Maximum # values to display
25 // ShowThreshold - Threshold for ShowOpt = 2
26 // ShowOpt - if 2, then symbols are displayed instead of values
27 // * for above threshold, - for below -threshold, . otherwise
28 
29 #ifndef AdcDataDumper_H
30 #define AdcDataDumper_H
31 
33 #include "fhiclcpp/ParameterSet.h"
35 #include <iostream>
36 
38 
39 public:
40 
42 
43  ~AdcDataDumper() override;
44 
45  DataMap viewMap(const AdcChannelDataMap& acds) const override;
46  bool updateWithView() const override { return true; }
47 
48 private:
49 
50  // Configuration data.
53  bool m_NewFile;
56  bool m_ShowRaw;
58  unsigned int m_ShowFirst;
59  unsigned int m_ShowRebin;
60  unsigned int m_ShowMax;
62  unsigned int m_ShowOpt;
63 
64  // Output stream.
65  std::ostream* m_pout;
66 
67 };
68 
69 
70 #endif
AdcDataDumper(fhicl::ParameterSet const &ps)
bool m_ShowChannelCount
Definition: AdcDataDumper.h:54
std::string string
Definition: nybbler.cc:12
bool updateWithView() const override
Definition: AdcDataDumper.h:46
unsigned int m_ShowRebin
Definition: AdcDataDumper.h:59
unsigned int m_ShowFirst
Definition: AdcDataDumper.h:58
std::string m_Prefix
Definition: AdcDataDumper.h:52
std::ostream * m_pout
Definition: AdcDataDumper.h:65
static constexpr double ps
Definition: Units.h:99
std::string m_FileName
Definition: AdcDataDumper.h:51
unsigned int m_ShowMax
Definition: AdcDataDumper.h:60
unsigned int m_ShowOpt
Definition: AdcDataDumper.h:62
~AdcDataDumper() override
std::map< AdcChannel, AdcChannelData > AdcChannelDataMap
bool m_ShowTickCounts
Definition: AdcDataDumper.h:55
float m_ShowThreshold
Definition: AdcDataDumper.h:61
DataMap viewMap(const AdcChannelDataMap &acds) const override