L1TriggerConfig
RPCTriggerConfig
src
RPCTriggerBxOrConfig.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: RPCTriggerBxOrConfig
4
// Class: RPCTriggerBxOrConfig
5
//
13
//
14
// Original Author: Tomasz Maciej Frueboes
15
// Created: Wed Apr 9 13:57:29 CEST 2008
16
//
17
//
18
19
// system include files
20
#include <memory>
21
22
// user include files
23
#include "
FWCore/Framework/interface/ModuleFactory.h
"
24
#include "
FWCore/Framework/interface/ESProducer.h
"
25
26
#include "
FWCore/Framework/interface/ESHandle.h
"
27
28
#include "
CondFormats/DataRecord/interface/L1RPCBxOrConfigRcd.h
"
29
#include "
CondFormats/L1TObjects/interface/L1RPCBxOrConfig.h
"
30
31
//
32
// class decleration
33
//
34
35
class
RPCTriggerBxOrConfig
:
public
edm::ESProducer
{
36
public
:
37
RPCTriggerBxOrConfig
(
const
edm::ParameterSet
&);
38
~RPCTriggerBxOrConfig
()
override
;
39
40
typedef
std::unique_ptr<L1RPCBxOrConfig>
ReturnType
;
41
42
ReturnType
produce
(
const
L1RPCBxOrConfigRcd
&);
43
44
private
:
45
int
m_firstBX
;
46
int
m_lastBX
;
47
};
48
49
//
50
// constants, enums and typedefs
51
//
52
53
//
54
// static data member definitions
55
//
56
57
//
58
// constructors and destructor
59
//
60
RPCTriggerBxOrConfig::RPCTriggerBxOrConfig
(
const
edm::ParameterSet
& iConfig) {
61
//the following line is needed to tell the framework what
62
// data is being produced
63
setWhatProduced
(
this
);
64
65
m_firstBX
= iConfig.
getParameter
<
int
>(
"firstBX"
);
66
m_lastBX
= iConfig.
getParameter
<
int
>(
"lastBX"
);
67
}
68
69
RPCTriggerBxOrConfig::~RPCTriggerBxOrConfig
() {}
70
71
//
72
// member functions
73
//
74
75
// ------------ method called to produce the data ------------
76
RPCTriggerBxOrConfig::ReturnType
RPCTriggerBxOrConfig::produce
(
const
L1RPCBxOrConfigRcd
& iRecord) {
77
auto
pRPCTriggerBxOrConfig = std::make_unique<L1RPCBxOrConfig>();
78
79
if
(
m_firstBX
>
m_lastBX
)
80
throw
cms::Exception
(
"BadConfig"
) <<
" firstBX < m_lastBX "
81
<<
"\n"
;
82
83
pRPCTriggerBxOrConfig->setFirstBX(
m_firstBX
);
84
pRPCTriggerBxOrConfig->setLastBX(
m_lastBX
);
85
86
return
pRPCTriggerBxOrConfig;
87
}
88
89
//define this as a plug-in
90
DEFINE_FWK_EVENTSETUP_MODULE
(
RPCTriggerBxOrConfig
);
L1RPCBxOrConfig.h
ESHandle.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
ESProducer.h
RPCTriggerBxOrConfig::RPCTriggerBxOrConfig
RPCTriggerBxOrConfig(const edm::ParameterSet &)
Definition:
RPCTriggerBxOrConfig.cc:60
RPCTriggerBxOrConfig
Definition:
RPCTriggerBxOrConfig.cc:35
L1RPCBxOrConfigRcd.h
RPCTriggerBxOrConfig::~RPCTriggerBxOrConfig
~RPCTriggerBxOrConfig() override
Definition:
RPCTriggerBxOrConfig.cc:69
edm::ParameterSet
Definition:
ParameterSet.h:47
L1RPCBxOrConfigRcd
Definition:
L1RPCBxOrConfigRcd.h:23
RPCTriggerBxOrConfig::m_lastBX
int m_lastBX
Definition:
RPCTriggerBxOrConfig.cc:46
ModuleFactory.h
RPCTriggerBxOrConfig::produce
ReturnType produce(const L1RPCBxOrConfigRcd &)
Definition:
RPCTriggerBxOrConfig.cc:76
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
Exception
Definition:
hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::ESProducer
Definition:
ESProducer.h:104
RPCTriggerBxOrConfig::ReturnType
std::unique_ptr< L1RPCBxOrConfig > ReturnType
Definition:
RPCTriggerBxOrConfig.cc:40
RPCTriggerBxOrConfig::m_firstBX
int m_firstBX
Definition:
RPCTriggerBxOrConfig.cc:45
Generated for CMSSW Reference Manual by
1.8.16