Main Page
Namespaces
Classes
Package Documentation
CondTools
RPC
plugins
RPCInverseTwinMuxLinkMapESProducer.cc
Go to the documentation of this file.
1
#include "
CondTools/RPC/plugins/RPCInverseTwinMuxLinkMapESProducer.h
"
2
3
#include "
FWCore/Framework/interface/ESHandle.h
"
4
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
5
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
6
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
7
8
#include "
CondFormats/RPCObjects/interface/RPCAMCLinkMap.h
"
9
#include "
CondFormats/DataRecord/interface/RPCTwinMuxLinkMapRcd.h
"
10
#include "
CondFormats/DataRecord/interface/RPCInverseTwinMuxLinkMapRcd.h
"
11
12
RPCInverseTwinMuxLinkMapESProducer::RPCInverseTwinMuxLinkMapESProducer
(
edm::ParameterSet
const
& _config)
13
: inverse_linkmap_(new
RPCInverseAMCLinkMap
())
14
{
15
setWhatProduced
(
this
,
edm::eventsetup::dependsOn
(&
RPCInverseTwinMuxLinkMapESProducer::RPCTwinMuxLinkMapCallback
));
16
}
17
18
void
RPCInverseTwinMuxLinkMapESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& _descs)
19
{
20
edm::ParameterSetDescription
_desc;
21
_descs.
add
(
"RPCInverseTwinMuxLinkMapESProducer"
, _desc);
22
}
23
24
void
RPCInverseTwinMuxLinkMapESProducer::RPCTwinMuxLinkMapCallback
(
RPCTwinMuxLinkMapRcd
const
& _rcd)
25
{
26
RPCInverseAMCLinkMap::map_type
& _inverse_map(
inverse_linkmap_
->getMap());
27
_inverse_map.clear();
28
29
edm::ESHandle<RPCAMCLinkMap>
_es_map;
30
_rcd.
get
(_es_map);
31
RPCAMCLinkMap
const
& _map = *(_es_map.
product
());
32
for
(
auto
const
& _link : _map.
getMap
()) {
33
_inverse_map.insert(
RPCInverseAMCLinkMap::map_type::value_type
(_link.second, _link.first));
34
}
35
}
36
37
std::shared_ptr<RPCInverseAMCLinkMap>
RPCInverseTwinMuxLinkMapESProducer::produce
(
RPCInverseTwinMuxLinkMapRcd
const
& _rcd)
38
{
39
return
inverse_linkmap_
;
40
}
41
42
//define this as a module
43
#include "
FWCore/Framework/interface/ModuleFactory.h
"
44
DEFINE_FWK_EVENTSETUP_MODULE
(
RPCInverseTwinMuxLinkMapESProducer
);
edm::eventsetup::dependsOn
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
Definition:
eventsetup_dependsOn.h:190
RPCInverseTwinMuxLinkMapESProducer::produce
std::shared_ptr< RPCInverseAMCLinkMap > produce(RPCInverseTwinMuxLinkMapRcd const &_rcd)
Definition:
RPCInverseTwinMuxLinkMapESProducer.cc:37
RPCInverseTwinMuxLinkMapESProducer::RPCTwinMuxLinkMapCallback
void RPCTwinMuxLinkMapCallback(RPCTwinMuxLinkMapRcd const &_rcd)
Definition:
RPCInverseTwinMuxLinkMapESProducer.cc:24
RPCTwinMuxLinkMapRcd
Definition:
RPCTwinMuxLinkMapRcd.h:6
RPCInverseTwinMuxLinkMapESProducer::RPCInverseTwinMuxLinkMapESProducer
RPCInverseTwinMuxLinkMapESProducer(edm::ParameterSet const &_config)
Definition:
RPCInverseTwinMuxLinkMapESProducer.cc:12
RPCAMCLinkMap.h
RPCInverseTwinMuxLinkMapESProducer::inverse_linkmap_
std::shared_ptr< RPCInverseAMCLinkMap > inverse_linkmap_
Definition:
RPCInverseTwinMuxLinkMapESProducer.h:31
edm::ESProducer::setWhatProduced
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition:
ESProducer.h:115
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:50
ParameterSet.h
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
RPCTwinMuxLinkMapRcd.h
ParameterSetDescription.h
RPCInverseTwinMuxLinkMapRcd.h
RPCInverseTwinMuxLinkMapESProducer
Definition:
RPCInverseTwinMuxLinkMapESProducer.h:18
edm::ESHandle< RPCAMCLinkMap >
RPCInverseAMCLinkMap::map_type
std::multimap< RPCLBLink, RPCAMCLink > map_type
Definition:
RPCInverseAMCLinkMap.h:12
RPCInverseAMCLinkMap
Definition:
RPCInverseAMCLinkMap.h:9
edm::eventsetup::EventSetupRecord::get
void get(HolderT &iHolder) const
Definition:
EventSetupRecord.h:93
RPCAMCLinkMap::getMap
map_type & getMap()
Definition:
RPCAMCLinkMap.h:28
RPCInverseTwinMuxLinkMapESProducer.h
ESHandle.h
RPCAMCLinkMap
Definition:
RPCAMCLinkMap.h:11
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:63
RPCInverseTwinMuxLinkMapESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &_descs)
Definition:
RPCInverseTwinMuxLinkMapESProducer.cc:18
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
RPCInverseTwinMuxLinkMapRcd
Definition:
RPCInverseTwinMuxLinkMapRcd.h:9
ConfigurationDescriptions.h
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
Generated for CMSSW Reference Manual by
1.8.11