10 #include "art/Framework/Core/EDFilter.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 #include "art/Framework/Principal/Handle.h"
14 #include "art/Framework/Principal/Run.h"
15 #include "art/Framework/Principal/SubRun.h"
16 #include "canvas/Utilities/InputTag.h"
18 #include "fhiclcpp/ParameterSet.h"
19 #include "messagefacility/MessageLogger/MessageLogger.h"
35 explicit NthEvent(fhicl::ParameterSet
const& p);
57 bool filter(art::Event& e)
override;
67 : nth_(p.get<uint32_t>(
"nth")) {}
72 return e.event() % nth_ == 0 ?
true :
false;
NthEvent & operator=(NthEvent const &)=delete
Plugins should not be copied or assigned.
An art::EDFilter module that passes one out of N events.
bool filter(art::Event &e) override
Perform the filtering. NthEvent module passes events where event number % nth == 0.
NthEvent(fhicl::ParameterSet const &p)
Construct the NthEvent Filter.