RdChannelNoiseASCIIImporter.h
Go to the documentation of this file.
1 #ifndef _RdChannelNoiseASCIIImporter_h_
2 #define _RdChannelNoiseASCIIImporter_h_
3 
4 #include <string>
5 
6 #include <fwk/VModule.h>
7 #include <revt/Channel.h>
8 
9 
10 namespace evt {
11  class Event;
12 }
13 
14 namespace revt {
15  class Channel;
16 }
17 
18 
19 // you should assign your module to a namespace
20 
22 
33 
34  public:
35  // If you define a constructor, you MUST provide an implementation
36  // for it, otherwise the REGISTER_MODULE macro will not register
37  // your module. (Here, implementation is in RdChannelNoiseASCIIImporter.cc)
40 
44 
45  private:
46  enum InfoLevel {
47  eNone = 0,
48  eFinal = 1,
50  eObscure = 3,
51  eDebug = 4
52  };
53 
57  std::string fPathToAsciitrace;
60  bool fStopAtLastNoiseTrace; // if true a BreakLoop will be returned after all available noise traces has been processed
61  std::vector<int> v_id;
62  std::vector<int>::iterator viter;
63  inline std::string AddZero(int val) {
64  if (val<10) return "000";
65  if (val<100) return "00";
66  if (val<1000) return "0";
67  return "";
68  }
69  std::string GetStringFromStatChan(int statid,int chanid);
70 
71 
72  void RemovePedestal(revt::ChannelTimeSeries& timeSeries);
73  void RemovePedestal(std::vector<int>& timeSeries);
74 
75 
76  // The REGISTER_MODULE macro makes the framework aware of your module.
77  // You need to put this macro at the very end of your module class definition.
78  // Give your module a name (first argument) and specify its
79  // class name (second argument). In the ModuleSequenceExample.xml file,
80  // you can see this module being refered to by the name we give it here.
81 
82  REGISTER_MODULE("RdChannelNoiseASCIIImporter", RdChannelNoiseASCIIImporter);
83 
84  };
85 
86 }
87 
88 
89 #endif
90 
91 // Configure (x)emacs for this file ...
92 // Local Variables:
93 // mode:c++
94 // compile-command: "make -k"
95 // End:
REGISTER_MODULE("RdChannelNoiseASCIIImporter", RdChannelNoiseASCIIImporter)
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
int fNumberOfFiles
Writes out a spectrum in an ASCII file.
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
Module interface.
Definition: VModule.h:53
Small Radio Example.
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.

, generated on Tue Sep 26 2023.