CMS 3D CMS Logo

RPCInverseOMTFLinkMapESProducer.cc
Go to the documentation of this file.
2 
7 
11 
13  : inverse_linkmap_(new RPCInverseAMCLinkMap())
14 {
16 }
17 
19 {
21  _descs.add("RPCInverseOMTFLinkMapESProducer", _desc);
22 }
23 
25 {
26  RPCInverseAMCLinkMap::map_type & _inverse_map(inverse_linkmap_->getMap());
27  _inverse_map.clear();
28 
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
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::shared_ptr< RPCInverseAMCLinkMap > inverse_linkmap_
void RPCOMTFLinkMapCallback(RPCOMTFLinkMapRcd const &_rcd)
std::multimap< RPCLBLink, RPCAMCLink > map_type
void get(HolderT &iHolder) const
map_type & getMap()
Definition: RPCAMCLinkMap.h:28
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &_descs)
T const * product() const
Definition: ESHandle.h:86
std::shared_ptr< RPCInverseAMCLinkMap > produce(RPCInverseOMTFLinkMapRcd const &_rcd)
RPCInverseOMTFLinkMapESProducer(edm::ParameterSet const &_config)