test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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();
19  void analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) override;
20 };
21 
22 
24 
26 
27 void PVSSIDReader::analyze(const edm::Event& evt, const edm::EventSetup& evtSetup)
28 {
29  edm::ESHandle<RPCObPVSSmap> pvssmapRcd;
30  evtSetup.get<RPCObPVSSmapRcd>().get(pvssmapRcd);
31  edm::LogInfo("PVSSIDReader") << "[PVSSIDReader::analyze] End Reading Pvssmap" << std::endl;
32 
33 
34  const RPCObPVSSmap* pvssmap = pvssmapRcd.product();
35  std::vector<RPCObPVSSmap::Item> mypvssmap = pvssmap->ObIDMap_rpc;
36  std::vector<RPCObPVSSmap::Item>::iterator ipvssmap;
37 
38  std::cout << "************************************" << std::endl;
39  for(ipvssmap = mypvssmap.begin(); ipvssmap < mypvssmap.end(); ++ipvssmap){
40  std::cout<<"dpid = " << ipvssmap->dpid << " region = " << ipvssmap->region
41  << " ring = " << ipvssmap->ring << " sector = " << ipvssmap->sector
42  << " station = " << ipvssmap->station << " layer = " << ipvssmap->layer
43  << " subsector = " << ipvssmap->subsector << " suptype = " << ipvssmap->suptype << std::endl;
44  }
45 
46 }
47 
48 //define this as a plug-in
50 
std::vector< Item > ObIDMap_rpc
Definition: RPCObPVSSmap.h:34
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
PVSSIDReader(const edm::ParameterSet &iConfig)
Definition: PVSSIDReader.cc:23
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
tuple cout
Definition: gather_cfg.py:145
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition: PVSSIDReader.cc:27