CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoPixelVertexing/PixelVertexFinding/src/SkipBadEvents.cc

Go to the documentation of this file.
00001 #include "RecoPixelVertexing/PixelVertexFinding/interface/SkipBadEvents.h"
00002 
00003 SkipBadEvents::SkipBadEvents(const edm::ParameterSet& config) {
00004   std::vector<int> badrunevent = config.getParameter<std::vector<int> >("RunEvent");
00005   // Convert to a map for easy lookup
00006   for (unsigned int i=0; i<badrunevent.size(); i+=2) {
00007     skip_[ badrunevent[i] ].insert( badrunevent[i+1] );
00008   }
00009 }
00010 
00011 SkipBadEvents::~SkipBadEvents(){}
00012 
00013 bool SkipBadEvents::filter(edm::Event& e, const edm::EventSetup& s) {
00014   int run = e.id().run();
00015   int evt = e.id().event();
00016 
00017   bool pass = ( skip_[run].find(evt) == skip_[run].end() );
00018 
00019   return pass;
00020 }