MagnifySink.h
Go to the documentation of this file.
1 /** Sink data to a file format used by the "Magnify" GUI .
2  *
3  * This is technically a "filter" as it passes on its input. This
4  * allows an instance of the sink to sit in the middle of some longer
5  * chain.
6  *
7  * FIXME: currently this class TOTALLY violates the encapsulation of
8  * DFP by requiring the input file in order to transfer input data out
9  * of band of the flow.
10  */
11 
12 #ifndef WIRECELLROOT_MAGNIFYFILESINK
13 #define WIRECELLROOT_MAGNIFYFILESINK
14 
18 #include "WireCellUtil/Logging.h"
19 
20 class TFile;
21 
22 namespace WireCell {
23  namespace Root {
24 
25  class MagnifySink : public IFrameFilter, public IConfigurable {
26  public:
27 
28  MagnifySink();
29  virtual ~MagnifySink();
30 
31  /// IFrameSink
32  virtual bool operator()(const IFrame::pointer& in, IFrame::pointer& out);
33 
34  /// IConfigurable
36  virtual void configure(const WireCell::Configuration& config);
37  private:
40 
41  int m_nrebin;
42  void create_file();
43  void do_shunt(TFile* output_tf);
44 
46  };
47  }
48 }
49 
50 #endif
std::shared_ptr< const IFrame > pointer
Definition: IData.h:19
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
Definition: MagnifySink.cxx:32
IAnodePlane::pointer m_anode
Definition: MagnifySink.h:39
virtual WireCell::Configuration default_configuration() const
IConfigurable.
Definition: MagnifySink.cxx:58
static Config * config
Definition: config.cpp:1054
std::shared_ptr< Interface > pointer
Definition: Interface.h:16
virtual bool operator()(const IFrame::pointer &in, IFrame::pointer &out)
IFrameSink.
std::shared_ptr< spdlog::logger > logptr_t
Definition: Logging.h:24
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50
void do_shunt(TFile *output_tf)