CMS 3D CMS Logo

SkipBadEvents Class Reference

Very simple class that inherits from EDFilter to skip a set of run and events numbers. More...

#include <RecoPixelVertexing/PixelVertexFinding/SkipBadEvents.h>

Inheritance diagram for SkipBadEvents:

edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

virtual bool filter (edm::Event &e, const edm::EventSetup &s)
 SkipBadEvents (const edm::ParameterSet &config)
virtual ~SkipBadEvents ()

Private Attributes

std::map< int, std::set< int > > skip_


Detailed Description

Very simple class that inherits from EDFilter to skip a set of run and events numbers.

This won't be needed when PoolSource can do this for us, then I will retire this little guy.

Date
2006/06/13 17:33:24
Revision
1.1
Author:
Aaron Dominguez (UNL)

Definition at line 20 of file SkipBadEvents.h.


Constructor & Destructor Documentation

SkipBadEvents::SkipBadEvents ( const edm::ParameterSet config  )  [explicit]

Definition at line 3 of file SkipBadEvents.cc.

References edm::ParameterSet::getParameter(), i, and skip_.

00003                                                           {
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 }

SkipBadEvents::~SkipBadEvents (  )  [virtual]

Definition at line 11 of file SkipBadEvents.cc.

00011 {}


Member Function Documentation

bool SkipBadEvents::filter ( edm::Event e,
const edm::EventSetup s 
) [virtual]

Implements edm::EDFilter.

Definition at line 13 of file SkipBadEvents.cc.

References edm::Event::id(), mergeAndRegister_online::run, and skip_.

00013                                                               {
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 }


Member Data Documentation

std::map<int,std::set<int> > SkipBadEvents::skip_ [private]

Definition at line 27 of file SkipBadEvents.h.

Referenced by filter(), and SkipBadEvents().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:38 2009 for CMSSW by  doxygen 1.5.4