51 std::vector<edm::EventID>
ids_;
67 ids_(iConfig.getUntrackedParameter<
std::vector<
edm::EventID> >(
"eventsToAbort")),
88 struct CompareWithoutLumi {
89 CompareWithoutLumi(
edm::EventID const& iThis) : m_this(iThis) {
92 return m_this.run() == iOther.
run() && m_this.event() == iOther.
event();
101 std::vector<edm::EventID>::iterator itFind= std::find_if(
ids_.begin(),
ids_.end(), CompareWithoutLumi(iEvent.
id()));
102 if(itFind !=
ids_.end()) {
104 throw cms::Exception(
"AbortEvent") <<
"Found event " << iEvent.
id() <<
"\n";
125 desc.
addUntracked<std::vector<edm::EventID> >(
"eventsToAbort");
126 desc.
addUntracked<
bool>(
"throwExceptionInsteadOfAbort",
false);
127 descriptions.
add(
"abortOnEventID", desc);
EventNumber_t event() const
std::vector< edm::EventID > ids_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~AbortOnEventIDAnalyzer() override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
AbortOnEventIDAnalyzer(edm::ParameterSet const &)
void analyze(edm::Event const &, edm::EventSetup const &) override