CMS 3D CMS Logo

RPCInverseTwinMuxLinkMapESProducer.cc
Go to the documentation of this file.
2 
7 
11 
13  : inverse_linkmap_(new RPCInverseAMCLinkMap())
14 {
16 }
17 
19 {
21  _descs.add("RPCInverseTwinMuxLinkMapESProducer", _desc);
22 }
23 
25 {
26  RPCInverseAMCLinkMap::map_type & _inverse_map(inverse_linkmap_->getMap());
27  _inverse_map.clear();
28 
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
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
std::shared_ptr< RPCInverseAMCLinkMap > produce(RPCInverseTwinMuxLinkMapRcd const &_rcd)
void RPCTwinMuxLinkMapCallback(RPCTwinMuxLinkMapRcd const &_rcd)
RPCInverseTwinMuxLinkMapESProducer(edm::ParameterSet const &_config)
std::shared_ptr< RPCInverseAMCLinkMap > inverse_linkmap_
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
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