CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PVSSIDReader.cc
Go to the documentation of this file.
1 #include <string>
2 #include <map>
3 #include <vector>
4 
13 
15 public:
17  ~PVSSIDReader() override;
18  void analyze(const edm::Event& evt, const edm::EventSetup& evtSetup) override;
19 
20 private:
22 };
23 
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
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
~PVSSIDReader() override
Definition: PVSSIDReader.cc:26
bool getData(T &iHolder) const
Definition: EventSetup.h:128
PVSSIDReader(const edm::ParameterSet &iConfig)
Definition: PVSSIDReader.cc:24
Log< level::Info, false > LogInfo
edm::ESGetToken< RPCObPVSSmap, RPCObPVSSmapRcd > pvssmap_token_
Definition: PVSSIDReader.cc:21
tuple cout
Definition: gather_cfg.py:144
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition: PVSSIDReader.cc:28
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283