CMS 3D CMS Logo

RPCInverseLBLinkMapESProducer.cc
Go to the documentation of this file.
2 
7 
11 
13 
15  : inverse_linkmap_(new RPCInverseLBLinkMap())
16 {
18 }
19 
21 {
23  _descs.add("RPCInverseLBLinkMapESProducer", _desc);
24 }
25 
27 {
28  RPCInverseLBLinkMap::map_type & _inverse_map(inverse_linkmap_->getMap());
29  _inverse_map.clear();
30 
32  _rcd.get(_es_map);
33  RPCLBLinkMap const & _map = *(_es_map.product());
34  for (auto const & _link : _map.getMap()) {
35  _inverse_map.insert(RPCInverseLBLinkMap::map_type::value_type(_link.second.getRPCDetId().rawId(), _link));
36  }
37 }
38 
39 std::shared_ptr<RPCInverseLBLinkMap> RPCInverseLBLinkMapESProducer::produce(RPCInverseLBLinkMapRcd const & _rcd)
40 {
41  return inverse_linkmap_;
42 }
43 
44 //define this as a module
RPCInverseLBLinkMapESProducer(edm::ParameterSet const &_config)
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
void get(HolderT &iHolder) const
static void fillDescriptions(edm::ConfigurationDescriptions &_descs)
void RPCLBLinkMapCallback(RPCLBLinkMapRcd const &_rcd)
map_type & getMap()
Definition: RPCLBLinkMap.h:28
std::shared_ptr< RPCInverseLBLinkMap > inverse_linkmap_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::multimap< std::uint32_t, std::pair< RPCLBLink, RPCFebConnector > > map_type
std::shared_ptr< RPCInverseLBLinkMap > produce(RPCInverseLBLinkMapRcd const &_rcd)
T const * product() const
Definition: ESHandle.h:86