CondTools
L1TriggerExt
src
L1ObjectKeysOnlineProdBaseExt.cc
Go to the documentation of this file.
1
#include "
CondTools/L1TriggerExt/interface/L1ObjectKeysOnlineProdBaseExt.h
"
2
3
#include "
CondTools/L1Trigger/interface/Exception.h
"
4
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
7
L1ObjectKeysOnlineProdBaseExt::L1ObjectKeysOnlineProdBaseExt
(
const
edm::ParameterSet
& iConfig)
8
// The subsystemLabel is used by L1TriggerKeyOnlineProdExt to identify the
9
// L1TriggerKeysExt to concatenate.
10
: L1TriggerKeyExt_token(setWhatProduced(this, iConfig.getParameter<
std
::
string
>(
"subsystemLabel"
))
11
.consumes(
edm
::
ESInputTag
{
""
,
"SubsystemKeysOnly"
})),
12
m_omdsReader(iConfig.getParameter<
std::string
>(
"onlineDB"
),
13
iConfig.getParameter<
std::string
>(
"onlineAuthentication"
)) {}
14
15
L1ObjectKeysOnlineProdBaseExt::~L1ObjectKeysOnlineProdBaseExt
() {
16
// do anything here that needs to be done at desctruction time
17
// (e.g. close files, deallocate resources etc.)
18
}
19
20
// ------------ method called to produce the data ------------
21
L1ObjectKeysOnlineProdBaseExt::ReturnType
L1ObjectKeysOnlineProdBaseExt::produce
(
const
L1TriggerKeyExtRcd
& iRecord) {
22
// Get L1TriggerKeyExt with label "SubsystemKeysOnly". Re-throw exception if
23
// not present.
24
L1TriggerKeyExt
subsystemKeys;
25
try
{
26
subsystemKeys = iRecord.
get
(
L1TriggerKeyExt_token
);
27
}
catch
(
l1t::DataAlreadyPresentException
& ex) {
28
throw
ex;
29
}
30
31
// Copy L1TriggerKeyExt to new object.
32
auto
pL1TriggerKey = std::make_unique<L1TriggerKeyExt>(subsystemKeys);
33
34
// Get object keys.
35
fillObjectKeys
(pL1TriggerKey.get());
36
37
return
pL1TriggerKey;
38
}
39
40
//define this as a plug-in
41
//DEFINE_FWK_EVENTSETUP_MODULE(L1ObjectKeysOnlineProdBaseExt);
L1ObjectKeysOnlineProdBaseExt::fillObjectKeys
virtual void fillObjectKeys(L1TriggerKeyExt *pL1TriggerKey)=0
Exception.h
L1ObjectKeysOnlineProdBaseExt::produce
ReturnType produce(const L1TriggerKeyExtRcd &)
Definition:
L1ObjectKeysOnlineProdBaseExt.cc:21
L1ObjectKeysOnlineProdBaseExt::~L1ObjectKeysOnlineProdBaseExt
~L1ObjectKeysOnlineProdBaseExt() override
Definition:
L1ObjectKeysOnlineProdBaseExt.cc:15
ESInputTag
edm
HLT enums.
Definition:
AlignableModifier.h:19
L1TriggerKeyExtRcd
Definition:
L1TriggerKeyExtRcd.h:8
l1t::DataAlreadyPresentException
Definition:
Exception.h:32
L1ObjectKeysOnlineProdBaseExt::ReturnType
std::unique_ptr< L1TriggerKeyExt > ReturnType
Definition:
L1ObjectKeysOnlineProdBaseExt.h:24
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:109
L1TriggerKeyExt
Definition:
L1TriggerKeyExt.h:23
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
L1ObjectKeysOnlineProdBaseExt::L1TriggerKeyExt_token
const edm::ESGetToken< L1TriggerKeyExt, L1TriggerKeyExtRcd > L1TriggerKeyExt_token
Definition:
L1ObjectKeysOnlineProdBaseExt.h:32
L1ObjectKeysOnlineProdBaseExt::L1ObjectKeysOnlineProdBaseExt
L1ObjectKeysOnlineProdBaseExt(const edm::ParameterSet &)
Definition:
L1ObjectKeysOnlineProdBaseExt.cc:7
std
Definition:
JetResolutionObject.h:76
L1ObjectKeysOnlineProdBaseExt.h
EventSetup.h
Generated for CMSSW Reference Manual by
1.8.16