Main Page
Namespaces
Classes
Package Documentation
CondTools
RPC
plugins
RPCInverseOMTFLinkMapESProducer.cc
Go to the documentation of this file.
1
#include "
CondTools/RPC/plugins/RPCInverseOMTFLinkMapESProducer.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/RPCOMTFLinkMapRcd.h
"
10
#include "
CondFormats/DataRecord/interface/RPCInverseOMTFLinkMapRcd.h
"
11
12
RPCInverseOMTFLinkMapESProducer::RPCInverseOMTFLinkMapESProducer
(
edm::ParameterSet
const
& _config)
13
: inverse_linkmap_(new
RPCInverseAMCLinkMap
())
14
{
15
setWhatProduced
(
this
,
edm::eventsetup::dependsOn
(&
RPCInverseOMTFLinkMapESProducer::RPCOMTFLinkMapCallback
));
16
}
17
18
void
RPCInverseOMTFLinkMapESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& _descs)
19
{
20
edm::ParameterSetDescription
_desc;
21
_descs.
add
(
"RPCInverseOMTFLinkMapESProducer"
, _desc);
22
}
23
24
void
RPCInverseOMTFLinkMapESProducer::RPCOMTFLinkMapCallback
(
RPCOMTFLinkMapRcd
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
32
RPCAMCLinkMap
const
& _map = *(_es_map.
product
());
33
for
(
auto
const
& _link : _map.
getMap
()) {
34
_inverse_map.insert(
RPCInverseAMCLinkMap::map_type::value_type
(_link.second, _link.first));
35
}
36
}
37
38
std::shared_ptr<RPCInverseAMCLinkMap>
RPCInverseOMTFLinkMapESProducer::produce
(
RPCInverseOMTFLinkMapRcd
const
& _rcd)
39
{
40
return
inverse_linkmap_
;
41
}
42
43
//define this as a module
44
#include "
FWCore/Framework/interface/ModuleFactory.h
"
45
DEFINE_FWK_EVENTSETUP_MODULE
(
RPCInverseOMTFLinkMapESProducer
);
RPCOMTFLinkMapRcd
Definition:
RPCOMTFLinkMapRcd.h:6
edm::eventsetup::dependsOn
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
Definition:
eventsetup_dependsOn.h:190
RPCInverseOMTFLinkMapESProducer.h
RPCAMCLinkMap.h
edm::ESProducer::setWhatProduced
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition:
ESProducer.h:115
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:50
RPCInverseOMTFLinkMapESProducer::inverse_linkmap_
std::shared_ptr< RPCInverseAMCLinkMap > inverse_linkmap_
Definition:
RPCInverseOMTFLinkMapESProducer.h:31
ParameterSet.h
RPCInverseOMTFLinkMapRcd.h
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
ParameterSetDescription.h
RPCInverseOMTFLinkMapESProducer::RPCOMTFLinkMapCallback
void RPCOMTFLinkMapCallback(RPCOMTFLinkMapRcd const &_rcd)
Definition:
RPCInverseOMTFLinkMapESProducer.cc:24
RPCOMTFLinkMapRcd.h
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
ESHandle.h
RPCInverseOMTFLinkMapRcd
Definition:
RPCInverseOMTFLinkMapRcd.h:9
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:65
RPCInverseOMTFLinkMapESProducer
Definition:
RPCInverseOMTFLinkMapESProducer.h:18
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
ConfigurationDescriptions.h
RPCInverseOMTFLinkMapESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &_descs)
Definition:
RPCInverseOMTFLinkMapESProducer.cc:18
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:27
RPCInverseOMTFLinkMapESProducer::produce
std::shared_ptr< RPCInverseAMCLinkMap > produce(RPCInverseOMTFLinkMapRcd const &_rcd)
Definition:
RPCInverseOMTFLinkMapESProducer.cc:38
RPCInverseOMTFLinkMapESProducer::RPCInverseOMTFLinkMapESProducer
RPCInverseOMTFLinkMapESProducer(edm::ParameterSet const &_config)
Definition:
RPCInverseOMTFLinkMapESProducer.cc:12
Generated for CMSSW Reference Manual by
1.8.11