TestFilterSpecificEvents_module.cc
Go to the documentation of this file.
6 
7 #include <vector>
8 
9 namespace {
10  using namespace fhicl;
11  struct Config {
12  Sequence<unsigned> eventsToAccept{Name("eventsToAccept")};
13  };
14 } // namespace
15 
16 namespace art {
17  namespace test {
18  class TestFilterSpecificEvents;
19  }
20 } // namespace art
21 
23 public:
25 
27  : EDFilter{ps}, eventsToAccept_{ps().eventsToAccept()}
28  {
29  cet::sort_all(eventsToAccept_);
30  }
31 
32 private:
33  bool
34  filter(art::Event& e) override
35  {
36  return cet::binary_search_all(eventsToAccept_, e.event());
37  }
38 
39  std::vector<unsigned> eventsToAccept_;
40 };
41 
EventNumber_t event() const
Definition: DataViewImpl.cc:96
static const double ps
Definition: Units.h:103
Definition: test.py:1
void sort_all(RandCont &)
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:68
parameter set interface
bool binary_search_all(FwdCont const &, Datum const &)
AdcRoiViewer::Name Name