Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
();
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
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
MakerMacros.h
EventSetup.h
RPCDBSimSetUp.h
PVSSIDReader::~PVSSIDReader
~PVSSIDReader()
Definition:
PVSSIDReader.cc:25
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:44
edm::EDAnalyzer
Definition:
EDAnalyzer.h:25
EDAnalyzer.h
RPCObPVSSmap
Definition:
RPCObPVSSmap.h:17
edm::LogInfo
Definition:
MessageLogger.h:214
RPCObPVSSmap.h
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
RPCObPVSSmapRcd
Definition:
RPCObPVSSmapRcd.h:24
edm::ParameterSet
Definition:
ParameterSet.h:35
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
edm::Event
Definition:
Event.h:59
PVSSIDReader::analyze
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
Definition:
PVSSIDReader.cc:27
Generated for CMSSW Reference Manual by
1.8.5