L1TriggerConfig
L1TConfigProducers
src
L1TMuonOverlapParamsOnlineProd.cc
Go to the documentation of this file.
1
#include <iostream>
2
#include <fstream>
3
#include <stdexcept>
4
5
#include "
CondTools/L1TriggerExt/interface/L1ConfigOnlineProdBaseExt.h
"
6
#include "
CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h
"
7
#include "
CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h
"
8
#include "
CondFormats/DataRecord/interface/L1TMuonOverlapParamsO2ORcd.h
"
9
10
class
L1TMuonOverlapParamsOnlineProd
11
:
public
L1ConfigOnlineProdBaseExt
<L1TMuonOverlapParamsO2ORcd, L1TMuonOverlapParams> {
12
private
:
13
bool
transactionSafe
;
14
15
public
:
16
std::unique_ptr<const L1TMuonOverlapParams>
newObject
(
const
std::string
& objectKey,
17
const
L1TMuonOverlapParamsO2ORcd
&
record
)
override
;
18
19
L1TMuonOverlapParamsOnlineProd
(
const
edm::ParameterSet
&);
20
~L1TMuonOverlapParamsOnlineProd
(
void
)
override
{}
21
};
22
23
L1TMuonOverlapParamsOnlineProd::L1TMuonOverlapParamsOnlineProd
(
const
edm::ParameterSet
& iConfig)
24
:
L1ConfigOnlineProdBaseExt
<
L1TMuonOverlapParamsO2ORcd
,
L1TMuonOverlapParams
>(iConfig) {
25
wrappedSetWhatProduced
(iConfig);
26
transactionSafe
= iConfig.
getParameter
<
bool
>(
"transactionSafe"
);
27
}
28
29
std::unique_ptr<const L1TMuonOverlapParams>
L1TMuonOverlapParamsOnlineProd::newObject
(
30
const
std::string
& objectKey,
const
L1TMuonOverlapParamsO2ORcd
&
record
) {
31
edm::LogError
(
"L1-O2O"
) <<
"L1TMuonOverlapParams object with key "
<< objectKey <<
" not in ORCON!"
;
32
33
if
(
transactionSafe
)
34
throw
std::runtime_error(
35
"SummaryForFunctionManager: OMTF | Faulty | You are never supposed to get OMTF online producer running!"
);
36
37
auto
retval = std::make_unique<const L1TMuonOverlapParams>();
38
39
edm::LogError
(
"L1-O2O: L1TMuonOverlapParamsOnlineProd"
)
40
<<
"SummaryForFunctionManager: OMTF | Faulty | You are never supposed to get OMTF online producer running; "
41
"returning empty L1TMuonOverlapParams"
;
42
return
retval;
43
}
44
45
//define this as a plug-in
46
DEFINE_FWK_EVENTSETUP_MODULE
(
L1TMuonOverlapParamsOnlineProd
);
L1TMuonOverlapParamsOnlineProd::L1TMuonOverlapParamsOnlineProd
L1TMuonOverlapParamsOnlineProd(const edm::ParameterSet &)
Definition:
L1TMuonOverlapParamsOnlineProd.cc:23
L1TMuonOverlapParamsOnlineProd::~L1TMuonOverlapParamsOnlineProd
~L1TMuonOverlapParamsOnlineProd(void) override
Definition:
L1TMuonOverlapParamsOnlineProd.cc:20
L1TMuonOverlapParamsO2ORcd
Definition:
L1TMuonOverlapParamsO2ORcd.h:25
L1TMuonOverlapParamsOnlineProd
Definition:
L1TMuonOverlapParamsOnlineProd.cc:10
GlobalPosition_Frontier_DevDB_cff.record
record
Definition:
GlobalPosition_Frontier_DevDB_cff.py:10
L1ConfigOnlineProdBaseExt.h
L1ConfigOnlineProdBaseExt
Definition:
L1ConfigOnlineProdBaseExt.h:32
L1TMuonOverlapParams
Definition:
L1TMuonOverlapParams.h:14
L1TMuonOverlapParams.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
L1TMuonOverlapParamsO2ORcd.h
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:123
L1TMuonOverlapParamsOnlineProd::transactionSafe
bool transactionSafe
Definition:
L1TMuonOverlapParamsOnlineProd.cc:13
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
L1TMuonOverlapParamsOnlineProd::newObject
std::unique_ptr< const L1TMuonOverlapParams > newObject(const std::string &objectKey, const L1TMuonOverlapParamsO2ORcd &record) override
Definition:
L1TMuonOverlapParamsOnlineProd.cc:29
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
L1TMuonOverlapParamsRcd.h
L1ConfigOnlineProdBaseExt< L1TMuonOverlapParamsO2ORcd, L1TMuonOverlapParams >::wrappedSetWhatProduced
edm::ESConsumesCollectorT< L1TMuonOverlapParamsO2ORcd > wrappedSetWhatProduced(const edm::ParameterSet &)
Definition:
L1ConfigOnlineProdBaseExt.h:93
Generated for CMSSW Reference Manual by
1.8.16