L1TriggerConfig
L1GtConfigProducers
src
L1GtPrescaleFactorsTechTrigTrivialProducer.cc
Go to the documentation of this file.
1
15
// this class header
16
#include "
L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigTrivialProducer.h
"
17
18
// system include files
19
#include <memory>
20
21
#include <vector>
22
23
// user include files
24
// base class
25
#include "
FWCore/Framework/interface/ESProducer.h
"
26
27
#include "
FWCore/Framework/interface/ModuleFactory.h
"
28
#include "
FWCore/Framework/interface/ESHandle.h
"
29
30
#include "
CondFormats/DataRecord/interface/L1GtPrescaleFactorsTechTrigRcd.h
"
31
32
// forward declarations
33
34
// constructor(s)
35
L1GtPrescaleFactorsTechTrigTrivialProducer::L1GtPrescaleFactorsTechTrigTrivialProducer
(
const
edm::ParameterSet
& parSet) {
36
// tell the framework what data is being produced
37
setWhatProduced
(
this
, &
L1GtPrescaleFactorsTechTrigTrivialProducer::producePrescaleFactors
);
38
39
// now do what ever other initialization is needed
40
41
// prescale factors
42
43
std::vector<edm::ParameterSet> prescaleFactorsSet =
44
parSet.
getParameter
<std::vector<edm::ParameterSet> >(
"PrescaleFactorsSet"
);
45
46
for
(std::vector<edm::ParameterSet>::const_iterator itPfSet = prescaleFactorsSet.begin();
47
itPfSet != prescaleFactorsSet.end();
48
++itPfSet) {
49
// prescale factors
50
m_prescaleFactors
.push_back(itPfSet->getParameter<std::vector<int> >(
"PrescaleFactors"
));
51
}
52
}
53
54
// destructor
55
L1GtPrescaleFactorsTechTrigTrivialProducer::~L1GtPrescaleFactorsTechTrigTrivialProducer
() {
56
// empty
57
}
58
59
// member functions
60
61
// method called to produce the data
62
std::unique_ptr<L1GtPrescaleFactors>
L1GtPrescaleFactorsTechTrigTrivialProducer::producePrescaleFactors
(
63
const
L1GtPrescaleFactorsTechTrigRcd
& iRecord) {
64
return
std::make_unique<L1GtPrescaleFactors>(
m_prescaleFactors
);
65
}
ESHandle.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:138
ESProducer.h
L1GtPrescaleFactorsTechTrigRcd
Definition:
L1GtPrescaleFactorsTechTrigRcd.h:38
L1GtPrescaleFactorsTechTrigTrivialProducer.h
edm::ParameterSet
Definition:
ParameterSet.h:36
L1GtPrescaleFactorsTechTrigTrivialProducer::~L1GtPrescaleFactorsTechTrigTrivialProducer
~L1GtPrescaleFactorsTechTrigTrivialProducer() override
destructor
Definition:
L1GtPrescaleFactorsTechTrigTrivialProducer.cc:55
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ModuleFactory.h
L1GtPrescaleFactorsTechTrigTrivialProducer::producePrescaleFactors
std::unique_ptr< L1GtPrescaleFactors > producePrescaleFactors(const L1GtPrescaleFactorsTechTrigRcd &)
public methods
Definition:
L1GtPrescaleFactorsTechTrigTrivialProducer.cc:62
L1GtPrescaleFactorsTechTrigTrivialProducer::m_prescaleFactors
std::vector< std::vector< int > > m_prescaleFactors
prescale factors
Definition:
L1GtPrescaleFactorsTechTrigTrivialProducer.h:50
L1GtPrescaleFactorsTechTrigTrivialProducer::L1GtPrescaleFactorsTechTrigTrivialProducer
L1GtPrescaleFactorsTechTrigTrivialProducer(const edm::ParameterSet &)
constructor
Definition:
L1GtPrescaleFactorsTechTrigTrivialProducer.cc:35
L1GtPrescaleFactorsTechTrigRcd.h
Generated for CMSSW Reference Manual by
1.8.16