FLSFilter_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file FLSFilter_module.cc
3 // \brief Filter to remove events without any simulate FLS hits
4 // made particularly for simulated FD rock in prod5
5 // \author Andrew Sutton - ats2mk@virginia.edu
6 ////////////////////////////////////////////////////////////////////////
7 
8 // NOvA includes
10 
11 // Framework includes
19 #include "fhiclcpp/ParameterSet.h"
21 
22 #include <memory>
23 
24 namespace filter
25 {
26  class FLSFilter;
27 
28  class FLSFilter : public art::EDFilter {
29  public:
30  explicit FLSFilter(const fhicl::ParameterSet & pset);
31 
32  // Plugins should not be copied or assigned.
33  FLSFilter(FLSFilter const &) = delete;
34  FLSFilter(FLSFilter &&) = delete;
35  FLSFilter & operator = (FLSFilter const &) = delete;
36  FLSFilter & operator = (FLSFilter &&) = delete;
37 
38  // Required functions.
39  bool filter(art::Event & e) override;
40 
41  private:
43  };
44 
45  //......................................................................
47  fGeantLabel(pset.get< std::string >("GeantLabel"))
48  {
49  }
50 
51 
52  //......................................................................
54  {
56  evt.getByLabel(fGeantLabel, hitlist);
57  return !(hitlist->empty());
58  }
59 
61 } // namespace
bool filter(art::Event &e) override
FLSFilter & operator=(FLSFilter const &)=delete
std::string fGeantLabel
DEFINE_ART_MODULE(TestTMapFile)
Module that kips a configurable number of events between each that it allows through. Note that this module really skips (N-1) events, it uses a simple modular division as its critera. This module will cut down the data sample to 1/N of its original size.
int evt
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
FLSFilter(const fhicl::ParameterSet &pset)
Float_t e
Definition: plot.C:35
enum BeamMode string