CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/DQM/SiStripCommissioningSources/plugins/SiStripCommissioningBasicPrescaler.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    SiStripCommissioningBasicPrescaler
00004 // Class:      SiStripCommissioningBasicPrescaler
00005 // 
00013 //
00014 // Original Author:  Christophe DELAERE
00015 //         Created:  Fri Jan 18 12:17:46 CET 2008
00016 // $Id: SiStripCommissioningBasicPrescaler.cc,v 1.1 2008/10/22 10:44:25 delaer Exp $
00017 //
00018 //
00019 
00020 
00021 // system include files
00022 #include <memory>
00023 
00024 // user include files
00025 #include "DQM/SiStripCommissioningSources/interface/SiStripCommissioningBasicPrescaler.h"
00026 
00027 //
00028 // constructors and destructor
00029 //
00030 SiStripCommissioningBasicPrescaler::SiStripCommissioningBasicPrescaler(const edm::ParameterSet& iConfig)
00031 {
00032    //now do what ever initialization is needed
00033    factor_ = iConfig.getParameter<uint32_t>( "ScaleFactor" ) ;
00034 }
00035 
00036 //
00037 // member functions
00038 //
00039 
00040 // ------------ method called on each new Event  ------------
00041 bool
00042 SiStripCommissioningBasicPrescaler::filter(edm::Event& iEvent, const edm::EventSetup& iSetup)
00043 {
00044    using namespace edm;
00045    bool result = ((iEvent.id().event()%factor_)==0);
00046    return result;
00047 }
00048