CondTools
RPC
plugins
PVSSIDReader.cc
Go to the documentation of this file.
1
#include <string>
2
#include <map>
3
#include <vector>
4
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
7
#include "
FWCore/Framework/interface/MakerMacros.h
"
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/ESHandle.h
"
10
#include "
CondTools/RPC/interface/RPCDBSimSetUp.h
"
11
#include "
DataFormats/MuonDetId/interface/RPCDetId.h
"
12
#include "
CondFormats/RPCObjects/interface/RPCObPVSSmap.h
"
13
#include "
CondFormats/DataRecord/interface/RPCObPVSSmapRcd.h
"
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
22
PVSSIDReader::PVSSIDReader
(
const
edm::ParameterSet
& iConfig) {}
23
24
PVSSIDReader::~PVSSIDReader
() {}
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
45
DEFINE_FWK_MODULE
(
PVSSIDReader
);
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
RPCObPVSSmapRcd.h
ESHandle.h
RPCDBSimSetUp.h
RPCObPVSSmap.h
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
PVSSIDReader::PVSSIDReader
PVSSIDReader(const edm::ParameterSet &iConfig)
Definition:
PVSSIDReader.cc:22
EDAnalyzer.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
edm::EDAnalyzer
Definition:
EDAnalyzer.h:28
PVSSIDReader
Definition:
PVSSIDReader.cc:15
PVSSIDReader::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition:
PVSSIDReader.cc:26
MakerMacros.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ESHandle
Definition:
DTSurvey.h:22
RPCDetId.h
PVSSIDReader::~PVSSIDReader
~PVSSIDReader() override
Definition:
PVSSIDReader.cc:24
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
RPCObPVSSmap
Definition:
RPCObPVSSmap.h:16
RPCObPVSSmapRcd
Definition:
RPCObPVSSmapRcd.h:24
RPCObPVSSmap::ObIDMap_rpc
std::vector< Item > ObIDMap_rpc
Definition:
RPCObPVSSmap.h:33
EventSetup.h
edm::Event
Definition:
Event.h:73
Generated for CMSSW Reference Manual by
1.8.16