CMS 3D CMS Logo

RPCInverseLBLinkMapESProducer.cc
Go to the documentation of this file.
2 
7 
11 
13 
15  setWhatProduced(this);
16 }
17 
20  _descs.add("RPCInverseLBLinkMapESProducer", _desc);
21 }
22 
24  RPCInverseLBLinkMap* inverse_linkmap) {
25  RPCInverseLBLinkMap::map_type& _inverse_map(inverse_linkmap->getMap());
26  _inverse_map.clear();
27 
29  _rcd.get(_es_map);
30  RPCLBLinkMap const& _map = *(_es_map.product());
31  for (auto const& _link : _map.getMap()) {
32  _inverse_map.insert(RPCInverseLBLinkMap::map_type::value_type(_link.second.getRPCDetId().rawId(), _link));
33  }
34 }
35 
36 std::shared_ptr<RPCInverseLBLinkMap> RPCInverseLBLinkMapESProducer::produce(RPCInverseLBLinkMapRcd const& _rcd) {
37  auto host = holder_.makeOrGet([]() { return new HostType; });
38 
39  host->ifRecordChanges<RPCLBLinkMapRcd>(_rcd, [this, h = host.get()](auto const& rec) { setupRPCLBLinkMap(rec, h); });
40 
41  return host;
42 }
43 
44 //define this as a module
ConfigurationDescriptions.h
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
RPCInverseLBLinkMapESProducer
Definition: RPCInverseLBLinkMapESProducer.h:20
RPCInverseLBLinkMapESProducer::RPCInverseLBLinkMapESProducer
RPCInverseLBLinkMapESProducer(edm::ParameterSet const &_config)
Definition: RPCInverseLBLinkMapESProducer.cc:14
ESHandle.h
RPCInverseLBLinkMap
Definition: RPCInverseLBLinkMap.h:11
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
RPCLBLinkMap::getMap
map_type & getMap()
Definition: RPCLBLinkMap.h:27
query.host
string host
Definition: query.py:115
edm::ReusableObjectHolder::makeOrGet
std::shared_ptr< T > makeOrGet(F iFunc)
If there isn't an object already available, creates a new one using iFunc.
Definition: ReusableObjectHolder.h:126
RPCLBLinkMap.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
RPCInverseLBLinkMapRcd.h
edm::ESHandle< RPCLBLinkMap >
RPCInverseLBLinkMapESProducer.h
h
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
RPCDetId.h
edm::ParameterSet
Definition: ParameterSet.h:47
RPCInverseLBLinkMapESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &_descs)
Definition: RPCInverseLBLinkMapESProducer.cc:18
RPCInverseLBLinkMapESProducer::produce
std::shared_ptr< RPCInverseLBLinkMap > produce(RPCInverseLBLinkMapRcd const &_rcd)
Definition: RPCInverseLBLinkMapESProducer.cc:36
RPCInverseLBLinkMapESProducer::setupRPCLBLinkMap
void setupRPCLBLinkMap(RPCLBLinkMapRcd const &, RPCInverseLBLinkMap *)
Definition: RPCInverseLBLinkMapESProducer.cc:23
RPCLBLinkMap
Definition: RPCLBLinkMap.h:11
RPCInverseLBLinkMapRcd
Definition: RPCInverseLBLinkMapRcd.h:9
RPCLBLinkMapRcd
Definition: RPCLBLinkMapRcd.h:6
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
RPCInverseLBLinkMap::getMap
map_type & getMap()
Definition: RPCInverseLBLinkMap.h:25
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
RPCInverseLBLinkMapESProducer::HostType
edm::ESProductHost< RPCInverseLBLinkMap, RPCLBLinkMapRcd > HostType
Definition: RPCInverseLBLinkMapESProducer.h:29
RPCInverseLBLinkMap::map_type
std::multimap< std::uint32_t, std::pair< RPCLBLink, RPCFebConnector > > map_type
Definition: RPCInverseLBLinkMap.h:13
RPCInverseLBLinkMapESProducer::holder_
edm::ReusableObjectHolder< HostType > holder_
Definition: RPCInverseLBLinkMapESProducer.h:33
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
ParameterSet.h
RPCLBLinkMapRcd.h