CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SkipBadEvents.cc
Go to the documentation of this file.
2 
4  std::vector<int> badrunevent = config.getParameter<std::vector<int> >("RunEvent");
5  // Convert to a map for easy lookup
6  for (unsigned int i=0; i<badrunevent.size(); i+=2) {
7  skip_[ badrunevent[i] ].insert( badrunevent[i+1] );
8  }
9 }
10 
12 
14  int run = e.id().run();
15  int evt = e.id().event();
16 
17  bool pass = ( skip_[run].find(evt) == skip_[run].end() );
18 
19  return pass;
20 }
RunNumber_t run() const
Definition: EventID.h:42
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:44
int i
Definition: DBlmapReader.cc:9
std::map< int, std::set< int > > skip_
Definition: SkipBadEvents.h:27
virtual bool filter(edm::Event &e, const edm::EventSetup &s)
SkipBadEvents(const edm::ParameterSet &config)
Definition: SkipBadEvents.cc:3
virtual ~SkipBadEvents()
edm::EventID id() const
Definition: EventBase.h:56