Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:19

0001 /**
0002  * \class L1GtPrescaleFactorsTechTrigTrivialProducer
0003  * 
0004  * 
0005  * Description: ESProducer for L1 GT prescale factors for technical triggers.  
0006  *
0007  * Implementation:
0008  *    <TODO: enter implementation details>
0009  *   
0010  * \author: Vasile Mihai Ghete - HEPHY Vienna
0011  * 
0012  *
0013  */
0014 
0015 // this class header
0016 #include "L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigTrivialProducer.h"
0017 
0018 // system include files
0019 #include <memory>
0020 
0021 #include <vector>
0022 
0023 // user include files
0024 //   base class
0025 #include "FWCore/Framework/interface/ESProducer.h"
0026 
0027 #include "FWCore/Framework/interface/ModuleFactory.h"
0028 #include "FWCore/Framework/interface/ESHandle.h"
0029 
0030 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsTechTrigRcd.h"
0031 
0032 // forward declarations
0033 
0034 // constructor(s)
0035 L1GtPrescaleFactorsTechTrigTrivialProducer::L1GtPrescaleFactorsTechTrigTrivialProducer(const edm::ParameterSet& parSet) {
0036   // tell the framework what data is being produced
0037   setWhatProduced(this, &L1GtPrescaleFactorsTechTrigTrivialProducer::producePrescaleFactors);
0038 
0039   // now do what ever other initialization is needed
0040 
0041   // prescale factors
0042 
0043   std::vector<edm::ParameterSet> prescaleFactorsSet =
0044       parSet.getParameter<std::vector<edm::ParameterSet> >("PrescaleFactorsSet");
0045 
0046   for (std::vector<edm::ParameterSet>::const_iterator itPfSet = prescaleFactorsSet.begin();
0047        itPfSet != prescaleFactorsSet.end();
0048        ++itPfSet) {
0049     // prescale factors
0050     m_prescaleFactors.push_back(itPfSet->getParameter<std::vector<int> >("PrescaleFactors"));
0051   }
0052 }
0053 
0054 // destructor
0055 L1GtPrescaleFactorsTechTrigTrivialProducer::~L1GtPrescaleFactorsTechTrigTrivialProducer() {
0056   // empty
0057 }
0058 
0059 // member functions
0060 
0061 // method called to produce the data
0062 std::unique_ptr<L1GtPrescaleFactors> L1GtPrescaleFactorsTechTrigTrivialProducer::producePrescaleFactors(
0063     const L1GtPrescaleFactorsTechTrigRcd& iRecord) {
0064   return std::make_unique<L1GtPrescaleFactors>(m_prescaleFactors);
0065 }