Main Page
Namespaces
Classes
Package Documentation
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
: m_omdsReader(
9
iConfig.getParameter<
std
::
string
>(
"onlineDB"
),
10
iConfig.getParameter<
std
::
string
>(
"onlineAuthentication"
) )
11
{
12
//the following line is needed to tell the framework what
13
// data is being produced
14
15
// The subsystemLabel is used by L1TriggerKeyOnlineProdExt to identify the
16
// L1TriggerKeysExt to concatenate.
17
setWhatProduced
(
this
,
18
iConfig.
getParameter
<
std::string
>(
"subsystemLabel"
)
19
);
20
21
//now do what ever other initialization is needed
22
}
23
24
25
L1ObjectKeysOnlineProdBaseExt::~L1ObjectKeysOnlineProdBaseExt
()
26
{
27
28
// do anything here that needs to be done at desctruction time
29
// (e.g. close files, deallocate resources etc.)
30
31
}
32
33
// ------------ method called to produce the data ------------
34
L1ObjectKeysOnlineProdBaseExt::ReturnType
35
L1ObjectKeysOnlineProdBaseExt::produce
(
const
L1TriggerKeyExtRcd
& iRecord)
36
{
37
using namespace
edm::es
;
38
39
// Get L1TriggerKeyExt with label "SubsystemKeysOnly". Re-throw exception if
40
// not present.
41
edm::ESHandle< L1TriggerKeyExt >
subsystemKeys ;
42
try
43
{
44
iRecord.
get
(
"SubsystemKeysOnly"
, subsystemKeys ) ;
45
}
46
catch
(
l1t::DataAlreadyPresentException
& ex )
47
{
48
throw
ex ;
49
}
50
51
// Copy L1TriggerKeyExt to new object.
52
std::shared_ptr<L1TriggerKeyExt> pL1TriggerKey = std::make_shared< L1TriggerKeyExt >( *subsystemKeys ) ;
53
54
// Get object keys.
55
fillObjectKeys
( pL1TriggerKey ) ;
56
57
return
pL1TriggerKey ;
58
}
59
60
//define this as a plug-in
61
//DEFINE_FWK_EVENTSETUP_MODULE(L1ObjectKeysOnlineProdBaseExt);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Exception.h
L1ObjectKeysOnlineProdBaseExt::produce
ReturnType produce(const L1TriggerKeyExtRcd &)
Definition:
L1ObjectKeysOnlineProdBaseExt.cc:35
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
L1ObjectKeysOnlineProdBaseExt::fillObjectKeys
virtual void fillObjectKeys(ReturnType pL1TriggerKey)=0
EventSetup.h
std
Definition:
JetResolutionObject.h:76
L1ObjectKeysOnlineProdBaseExt::ReturnType
std::shared_ptr< L1TriggerKeyExt > ReturnType
Definition:
L1ObjectKeysOnlineProdBaseExt.h:24
edm::ESProducer::setWhatProduced
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition:
ESProducer.h:115
edm::es
Definition:
es_Label.h:33
L1TriggerKeyExtRcd
Definition:
L1TriggerKeyExtRcd.h:8
edm::ESHandle
Definition:
DTSurvey.h:22
edm::eventsetup::EventSetupRecord::get
void get(HolderT &iHolder) const
Definition:
EventSetupRecord.h:93
l1t::DataAlreadyPresentException
Definition:
Exception.h:32
L1ObjectKeysOnlineProdBaseExt::L1ObjectKeysOnlineProdBaseExt
L1ObjectKeysOnlineProdBaseExt(const edm::ParameterSet &)
Definition:
L1ObjectKeysOnlineProdBaseExt.cc:7
L1ObjectKeysOnlineProdBaseExt::~L1ObjectKeysOnlineProdBaseExt
~L1ObjectKeysOnlineProdBaseExt()
Definition:
L1ObjectKeysOnlineProdBaseExt.cc:25
L1ObjectKeysOnlineProdBaseExt.h
edm::ParameterSet
Definition:
ParameterSet.h:36
Generated for CMSSW Reference Manual by
1.8.11