47 fBadEvents = pset.get<std::vector<unsigned int>>(
"BadEvents");
48 fBadRuns = pset.get<std::vector<unsigned int>>(
"BadRuns");
51 fEventList = pset.get<std::string>(
"EventList");
55 in.open(fEventList.c_str());
58 in.getline(line, 1024);
59 if (!in.good())
break;
60 unsigned int n0, n1, n2;
61 sscanf(line,
"%u %u %u", &n0, &n1, &n2);
71 unsigned int evtNo = (
unsigned int)evt.
id().
event();
72 unsigned int runNo = (
unsigned int)evt.
run();
73 unsigned int subrunNo = (
unsigned int)evt.
subRun();
77 if (sobe.size() != sobr.size()) {
79 <<
" BadEvent and BadRun list must be same length. Line " << __LINE__ <<
", " << __FILE__
83 for (
unsigned int ii = 0; ii < sobe.size(); ++ii) {
84 if (sobe.at(ii) == evtNo && sobr.at(ii) == runNo) {
86 <<
"\t\n Skipping run/event " << runNo <<
"/" << evtNo <<
" by request.\n";
93 for (
unsigned int ii = 0; ii <
fSelRuns.size(); ii++) {
std::vector< unsigned int > SetOfBadRuns() const
std::vector< unsigned int > fSelRuns
list of selected runs
SubRunNumber_t subRun() const
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::vector< unsigned int > fSelEvents
list of selected events
std::vector< unsigned int > fBadRuns
list of bad runs
#define DEFINE_ART_MODULE(klass)
bool filter(art::Event &evt) override
EventFilter(fhicl::ParameterSet const &)
std::vector< unsigned int > SetOfBadEvents() const
std::vector< unsigned int > fBadEvents
list of bad events
std::vector< unsigned int > fSelSubRuns
list of selected runs
EDFilter(fhicl::ParameterSet const &pset)
EventNumber_t event() const
cet::coded_exception< error, detail::translate > exception