Main Page
Namespaces
Classes
Package Documentation
L1Trigger
L1TCalorimeter
plugins
L1TCaloConfigESProducer.cc
Go to the documentation of this file.
1
10
// system include files
11
#include <memory>
12
#include <iostream>
13
#include <fstream>
14
15
// user include files
16
#include "
FWCore/Framework/interface/ModuleFactory.h
"
17
#include "
FWCore/Framework/interface/ESProducer.h
"
18
#include "
FWCore/Framework/interface/ESHandle.h
"
19
#include "
FWCore/Framework/interface/ESProducts.h
"
20
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
21
22
#include "
FWCore/ParameterSet/interface/FileInPath.h
"
23
24
#include "
CondFormats/L1TObjects/interface/CaloConfig.h
"
25
#include "
L1Trigger/L1TCalorimeter/interface/CaloConfigHelper.h
"
26
#include "
CondFormats/DataRecord/interface/L1TCaloConfigRcd.h
"
27
28
using namespace
std
;
29
30
//
31
// class declaration
32
//
33
34
using namespace
l1t
;
35
36
class
L1TCaloConfigESProducer
:
public
edm::ESProducer
{
37
public
:
38
L1TCaloConfigESProducer
(
const
edm::ParameterSet
&);
39
~
L1TCaloConfigESProducer
()
override
;
40
41
using
ReturnType
= std::unique_ptr<CaloConfig>;
42
43
ReturnType
produce(
const
L1TCaloConfigRcd
&);
44
45
private
:
46
CaloConfig
m_params
;
47
std::string
m_label
;
48
};
49
50
//
51
// constants, enums and typedefs
52
//
53
54
//
55
// static data member definitions
56
//
57
58
//
59
// constructors and destructor
60
//
61
L1TCaloConfigESProducer::L1TCaloConfigESProducer
(
const
edm::ParameterSet
& conf) {
62
//the following line is needed to tell the framework what
63
// data is being produced
64
setWhatProduced(
this
);
65
//setWhatProduced(this, conf.getParameter<std::string>("label"));
66
67
std::string
l1epoch = conf.
getParameter
<
string
>(
"l1Epoch"
);
68
unsigned
fwv = conf.
getParameter
<
unsigned
>(
"fwVersionLayer2"
);
69
CaloConfigHelper
h
(m_params, fwv, l1epoch);
70
}
71
72
L1TCaloConfigESProducer::~L1TCaloConfigESProducer
() {
73
// do anything here that needs to be done at desctruction time
74
// (e.g. close files, deallocate resources etc.)
75
}
76
77
//
78
// member functions
79
//
80
81
// ------------ method called to produce the data ------------
82
L1TCaloConfigESProducer::ReturnType
L1TCaloConfigESProducer::produce
(
const
L1TCaloConfigRcd
& iRecord) {
83
return
std::make_unique<CaloConfig>(m_params);
84
}
85
86
//define this as a plug-in
87
DEFINE_FWK_EVENTSETUP_MODULE
(
L1TCaloConfigESProducer
);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CaloConfig.h
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition:
L1TUtmAlgorithmRcd.h:4
ESProducts.h
MessageLogger.h
l1t::CaloConfig
Definition:
CaloConfig.h:24
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
L1TCaloConfigESProducer::m_label
std::string m_label
Definition:
L1TCaloConfigESProducer.cc:47
L1TCaloConfigESProducer
Definition:
L1TCaloConfigESProducer.cc:36
CaloConfigHelper.h
std
Definition:
JetResolutionObject.h:76
l1t
delete x;
Definition:
CaloConfig.h:22
L1TCaloConfigRcd.h
edm::ESProducer
Definition:
ESProducer.h:101
FileInPath.h
ESHandle.h
L1TCaloConfigESProducer::ReturnType
std::unique_ptr< CaloConfig > ReturnType
Definition:
L1TCaloConfigESProducer.cc:41
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
L1TCaloConfigESProducer::~L1TCaloConfigESProducer
~L1TCaloConfigESProducer() override
Definition:
L1TCaloConfigESProducer.cc:72
L1TCaloConfigESProducer::produce
ReturnType produce(const L1TCaloConfigRcd &)
Definition:
L1TCaloConfigESProducer.cc:82
L1TCaloConfigESProducer::L1TCaloConfigESProducer
L1TCaloConfigESProducer(const edm::ParameterSet &)
Definition:
L1TCaloConfigESProducer.cc:61
l1t::CaloConfigHelper
Definition:
CaloConfigHelper.h:12
ESProducer.h
L1TCaloConfigRcd
Definition:
L1TCaloConfigRcd.h:16
L1TCaloConfigESProducer::m_params
CaloConfig m_params
Definition:
L1TCaloConfigESProducer.cc:46
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
Generated for CMSSW Reference Manual by
1.8.11