68 std::vector<edm::EventID>
ids_;
69 mutable std::atomic<unsigned int>
index_;
87 : ids_(iConfig.getUntrackedParameter<
std::
vector<
edm::EventID>>(
"eventSequence")),
89 minNEvents_(iConfig.getUntrackedParameter<unsigned
int>(
"minNumberOfEvents")),
90 maxNEvents_(iConfig.getUntrackedParameter<unsigned
int>(
"maxNumberOfEvents")),
91 unorderedEvents_(iConfig.getUntrackedParameter<
bool>(
"unorderedEvents")) {
107 <<
"Was passes " <<
ids_.size() <<
" EventIDs but have processed more events than that\n";
111 if (itFound ==
ids_.end()) {
112 throw cms::Exception(
"UnexpecedEvent") <<
"The event " << iEventID <<
" was not expected.";
130 return std::shared_ptr<rlec::Cache>{};
139 return std::shared_ptr<rlec::Cache>{};
153 <<
"Saw " <<
index_ <<
" (begin runs)+(begin lumis)+events+(end lumis)+(end runs) but was supposed to see " 154 <<
ids_.size() <<
"\n";
159 <<
" (begin runs)+(begin lumis)+events+(end lumis)+(end runs) but was supposed to see between " <<
minNEvents_ 167 desc.addUntracked<std::vector<edm::EventID>>(
"eventSequence");
168 desc.addUntracked<
unsigned int>(
"minNumberOfEvents", 0)
170 "minimum number of Events that must be seen. If max is 0 then this will be ignored and all Events must be " 172 desc.addUntracked<
unsigned int>(
"maxNumberOfEvents", 0)
173 ->setComment(
"maximum number of Events that must be seen. If set to 0, min and max are ignored");
174 desc.addUntracked<
bool>(
"unorderedEvents",
false)
175 ->setComment(
"set to true if events are not guaranteed to be in same order as 'eventSequence' specifies.");
176 descriptions.
add(
"runLumiEventIDChecker",
desc);
std::vector< edm::EventID > ids_
void globalEndLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &es) const override
std::shared_ptr< rlec::Cache > globalBeginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &es) const override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
RunLumiEventChecker(edm::ParameterSet const &)
std::shared_ptr< rlec::Cache > globalBeginRun(edm::Run const &run, edm::EventSetup const &es) const override
#define DEFINE_FWK_MODULE(type)
void analyze(edm::StreamID, edm::Event const &, edm::EventSetup const &) const override
void globalEndRun(edm::Run const &run, edm::EventSetup const &es) const override
std::atomic< unsigned int > index_
void check(edm::EventID const &iID, bool isEvent) const
~RunLumiEventChecker() override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)