CondTools
SiStrip
plugins
SiStripCablingTrackerMap.cc
Go to the documentation of this file.
1
#include "
CondTools/SiStrip/plugins/SiStripCablingTrackerMap.h
"
2
#include "
CommonTools/TrackerMap/interface/TrackerMap.h
"
3
4
#include <sstream>
5
6
SiStripCablingTrackerMap::SiStripCablingTrackerMap
(
edm::ParameterSet
const
& conf) : conf_(conf) {}
7
8
SiStripCablingTrackerMap::~SiStripCablingTrackerMap
() {}
9
10
void
SiStripCablingTrackerMap::beginRun
(
const
edm::Run
&
run
,
const
edm::EventSetup
& es) {
11
es.
get
<
SiStripDetCablingRcd
>().
get
(
SiStripDetCabling_
);
12
tkMap_detCab
=
new
TrackerMap
(
"DetCabling"
);
13
}
14
15
//------------------------------------------------------------------------------------------
16
17
void
SiStripCablingTrackerMap::endJob
() {
18
tkMap_detCab
->
save
(
true
, 0, 0,
"DetCabling.png"
);
19
tkMap_detCab
->
print
(
true
, 0, 0,
"DetCabling"
);
20
}
21
//------------------------------------------------------------------------------------------
22
23
void
SiStripCablingTrackerMap::analyze
(
const
edm::Event
&
e
,
const
edm::EventSetup
& es) {
24
es.
get
<
SiStripDetCablingRcd
>().
get
(
SiStripDetCabling_
);
25
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
26
// get list of active detectors from SiStripDetCabling
27
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
28
std::vector<uint32_t> vdetId_;
29
SiStripDetCabling_
->
addActiveDetectorsRawIds
(vdetId_);
30
for
(std::vector<uint32_t>::const_iterator detid_iter = vdetId_.begin(); detid_iter != vdetId_.end(); detid_iter++) {
31
uint32_t detid = *detid_iter;
32
tkMap_detCab
->
fill
(detid, 1);
33
}
34
}
SiStripDetCabling::addActiveDetectorsRawIds
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
Definition:
SiStripDetCabling.cc:134
SiStripCablingTrackerMap::SiStripCablingTrackerMap
SiStripCablingTrackerMap(const edm::ParameterSet &conf)
Definition:
SiStripCablingTrackerMap.cc:6
SiStripCablingTrackerMap::endJob
void endJob() override
Definition:
SiStripCablingTrackerMap.cc:17
edm::Run
Definition:
Run.h:45
SiStripCablingTrackerMap.h
TrackerMap::fill
void fill(int layer, int ring, int nmod, float x)
Definition:
TrackerMap.cc:3288
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
TrackerMap
Definition:
TrackerMap.h:76
SiStripDetCablingRcd
Definition:
SiStripDependentRecords.h:19
TrackerMap::print
void print(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap")
Definition:
TrackerMap.cc:2942
SiStripCablingTrackerMap::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
Definition:
SiStripCablingTrackerMap.cc:10
edm::ParameterSet
Definition:
ParameterSet.h:36
SiStripCablingTrackerMap::SiStripDetCabling_
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
Definition:
SiStripCablingTrackerMap.h:29
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
TrackerMap.h
TrackerMap::save
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
Definition:
TrackerMap.cc:810
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
edm::Event
Definition:
Event.h:73
SiStripCablingTrackerMap::~SiStripCablingTrackerMap
~SiStripCablingTrackerMap() override
Definition:
SiStripCablingTrackerMap.cc:8
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
SiStripCablingTrackerMap::tkMap_detCab
TrackerMap * tkMap_detCab
Definition:
SiStripCablingTrackerMap.h:31
SiStripCablingTrackerMap::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition:
SiStripCablingTrackerMap.cc:23
Generated for CMSSW Reference Manual by
1.8.16