CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SkipBadEvents Class Reference

#include <RecoPixelVertexing/PixelVertexFinding/SkipBadEvents.h>

Inheritance diagram for SkipBadEvents:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual bool filter (edm::Event &e, const edm::EventSetup &s)
 
 SkipBadEvents (const edm::ParameterSet &config)
 
virtual ~SkipBadEvents ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
typedef WorkerT< EDFilterWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDFilter
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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

3  {
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 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::map< int, std::set< int > > skip_
Definition: SkipBadEvents.h:27
SkipBadEvents::~SkipBadEvents ( )
virtual

Definition at line 11 of file SkipBadEvents.cc.

11 {}

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

13  {
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
EventNumber_t event() const
Definition: EventID.h:44
std::map< int, std::set< int > > skip_
Definition: SkipBadEvents.h:27
edm::EventID id() const
Definition: EventBase.h:56

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