CMS 3D CMS Logo

PVSSIDReader.cc
Go to the documentation of this file.
1 #include <string>
2 #include <map>
3 #include <vector>
4 
14 
15 class PVSSIDReader : public edm::EDAnalyzer {
16 public:
17  PVSSIDReader(const edm::ParameterSet& iConfig);
18  ~PVSSIDReader() override;
19  void analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) override;
20 };
21 
23 
25 
26 void PVSSIDReader::analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) {
27  edm::ESHandle<RPCObPVSSmap> pvssmapRcd;
28  evtSetup.get<RPCObPVSSmapRcd>().get(pvssmapRcd);
29  edm::LogInfo("PVSSIDReader") << "[PVSSIDReader::analyze] End Reading Pvssmap" << std::endl;
30 
31  const RPCObPVSSmap* pvssmap = pvssmapRcd.product();
32  std::vector<RPCObPVSSmap::Item> mypvssmap = pvssmap->ObIDMap_rpc;
33  std::vector<RPCObPVSSmap::Item>::iterator ipvssmap;
34 
35  std::cout << "************************************" << std::endl;
36  for (ipvssmap = mypvssmap.begin(); ipvssmap < mypvssmap.end(); ++ipvssmap) {
37  std::cout << "dpid = " << ipvssmap->dpid << " region = " << ipvssmap->region << " ring = " << ipvssmap->ring
38  << " sector = " << ipvssmap->sector << " station = " << ipvssmap->station
39  << " layer = " << ipvssmap->layer << " subsector = " << ipvssmap->subsector
40  << " suptype = " << ipvssmap->suptype << std::endl;
41  }
42 }
43 
44 //define this as a plug-in
std::vector< Item > ObIDMap_rpc
Definition: RPCObPVSSmap.h:33
~PVSSIDReader() override
Definition: PVSSIDReader.cc:24
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
PVSSIDReader(const edm::ParameterSet &iConfig)
Definition: PVSSIDReader.cc:22
T get() const
Definition: EventSetup.h:73
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition: PVSSIDReader.cc:26
T const * product() const
Definition: ESHandle.h:86