Reframer.h
Go to the documentation of this file.
1 /**
2  A reframer takes makes a "rectangular" frame filled with samples
3  from the tagged traces of its input. This new frame has exactly
4  one trace for each channel and each trace is padded to span a
5  uniform duration. These configuration paramters control how the
6  new frame is shaped:
7 
8  - tags :: list of trace tags to consider. an empty list means to
9  use all traces. Default: [].
10 
11  - tbin :: the number of ticks measured from the *input* frame
12  reference time to start each output trace. Converted to time via
13  the input frame's tick, this value will be applied to the output
14  frame's reference time. As such, the "tbin()" method of the
15  output traces will return 0. Default: 0.
16 
17  - nticks :: the total number of ticks in the output traces.
18  Default: 0.
19 
20  - toffset :: an addition time offset arbitrarily added to the
21  output frame's reference time. This time is *asserts some
22  fiction* and does not contribute to calculating the output tbin.
23  Default: 0.0.
24 
25  - fill :: if a needed sample does not exist it will be set to this
26  value. Default: 0.0.
27 
28  */
29 
30 #ifndef WIRECELL_GEN_REFRAMER
31 #define WIRECELL_GEN_REFRAMER
32 
36 #include "WireCellUtil/Logging.h"
37 
38 #include <vector>
39 #include <string>
40 
41 namespace WireCell {
42  namespace Gen {
43 
44  class Reframer : public IFrameFilter, public IConfigurable {
45  public:
46  Reframer();
47  virtual ~Reframer();
48 
49  virtual void configure(const WireCell::Configuration& config);
51 
52  virtual bool operator()(const input_pointer& inframe, output_pointer& outframe);
53 
54  private:
55 
57 
58  // Consider traces with these tags. No tags mean all traces.
59  std::vector<std::string> m_input_tags;
60 
61  double m_toffset, m_fill;
64  };
65  }
66 }
67 #endif
virtual bool operator()(const input_pointer &inframe, output_pointer &outframe)
The calling signature:
Definition: Reframer.cxx:67
std::vector< std::string > m_input_tags
Definition: Reframer.h:59
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
Definition: Reframer.cxx:33
std::shared_ptr< const IFrame > input_pointer
Definition: IFunctionNode.h:39
static Config * config
Definition: config.cpp:1054
Log::logptr_t log
Definition: Reframer.h:63
std::shared_ptr< Interface > pointer
Definition: Interface.h:16
std::shared_ptr< const IFrame > output_pointer
Definition: IFunctionNode.h:40
std::shared_ptr< spdlog::logger > logptr_t
Definition: Logging.h:24
Definition: Main.h:22
IAnodePlane::pointer m_anode
Definition: Reframer.h:56
Json::Value Configuration
Definition: Configuration.h:50
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
Definition: Reframer.cxx:48