9 #include "art/Framework/Core/ModuleMacros.h"
10 #include "art/Framework/Core/EDFilter.h"
11 #include "art/Framework/Principal/Event.h"
12 #include "canvas/Utilities/InputTag.h"
13 #include "fhiclcpp/ParameterSet.h"
14 #include "messagefacility/MessageLogger/MessageLogger.h"
41 fHitDataLabelVec = pset.get<std::vector<art::InputTag>>(
"HitDataLabelVec", {
""});
42 fMaximumHits = pset.get<
unsigned int >(
"MaximumHits", 800000u);
49 bool filterPass =
true;
51 for(
auto const& hitDataLabel : fHitDataLabelVec)
53 auto const& hitData =
event.getProduct<std::vector<recob::Hit>>(hitDataLabel);
57 if (hitData.size() > fMaximumHits)
59 mf::LogInfo log(
"FilterNumberTPCHits");
60 log <<
"******************************************************\n" <<
"Rejecting event for "
61 <<
"***** " << hitDataLabel <<
" with " << hitData.size() <<
" hits ******\n"
62 <<
"******************************************************";
Declaration of signal hit object.
FilterNumberTPCHits(fhicl::ParameterSet const &)
bool filter(art::Event &evt) override
std::vector< art::InputTag > fHitDataLabelVec
unsigned int fMaximumHits