L1TriggerConfig
RPCTriggerConfig
src
RPCTriggerHsbConfig.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: RPCTriggerHsbConfig
4
// Class: RPCTriggerHsbConfig
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/L1RPCHsbConfigRcd.h
"
29
#include "
CondFormats/L1TObjects/interface/L1RPCHsbConfig.h
"
30
31
//
32
// class decleration
33
//
34
35
class
RPCTriggerHsbConfig
:
public
edm::ESProducer
{
36
public
:
37
RPCTriggerHsbConfig
(
const
edm::ParameterSet
&);
38
~RPCTriggerHsbConfig
()
override
;
39
40
typedef
std::unique_ptr<L1RPCHsbConfig>
ReturnType
;
41
42
ReturnType
produce
(
const
L1RPCHsbConfigRcd
&);
43
44
private
:
45
std::vector<int>
m_hsb0
;
46
std::vector<int>
m_hsb1
;
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
RPCTriggerHsbConfig::RPCTriggerHsbConfig
(
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_hsb0
= iConfig.
getParameter
<std::vector<int> >(
"hsb0Mask"
);
66
m_hsb1
= iConfig.
getParameter
<std::vector<int> >(
"hsb1Mask"
);
67
68
if
(
m_hsb0
.size() != 8 ||
m_hsb1
.size() != 8)
69
throw
cms::Exception
(
"BadConfig"
) <<
" hsbMask needs to be 8 digits long \n"
;
70
71
// contents of the vector wont be checked here - there are also different sources of this cfg
72
}
73
74
RPCTriggerHsbConfig::~RPCTriggerHsbConfig
() {}
75
76
//
77
// member functions
78
//
79
80
// ------------ method called to produce the data ------------
81
RPCTriggerHsbConfig::ReturnType
RPCTriggerHsbConfig::produce
(
const
L1RPCHsbConfigRcd
& iRecord) {
82
auto
pRPCTriggerHsbConfig = std::make_unique<L1RPCHsbConfig>();
83
84
pRPCTriggerHsbConfig->setHsbMask(0,
m_hsb0
);
85
pRPCTriggerHsbConfig->setHsbMask(1,
m_hsb1
);
86
87
return
pRPCTriggerHsbConfig;
88
}
89
90
//define this as a plug-in
91
DEFINE_FWK_EVENTSETUP_MODULE
(
RPCTriggerHsbConfig
);
L1RPCHsbConfigRcd
Definition:
L1RPCHsbConfigRcd.h:23
ESHandle.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
ESProducer.h
RPCTriggerHsbConfig::RPCTriggerHsbConfig
RPCTriggerHsbConfig(const edm::ParameterSet &)
Definition:
RPCTriggerHsbConfig.cc:60
L1RPCHsbConfigRcd.h
RPCTriggerHsbConfig::m_hsb0
std::vector< int > m_hsb0
Definition:
RPCTriggerHsbConfig.cc:45
edm::ParameterSet
Definition:
ParameterSet.h:47
RPCTriggerHsbConfig
Definition:
RPCTriggerHsbConfig.cc:35
RPCTriggerHsbConfig::m_hsb1
std::vector< int > m_hsb1
Definition:
RPCTriggerHsbConfig.cc:46
RPCTriggerHsbConfig::produce
ReturnType produce(const L1RPCHsbConfigRcd &)
Definition:
RPCTriggerHsbConfig.cc:81
ModuleFactory.h
RPCTriggerHsbConfig::ReturnType
std::unique_ptr< L1RPCHsbConfig > ReturnType
Definition:
RPCTriggerHsbConfig.cc:40
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::ESProducer
Definition:
ESProducer.h:104
cms::Exception
Definition:
Exception.h:70
L1RPCHsbConfig.h
RPCTriggerHsbConfig::~RPCTriggerHsbConfig
~RPCTriggerHsbConfig() override
Definition:
RPCTriggerHsbConfig.cc:74
Generated for CMSSW Reference Manual by
1.8.16