ChannelSelector.h
Go to the documentation of this file.
1 /**
2  Make a new output frame with a set of traces selected from the
3  input based on being in a set of channels and possibly tags.
4  */
5 
6 #ifndef WIRECELLSIGPROC_CHANNELSELECTOR
7 #define WIRECELLSIGPROC_CHANNELSELECTOR
8 
11 #include "WireCellUtil/Logging.h"
12 
13 #include <string>
14 #include <vector>
15 #include <unordered_set>
16 
17 namespace WireCell {
18  namespace SigProc {
19 
20  class ChannelSelector : public IFrameFilter, public IConfigurable {
21  public:
22 
24  virtual ~ChannelSelector();
25 
26  /// IFrameFilter interface.
27  virtual bool operator()(const input_pointer& in, output_pointer& out);
28 
29  /// IConfigurable interface.
30  virtual void configure(const WireCell::Configuration& config);
32 
33  protected:
34  virtual void set_channels(const std::vector<int>& channels);
35 
36  private:
37  std::vector<std::string> m_tags;
38  std::unordered_set<int> m_channels;
39 
41  };
42  }
43 }
44 
45 #endif
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
virtual bool operator()(const input_pointer &in, output_pointer &out)
IFrameFilter interface.
std::vector< std::string > m_tags
std::unordered_set< int > m_channels
std::shared_ptr< const IFrame > input_pointer
Definition: IFunctionNode.h:39
static Config * config
Definition: config.cpp:1054
std::shared_ptr< const IFrame > output_pointer
Definition: IFunctionNode.h:40
virtual void set_channels(const std::vector< int > &channels)
std::shared_ptr< spdlog::logger > logptr_t
Definition: Logging.h:24
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50
virtual void configure(const WireCell::Configuration &config)
IConfigurable interface.