Main Page
Namespaces
Classes
Package Documentation
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
23
PVSSIDReader::PVSSIDReader
(
const
edm::ParameterSet
& iConfig ){}
24
25
PVSSIDReader::~PVSSIDReader
(){}
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
49
DEFINE_FWK_MODULE
(
PVSSIDReader
);
50
RPCObPVSSmap::ObIDMap_rpc
std::vector< Item > ObIDMap_rpc
Definition:
RPCObPVSSmap.h:34
RPCDetId.h
Event.h
MakerMacros.h
EventSetup.h
RPCDBSimSetUp.h
PVSSIDReader::~PVSSIDReader
~PVSSIDReader() override
Definition:
PVSSIDReader.cc:25
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
PVSSIDReader::PVSSIDReader
PVSSIDReader(const edm::ParameterSet &iConfig)
Definition:
PVSSIDReader.cc:23
RPCObPVSSmapRcd.h
PVSSIDReader
Definition:
PVSSIDReader.cc:15
edm::ESHandle
Definition:
DTSurvey.h:22
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:57
edm::EDAnalyzer
Definition:
EDAnalyzer.h:29
EDAnalyzer.h
RPCObPVSSmap
Definition:
RPCObPVSSmap.h:17
edm::LogInfo
Definition:
MessageLogger.h:254
RPCObPVSSmap.h
RPCObPVSSmapRcd
Definition:
RPCObPVSSmapRcd.h:24
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:71
edm::ParameterSet
Definition:
ParameterSet.h:36
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
edm::Event
Definition:
Event.h:71
PVSSIDReader::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition:
PVSSIDReader.cc:27
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
Generated for CMSSW Reference Manual by
1.8.11