L1TriggerConfig
L1GtConfigProducers
src
L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc
Go to the documentation of this file.
1
15
// this class header
16
#include "
L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigTrivialProducer.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/L1GtPrescaleFactorsAlgoTrigRcd.h
"
31
32
// forward declarations
33
34
// constructor(s)
35
L1GtPrescaleFactorsAlgoTrigTrivialProducer::L1GtPrescaleFactorsAlgoTrigTrivialProducer
(
const
edm::ParameterSet
& parSet) {
36
// tell the framework what data is being produced
37
setWhatProduced
(
this
, &
L1GtPrescaleFactorsAlgoTrigTrivialProducer::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
L1GtPrescaleFactorsAlgoTrigTrivialProducer::~L1GtPrescaleFactorsAlgoTrigTrivialProducer
() {
56
// empty
57
}
58
59
// member functions
60
61
// method called to produce the data
62
std::unique_ptr<L1GtPrescaleFactors>
L1GtPrescaleFactorsAlgoTrigTrivialProducer::producePrescaleFactors
(
63
const
L1GtPrescaleFactorsAlgoTrigRcd
& iRecord) {
64
return
std::make_unique<L1GtPrescaleFactors>(
m_prescaleFactors
);
65
}
ESHandle.h
L1GtPrescaleFactorsAlgoTrigTrivialProducer::L1GtPrescaleFactorsAlgoTrigTrivialProducer
L1GtPrescaleFactorsAlgoTrigTrivialProducer(const edm::ParameterSet &)
constructor
Definition:
L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc:35
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
ESProducer.h
L1GtPrescaleFactorsAlgoTrigTrivialProducer::m_prescaleFactors
std::vector< std::vector< int > > m_prescaleFactors
prescale factors
Definition:
L1GtPrescaleFactorsAlgoTrigTrivialProducer.h:50
L1GtPrescaleFactorsAlgoTrigTrivialProducer::producePrescaleFactors
std::unique_ptr< L1GtPrescaleFactors > producePrescaleFactors(const L1GtPrescaleFactorsAlgoTrigRcd &)
public methods
Definition:
L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc:62
edm::ParameterSet
Definition:
ParameterSet.h:47
L1GtPrescaleFactorsAlgoTrigRcd.h
ModuleFactory.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
L1GtPrescaleFactorsAlgoTrigTrivialProducer.h
L1GtPrescaleFactorsAlgoTrigTrivialProducer::~L1GtPrescaleFactorsAlgoTrigTrivialProducer
~L1GtPrescaleFactorsAlgoTrigTrivialProducer() override
destructor
Definition:
L1GtPrescaleFactorsAlgoTrigTrivialProducer.cc:55
L1GtPrescaleFactorsAlgoTrigRcd
Definition:
L1GtPrescaleFactorsAlgoTrigRcd.h:38
Generated for CMSSW Reference Manual by
1.8.16