#include <DPGAnalysis/SiStripTools/LargeEvents.cc>
Public Member Functions | |
LargeEvents (const edm::ParameterSet &) | |
~LargeEvents () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | endJob () |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
int | _absthr |
edm::InputTag | _collection |
int | _modthr |
edm::ESHandle< SiStripQuality > | _qualityHandle |
std::string | _qualityLabel |
edm::ESWatcher< SiStripQualityRcd > | _qualityWatcher |
bool | _useQuality |
Description: templated EDFilter to select events with large number of SiStripDigi or SiStripCluster
Implementation: <Notes on="" implementation>="">
Definition at line 54 of file LargeEvents.cc.
LargeEvents< T >::LargeEvents | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 88 of file LargeEvents.cc.
: _collection(iConfig.getParameter<edm::InputTag>("collectionName")), _absthr(iConfig.getUntrackedParameter<int>("absoluteThreshold")), _modthr(iConfig.getUntrackedParameter<int>("moduleThreshold")), _useQuality(iConfig.getUntrackedParameter<bool>("useQuality",false)), _qualityLabel(iConfig.getUntrackedParameter<std::string>("qualityLabel","")) { //now do what ever initialization is needed }
LargeEvents< T >::~LargeEvents | ( | ) |
Definition at line 101 of file LargeEvents.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void LargeEvents< T >::beginJob | ( | void | ) | [private, virtual] |
void LargeEvents< T >::endJob | ( | void | ) | [private, virtual] |
bool LargeEvents< T >::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDFilter.
Definition at line 117 of file LargeEvents.cc.
References edm::EventSetup::get(), edm::Event::getByLabel(), and LogDebug.
{ using namespace edm; if( _useQuality) { if(_qualityWatcher.check(iSetup)) { iSetup.get<SiStripQualityRcd>().get(_qualityLabel,_qualityHandle); LogDebug("SiStripQualityUpdated") << "SiStripQuality has changed and it will be updated"; } } Handle<T> digis; iEvent.getByLabel(_collection,digis); int ndigitot = 0; for(typename T::const_iterator it = digis->begin();it!=digis->end();it++) { if(!_useQuality || !_qualityHandle->IsModuleBad(it->detId()) ) { if(_modthr < 0 || int(it->size()) < _modthr ) { ndigitot += it->size(); } } } if(ndigitot > _absthr) { LogDebug("LargeEventSelected") << "event with " << ndigitot << " digi/cluster selected"; return true; } return false; }
int LargeEvents< T >::_absthr [private] |
Definition at line 67 of file LargeEvents.cc.
edm::InputTag LargeEvents< T >::_collection [private] |
Definition at line 66 of file LargeEvents.cc.
int LargeEvents< T >::_modthr [private] |
Definition at line 68 of file LargeEvents.cc.
edm::ESHandle<SiStripQuality> LargeEvents< T >::_qualityHandle [private] |
Definition at line 71 of file LargeEvents.cc.
std::string LargeEvents< T >::_qualityLabel [private] |
Definition at line 70 of file LargeEvents.cc.
edm::ESWatcher<SiStripQualityRcd> LargeEvents< T >::_qualityWatcher [private] |
Definition at line 72 of file LargeEvents.cc.
bool LargeEvents< T >::_useQuality [private] |
Definition at line 69 of file LargeEvents.cc.