#include <WorkSpace/NMaxPerLumi/src/NMaxPerLumi.cc>
Public Member Functions | |
NMaxPerLumi (const edm::ParameterSet &) | |
~NMaxPerLumi () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | endJob () |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
std::map< unsigned int, std::map< unsigned int, unsigned int > > | counters |
unsigned int | nMaxPerLumi_ |
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 37 of file NMaxPerLumi.cc.
NMaxPerLumi::NMaxPerLumi | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 63 of file NMaxPerLumi.cc.
References edm::ParameterSet::getParameter(), and nMaxPerLumi_.
{ //now do what ever initialization is needed nMaxPerLumi_ = iConfig.getParameter<unsigned int>("nMaxPerLumi"); }
NMaxPerLumi::~NMaxPerLumi | ( | ) |
Definition at line 71 of file NMaxPerLumi.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void NMaxPerLumi::beginJob | ( | void | ) | [private, virtual] |
void NMaxPerLumi::endJob | ( | void | ) | [private, virtual] |
bool NMaxPerLumi::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDFilter.
Definition at line 86 of file NMaxPerLumi.cc.
References counters, edm::EventBase::id(), nMaxPerLumi_, and DTTTrigCorrFirst::run.
{ const edm::EventID & id = iEvent.id(); if (counters[id.run()][id.luminosityBlock()]>=nMaxPerLumi_) return false; else{ counters[id.run()][id.luminosityBlock()]++; return true; } }
std::map< unsigned int , std::map < unsigned int, unsigned int > > NMaxPerLumi::counters [private] |
Definition at line 48 of file NMaxPerLumi.cc.
Referenced by filter().
unsigned int NMaxPerLumi::nMaxPerLumi_ [private] |
Definition at line 49 of file NMaxPerLumi.cc.
Referenced by filter(), and NMaxPerLumi().