CMS 3D CMS Logo

Public Member Functions | Private Attributes

SkipBadEvents Class Reference

#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_.

                                                          {
  std::vector<int> badrunevent = config.getParameter<std::vector<int> >("RunEvent");
  // Convert to a map for easy lookup
  for (unsigned int i=0; i<badrunevent.size(); i+=2) {
    skip_[ badrunevent[i] ].insert( badrunevent[i+1] );
  }
}
SkipBadEvents::~SkipBadEvents ( ) [virtual]

Definition at line 11 of file SkipBadEvents.cc.

{}

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::EventID::event(), edm::EventBase::id(), edm::EventID::run(), DTTTrigCorrFirst::run, and skip_.

                                                              {
  int run = e.id().run();
  int evt = e.id().event();

  bool pass = ( skip_[run].find(evt) == skip_[run].end() );

  return pass;
}

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().