CondTools
L1TriggerExt
plugins
L1TriggerKeyDummyProdExt.cc
Go to the documentation of this file.
1
#include "
CondTools/L1TriggerExt/plugins/L1TriggerKeyDummyProdExt.h
"
2
3
L1TriggerKeyDummyProdExt::L1TriggerKeyDummyProdExt
(
const
edm::ParameterSet
& iConfig) {
4
//the following line is needed to tell the framework what
5
// data is being produced
6
7
// Label should be empty, "SubsystemKeysOnly" or any subsystem label expected
8
// by L1TriggerKeyOnlineProd.
9
std::string
label
= iConfig.
getParameter
<
std::string
>(
"label"
);
10
setWhatProduced
(
this
,
label
);
11
12
//now do what ever other initialization is needed
13
m_key
.
setTSCKey
(iConfig.
getParameter
<
std::string
>(
"tscKey"
));
14
m_key
.
setSubsystemKey
(
L1TriggerKeyExt::kuGT
, iConfig.
getParameter
<
std::string
>(
"uGTKey"
));
15
m_key
.
setSubsystemKey
(
L1TriggerKeyExt::kuGMT
, iConfig.
getParameter
<
std::string
>(
"uGMTKey"
));
16
m_key
.
setSubsystemKey
(
L1TriggerKeyExt::kBMTF
, iConfig.
getParameter
<
std::string
>(
"BMTFKey"
));
17
m_key
.
setSubsystemKey
(
L1TriggerKeyExt::kCALO
, iConfig.
getParameter
<
std::string
>(
"CALOKey"
));
18
19
if
(
label
!=
"SubsystemKeysOnly"
) {
20
typedef
std::vector<edm::ParameterSet> ObjectKeys;
21
ObjectKeys
keys
= iConfig.
getParameter
<ObjectKeys>(
"objectKeys"
);
22
23
for
(ObjectKeys::const_iterator it =
keys
.begin(); it !=
keys
.end(); ++it) {
24
// Replace ?s with spaces.
25
std::string
key
= it->getParameter<
std::string
>(
"key"
);
26
replace
(
key
.begin(),
key
.end(),
'?'
,
' '
);
27
28
m_key
.
add
(it->getParameter<
std::string
>(
"record"
), it->getParameter<
std::string
>(
"type"
),
key
);
29
}
30
}
31
}
32
33
L1TriggerKeyDummyProdExt::~L1TriggerKeyDummyProdExt
() {
34
// do anything here that needs to be done at desctruction time
35
// (e.g. close files, deallocate resources etc.)
36
}
37
38
//
39
// member functions
40
//
41
42
// ------------ method called to produce the data ------------
43
L1TriggerKeyDummyProdExt::ReturnType
L1TriggerKeyDummyProdExt::produce
(
const
L1TriggerKeyExtRcd
& iRecord) {
44
return
std::make_unique<L1TriggerKeyExt>(
m_key
);
45
}
46
47
//define this as a plug-in
48
//DEFINE_FWK_EVENTSETUP_MODULE(L1TriggerKeyDummyProdExt);
L1TriggerKeyExt::kuGMT
Definition:
L1TriggerKeyExt.h:27
L1TriggerKeyDummyProdExt::ReturnType
std::unique_ptr< L1TriggerKeyExt > ReturnType
Definition:
L1TriggerKeyDummyProdExt.h:19
L1TriggerKeyExt::kBMTF
Definition:
L1TriggerKeyExt.h:27
L1TriggerKeyExt::add
void add(const std::string &record, const std::string &type, const std::string &key)
Definition:
L1TriggerKeyExt.h:42
L1TriggerKeyExtRcd
Definition:
L1TriggerKeyExtRcd.h:8
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
L1TriggerKeyDummyProdExt::L1TriggerKeyDummyProdExt
L1TriggerKeyDummyProdExt(const edm::ParameterSet &)
Definition:
L1TriggerKeyDummyProdExt.cc:3
L1TriggerKeyExt::setSubsystemKey
void setSubsystemKey(L1Subsystems subsystem, const std::string &key)
Definition:
L1TriggerKeyExt.h:54
L1TriggerKeyDummyProdExt.h
relativeConstraints.keys
keys
Definition:
relativeConstraints.py:89
L1TriggerKeyExt::kCALO
Definition:
L1TriggerKeyExt.h:27
L1TriggerKeyDummyProdExt::m_key
L1TriggerKeyExt m_key
Definition:
L1TriggerKeyDummyProdExt.h:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
L1TriggerKeyExt::kuGT
Definition:
L1TriggerKeyExt.h:27
L1TriggerKeyDummyProdExt::produce
ReturnType produce(const L1TriggerKeyExtRcd &)
Definition:
L1TriggerKeyDummyProdExt.cc:43
crabWrapper.key
key
Definition:
crabWrapper.py:19
label
const char * label
Definition:
PFTauDecayModeTools.cc:11
L1TriggerKeyDummyProdExt::~L1TriggerKeyDummyProdExt
~L1TriggerKeyDummyProdExt() override
Definition:
L1TriggerKeyDummyProdExt.cc:33
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition:
root2matplotlib.py:444
L1TriggerKeyExt::setTSCKey
void setTSCKey(const std::string &tscKey)
Definition:
L1TriggerKeyExt.h:52
Generated for CMSSW Reference Manual by
1.8.16