CMS 3D CMS Logo

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