RdChannelDebugWriter.h
Go to the documentation of this file.
1 #ifndef _RdChannelDebugWriter_RdChannelDebugWriter_h_
2 #define _RdChannelDebugWriter_RdChannelDebugWriter_h_
3 
4 #include <fwk/VModule.h>
5 
6 #include <set>
7 
8 
9 namespace revt {
10  class REvent;
11 }
12 
13 
14 namespace RdChannelDebugWriter {
15 
26 
27  public:
28  fwk::VModule::ResultFlag Init() override;
29  fwk::VModule::ResultFlag Run(evt::Event& event) override;
30  fwk::VModule::ResultFlag Finish() override { return eSuccess; }
31 
32  private:
34  std::set<int> fChannelIds;
35 
37  std::set<int> fStationIds;
38 
40  unsigned int fEventFraction = 0;
41 
43  std::string fRootFileNameBase;
44 
47 
49  std::string fAsciiTraceNameBase;
50 
52  unsigned long int fEventCounter = 0;
53 
55  unsigned long int fStepCounter = 0;
56 
58  int fLastEventID = -1;
59 
61  unsigned long fLastEventGPSsecond = 0;
62 
64  bool fUseUnits = false;
65 
67  void writeRootOutput(const revt::REvent&) const;
68 
70  void writeAsciiSpectrum(const revt::REvent&) const;
71 
73  void writeAsciiTrace(const revt::REvent&) const;
74 
75  REGISTER_MODULE("RdChannelDebugWriter", RdChannelDebugWriter);
76 
77  };
78 
79 }
80 
81 
82 #endif
Report success to RunController.
Definition: VModule.h:62
bool fUseUnits
Shall the module convert to physical unit.
Interface class to access to the Radio part of an event.
Definition: REvent.h:42
Writes debug output of radio data into ASCII or Root files.
std::set< int > fChannelIds
List of channels which will be considered for output. Empty = all channels.
std::string fAsciiSpectrumNameBase
Beginning of file name for ASCII file output.
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
void writeRootOutput(const revt::REvent &) const
Writes debug output to root file.
unsigned int fEventFraction
Consider only a fraction of event, if set to a value &gt; 0.
unsigned long int fStepCounter
Counts the number of calls of the module for the same event.
REGISTER_MODULE("RdChannelDebugWriter", RdChannelDebugWriter)
void writeAsciiSpectrum(const revt::REvent &) const
Writes the spectra to ASCII files.
std::set< int > fStationIds
List of stations which will be considered for output. Empty = all stations.
Module interface.
Definition: VModule.h:53
void writeAsciiTrace(const revt::REvent &) const
Writes the traces output to ASCII files.
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
std::string fAsciiTraceNameBase
Beginning of file name for ASCII file output.
unsigned long int fEventCounter
Counts the number of events processed by the module.
unsigned long fLastEventGPSsecond
GPS second of the last event.
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
std::string fRootFileNameBase
Beginning of file name for root file output.

, generated on Tue Sep 26 2023.