TimeGatedDepos.h
Go to the documentation of this file.
1 #ifndef WIRECELL_GEN_TIMEGATEDDEPOS
2 #define WIRECELL_GEN_TIMEGATEDDEPOS
3 
7 #include "WireCellUtil/Units.h"
8 
9 #include <tuple>
10 #include <vector>
11 
12 namespace WireCell {
13 
14  namespace Gen {
15 
16  /**
17  TimeGatedDepos outputs depos which pass a time based
18  selection.
19 
20  The selection is defined as a time gate expressed as a
21  start time and a duration.
22 
23  If a period is provided than the time gate is advanced by
24  the configured period each time an EOS is received.
25 
26  It operates in one of accept or reject modes. To be output
27  in the former mode depos must have times within the gate,
28  in the latter they must not.
29 
30  The gate is half inclusive. Depo landing exactly at the
31  end of the gate is considered outside the gate.
32  */
33  class TimeGatedDepos : public IDrifter, public IConfigurable {
34  public:
36  virtual ~TimeGatedDepos();
37  virtual bool operator()(const input_pointer& depo, output_queue& outq);
38  virtual void configure(const WireCell::Configuration& config);
40  private:
41 
42  bool m_accept;
43  double m_period;
44  double m_start;
45  double m_duration;
46  };
47  }
48 }
49 
50 #endif
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
std::deque< output_pointer > output_queue
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
static Config * config
Definition: config.cpp:1054
virtual bool operator()(const input_pointer &depo, output_queue &outq)
The calling signature:
Definition: Main.h:22
Json::Value Configuration
Definition: Configuration.h:50
std::shared_ptr< const IDepo > input_pointer