CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Types | Private Member Functions | Private Attributes
TkHistoMap Class Reference

#include <TkHistoMap.h>

Public Member Functions

void add (DetId detid, float value)
 
void dumpInTkMap (TrackerMap *tkmap, bool dumpEntries=false)
 
void fill (DetId detid, float value)
 
void fillFromAscii (const std::string &filename)
 
std::vector< MonitorElement * > & getAllMaps ()
 
const std::vector< MonitorElement * > & getAllMaps () const
 
DetId getDetId (const MonitorElement *ME, int ix, int iy)
 
DetId getDetId (const std::string &title, int ix, int iy)
 
DetId getDetId (int layer, int ix, int iy)
 
float getEntries (DetId detid)
 
std::string getLayerName (std::string title)
 
uint16_t getLayerNum (const std::string &layerName)
 
MonitorElementgetMap (short layerNumber)
 
float getValue (DetId detid)
 
void loadServices ()
 
void loadTkHistoMap (const std::string &path, const std::string &MapName, bool mechanicalView=false)
 
void save (const std::string &filename)
 
void saveAsCanvas (const std::string &filename, const std::string &options="", const std::string &mode="RECREATE")
 
void setBinContent (DetId detid, float value)
 
 TkHistoMap (const TkDetMap *tkDetMap)
 
 TkHistoMap (const TkDetMap *tkDetMap, const std::string &path, const std::string &MapName, float baseline, bool mechanicalView, bool isTH2F)
 
 TkHistoMap (const TkDetMap *tkDetMap, const std::string &path, const std::string &MapName, float baseline=0, bool mechanicalView=false)
 
 TkHistoMap (const TkDetMap *tkDetMap, DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline=0, bool mechanicalView=false)
 
 ~TkHistoMap ()
 

Protected Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
typedef std::vector< MonitorElement * > tkHistoMapVect
 

Private Member Functions

void createTkHistoMap (DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline, bool mechanicalView)
 
std::string folderDefinition (DQMStore::IBooker &ibooker, std::string folder, const std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
 
void load (const TkDetMap *tkDetMap, const std::string &path, float baseline, bool mechanicalView, bool isTH2F, bool createTkMap=true)
 

Private Attributes

DetId cached_detid
 
int16_t cached_layer
 
TkLayerMap::XYbin cached_XYbin
 
DQMStoredqmStore_ {nullptr}
 
int HistoNumber
 
bool isTH2F_
 
std::string MapName_
 
const TkDetMaptkdetmap_
 
std::vector< MonitorElement * > tkHistoMap_
 

Detailed Description

Definition at line 12 of file TkHistoMap.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 14 of file TkHistoMap.h.

◆ MonitorElement

Definition at line 15 of file TkHistoMap.h.

◆ tkHistoMapVect

typedef std::vector<MonitorElement*> TkHistoMap::tkHistoMapVect
protected

Definition at line 16 of file TkHistoMap.h.

Constructor & Destructor Documentation

◆ TkHistoMap() [1/4]

TkHistoMap::TkHistoMap ( const TkDetMap tkDetMap,
DQMStore::IBooker ibooker,
const std::string &  path,
const std::string &  MapName,
float  baseline = 0,
bool  mechanicalView = false 
)

Definition at line 35 of file TkHistoMap.cc.

41  : HistoNumber(35), MapName_(MapName) {
42  LogTrace("TkHistoMap") << "TkHistoMap::constructor with parameters";
43  load(tkDetMap, path, baseline, mechanicalView, false);
44  createTkHistoMap(ibooker, path, MapName_, baseline, mechanicalView);
45 }

References createTkHistoMap(), load(), LogTrace, MapName_, and castor_dqm_sourceclient_file_cfg::path.

◆ TkHistoMap() [2/4]

TkHistoMap::TkHistoMap ( const TkDetMap tkDetMap,
const std::string &  path,
const std::string &  MapName,
float  baseline = 0,
bool  mechanicalView = false 
)

Definition at line 11 of file TkHistoMap.cc.

13  : HistoNumber(35), MapName_(MapName) {
14  LogTrace("TkHistoMap") << "TkHistoMap::constructor with parameters";
15  load(tkDetMap, path, baseline, mechanicalView, false);
16  dqmStore_->meBookerGetter([this, &path, &baseline, mechanicalView](DQMStore::IBooker& ibooker, DQMStore::IGetter&) {
17  this->createTkHistoMap(ibooker, path, MapName_, baseline, mechanicalView);
18  });
19 }

References createTkHistoMap(), dqmStore_, load(), LogTrace, MapName_, dqm::implementation::DQMStore::meBookerGetter(), and castor_dqm_sourceclient_file_cfg::path.

◆ TkHistoMap() [3/4]

TkHistoMap::TkHistoMap ( const TkDetMap tkDetMap,
const std::string &  path,
const std::string &  MapName,
float  baseline,
bool  mechanicalView,
bool  isTH2F 
)

Definition at line 21 of file TkHistoMap.cc.

27  : HistoNumber(35), MapName_(MapName) {
28  LogTrace("TkHistoMap") << "TkHistoMap::constructor with parameters";
29  load(tkDetMap, path, baseline, mechanicalView, isTH2F);
30  dqmStore_->meBookerGetter([this, &path, &baseline, mechanicalView](DQMStore::IBooker& ibooker, DQMStore::IGetter&) {
31  this->createTkHistoMap(ibooker, path, MapName_, baseline, mechanicalView);
32  });
33 }

References createTkHistoMap(), dqmStore_, load(), LogTrace, MapName_, dqm::implementation::DQMStore::meBookerGetter(), and castor_dqm_sourceclient_file_cfg::path.

◆ TkHistoMap() [4/4]

TkHistoMap::TkHistoMap ( const TkDetMap tkDetMap)

Definition at line 6 of file TkHistoMap.cc.

6  : HistoNumber(35) {
7  LogTrace("TkHistoMap") << "TkHistoMap::constructor without parameters";
8  load(tkDetMap, "", 0.0f, false, false, false);
9 }

References f, load(), and LogTrace.

◆ ~TkHistoMap()

TkHistoMap::~TkHistoMap ( )
inline

Definition at line 37 of file TkHistoMap.h.

37 {};

Member Function Documentation

◆ add()

void TkHistoMap::add ( DetId  detid,
float  value 
)

Definition at line 232 of file TkHistoMap.cc.

232  {
233 #ifdef debug_TkHistoMap
234  LogTrace("TkHistoMap") << "[TkHistoMap::add]";
235 #endif
239  setBinContent(detid,
240  tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
241  tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix, xybin.iy)) +
242  value);
245  detid,
246  tkHistoMap_[layer]->getTH2F()->GetBinContent(tkHistoMap_[layer]->getTH2F()->GetBin(xybin.ix, xybin.iy)) +
247  value);
248 }

References cached_detid, cached_layer, cached_XYbin, TkDetMap::findLayer(), TkDetMap::getXY(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, CalibrationSummaryClient_cfi::kind, phase1PixelTopology::layer, LogTrace, setBinContent(), MonitorElementData::TH2F, tkdetmap_, tkHistoMap_, and MonitorElementData::TPROFILE2D.

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ createTkHistoMap()

void TkHistoMap::createTkHistoMap ( DQMStore::IBooker ibooker,
const std::string &  path,
const std::string &  MapName,
float  baseline,
bool  mechanicalView 
)
private

Definition at line 100 of file TkHistoMap.cc.

104  {
105  int nchX;
106  int nchY;
107  double lowX, highX;
108  double lowY, highY;
110 
111  tkHistoMap_.resize(HistoNumber);
112  const bool bookTH2F = isTH2F_;
113  for (int layer = 1; layer < HistoNumber; ++layer) {
114  folder = folderDefinition(ibooker, path, MapName, layer, mechanicalView, fullName);
115  tkdetmap_->getComponents(layer, nchX, lowX, highX, nchY, lowY, highY);
117  if (bookTH2F == false) {
118  me = ibooker.bookProfile2D(fullName.c_str(), fullName.c_str(), nchX, lowX, highX, nchY, lowY, highY, 0.0, 0.0);
119  } else {
120  me = ibooker.book2D(fullName.c_str(), fullName.c_str(), nchX, lowX, highX, nchY, lowY, highY);
121  }
122  //initialize bin content for the not assigned bins
123  if (baseline != 0) {
124  for (size_t ix = 1; ix <= (unsigned int)nchX; ++ix)
125  for (size_t iy = 1; iy <= (unsigned int)nchY; ++iy)
126  if (!tkdetmap_->getDetFromBin(layer, ix, iy))
127  me->Fill(1. * (lowX + ix - .5), 1. * (lowY + iy - .5), baseline);
128  }
129 
130  tkHistoMap_[layer] = me;
131 #ifdef debug_TkHistoMap
132  LogTrace("TkHistoMap") << "[TkHistoMap::createTkHistoMap] folder " << folder << " histoName " << fullName
133  << " layer " << layer << " ptr " << tkHistoMap_[layer];
134 #endif
135  }
136 }

References dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile2D(), printsummarytable::folder, folderDefinition(), newFWLiteAna::fullName, TkDetMap::getComponents(), TkDetMap::getDetFromBin(), HistoNumber, createfilelist::int, isTH2F_, phase1PixelTopology::layer, LogTrace, SiPixelPhase1Summary_cfi::MapName, hlt_dqm_clientPB-live_cfg::me, castor_dqm_sourceclient_file_cfg::path, AlCaHLTBitMon_QueryRunRegistry::string, tkdetmap_, and tkHistoMap_.

Referenced by TkHistoMap().

◆ dumpInTkMap()

void TkHistoMap::dumpInTkMap ( TrackerMap tkmap,
bool  dumpEntries = false 
)

Definition at line 270 of file TkHistoMap.cc.

270  {
271  for (int layer = 1; layer < HistoNumber; ++layer) {
272  // std::vector<uint32_t> dets;
273  // tkdetmap_->getDetsForLayer(layer,dets);
274  std::vector<DetId> dets = tkdetmap_->getDetsForLayer(layer);
275  for (size_t i = 0; i < dets.size(); ++i) {
276  if (dets[i] > 0) {
277  if (getEntries(dets[i]) > 0) {
278  tkmap->fill(dets[i], dumpEntries ? getEntries(dets[i]) : getValue(dets[i]));
279  }
280  }
281  }
282  }
283 }

References TrackerMap::fill(), TkDetMap::getDetsForLayer(), getEntries(), getValue(), HistoNumber, mps_fire::i, phase1PixelTopology::layer, and tkdetmap_.

Referenced by SiStripDetVOffTkMapPlotter::analyze(), and TkVoltageMapCreator::beginRun().

◆ fill()

void TkHistoMap::fill ( DetId  detid,
float  value 
)

Definition at line 176 of file TkHistoMap.cc.

176  {
179 #ifdef debug_TkHistoMap
180  LogTrace("TkHistoMap") << "[TkHistoMap::fill] Fill detid " << detid.rawId() << " Layer " << layer << " value "
181  << value << " ix,iy " << xybin.ix << " " << xybin.iy << " " << xybin.x << " " << xybin.y << " "
182  << tkHistoMap_[layer]->getTProfile2D()->GetName();
183 #endif
185  tkHistoMap_[layer]->getTProfile2D()->Fill(xybin.x, xybin.y, value);
187  tkHistoMap_[layer]->getTH2F()->Fill(xybin.x, xybin.y, value);
188 
189 #ifdef debug_TkHistoMap
190  LogTrace("TkHistoMap") << "[TkHistoMap::fill] "
191  << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.ix, xybin.iy);
192  for (size_t ii = 0; ii < 4; ii++)
193  for (size_t jj = 0; jj < 11; jj++) {
195  LogTrace("TkHistoMap") << "[TkHistoMap::fill] " << ii << " " << jj << " "
196  << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(ii, jj);
198  LogTrace("TkHistoMap") << "[TkHistoMap::fill] " << ii << " " << jj << " "
199  << tkHistoMap_[layer]->getTH2F()->GetBinContent(ii, jj);
200  }
201 #endif
202 }

References cached_detid, cached_layer, cached_XYbin, TkDetMap::findLayer(), TkDetMap::getXY(), cuy::ii, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, findQualityFiles::jj, CalibrationSummaryClient_cfi::kind, phase1PixelTopology::layer, LogTrace, DetId::rawId(), MonitorElementData::TH2F, tkdetmap_, tkHistoMap_, MonitorElementData::TPROFILE2D, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.

Referenced by SiStripDetVOffTkMapPlotter::analyze(), TkVoltageMapCreator::beginRun(), SiStripMonitorDigi::FillApvShotsMap(), and fillFromAscii().

◆ fillFromAscii()

void TkHistoMap::fillFromAscii ( const std::string &  filename)

Definition at line 164 of file TkHistoMap.cc.

164  {
165  std::ifstream file;
166  file.open(filename.c_str());
167  float value;
168  uint32_t detid;
169  while (file.good()) {
170  file >> detid >> value;
171  fill(detid, value);
172  }
173  file.close();
174 }

References geometryDiff::file, corrVsCorr::filename, fill(), and relativeConstraints::value.

◆ folderDefinition()

std::string TkHistoMap::folderDefinition ( DQMStore::IBooker ibooker,
std::string  folder,
const std::string &  MapName,
int  layer,
bool  mechanicalView,
std::string &  fullName 
)
private

◆ getAllMaps() [1/2]

std::vector<MonitorElement*>& TkHistoMap::getAllMaps ( )
inline

Definition at line 45 of file TkHistoMap.h.

45 { return tkHistoMap_; };

References tkHistoMap_.

◆ getAllMaps() [2/2]

const std::vector<MonitorElement*>& TkHistoMap::getAllMaps ( ) const
inline

Definition at line 44 of file TkHistoMap.h.

44 { return tkHistoMap_; };

References tkHistoMap_.

Referenced by BuildTrackerMapPlugin::subtractMap().

◆ getDetId() [1/3]

DetId TkHistoMap::getDetId ( const MonitorElement ME,
int  ix,
int  iy 
)
inline

Definition at line 53 of file TkHistoMap.h.

53 { return getDetId(ME->getTitle(), ix, iy); }

References getDetId().

Referenced by getDetId().

◆ getDetId() [2/3]

DetId TkHistoMap::getDetId ( const std::string &  title,
int  ix,
int  iy 
)
inline

Definition at line 49 of file TkHistoMap.h.

49  {
50  return getDetId(getLayerNum(getLayerName(title)), ix, iy);
51  }

References getLayerName(), getLayerNum(), and runGCPTkAlMap::title.

◆ getDetId() [3/3]

DetId TkHistoMap::getDetId ( int  layer,
int  ix,
int  iy 
)
inline

Definition at line 52 of file TkHistoMap.h.

52 { return tkdetmap_->getDetFromBin(layer, ix, iy); }

References TkDetMap::getDetFromBin(), phase1PixelTopology::layer, and tkdetmap_.

◆ getEntries()

float TkHistoMap::getEntries ( DetId  detid)

Definition at line 260 of file TkHistoMap.cc.

260  {
264  return 1;
265  else
266  return tkHistoMap_[layer]->getTProfile2D()->GetBinEntries(
267  tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix, xybin.iy));
268 }

References cached_detid, cached_layer, cached_XYbin, TkDetMap::findLayer(), TkDetMap::getXY(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, CalibrationSummaryClient_cfi::kind, phase1PixelTopology::layer, MonitorElementData::TH2F, tkdetmap_, and tkHistoMap_.

Referenced by dumpInTkMap().

◆ getLayerName()

std::string TkHistoMap::getLayerName ( std::string  title)
inline

Definition at line 54 of file TkHistoMap.h.

54 { return title.erase(0, MapName_.size() + 1); }

References MapName_, and runGCPTkAlMap::title.

Referenced by getDetId().

◆ getLayerNum()

uint16_t TkHistoMap::getLayerNum ( const std::string &  layerName)
inline

Definition at line 55 of file TkHistoMap.h.

55 { return tkdetmap_->getLayerNum(layerName); }

References TkDetMap::getLayerNum(), phase1PixelTopology::layerName, and tkdetmap_.

Referenced by getDetId().

◆ getMap()

MonitorElement* TkHistoMap::getMap ( short  layerNumber)
inline

Definition at line 43 of file TkHistoMap.h.

43 { return tkHistoMap_[layerNumber]; };

References tkHistoMap_.

◆ getValue()

float TkHistoMap::getValue ( DetId  detid)

Definition at line 250 of file TkHistoMap.cc.

250  {
253 
255  return tkHistoMap_[layer]->getTH2F()->GetBinContent(tkHistoMap_[layer]->getTH2F()->GetBin(xybin.ix, xybin.iy));
256  else
257  return tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
258  tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix, xybin.iy));
259 }

References cached_detid, cached_layer, cached_XYbin, TkDetMap::findLayer(), TkDetMap::getXY(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, CalibrationSummaryClient_cfi::kind, phase1PixelTopology::layer, MonitorElementData::TH2F, tkdetmap_, and tkHistoMap_.

Referenced by dumpInTkMap().

◆ load()

void TkHistoMap::load ( const TkDetMap tkDetMap,
const std::string &  path,
float  baseline,
bool  mechanicalView,
bool  isTH2F,
bool  createTkMap = true 
)
private

Definition at line 47 of file TkHistoMap.cc.

52  {
53  cached_detid = 0;
54  cached_layer = 0;
55  loadServices();
56  tkdetmap_ = tkDetMap;
57  isTH2F_ = isTH2F;
58 }

References cached_detid, cached_layer, isTH2F_, loadServices(), and tkdetmap_.

Referenced by TkHistoMap().

◆ loadServices()

void TkHistoMap::loadServices ( )

Definition at line 60 of file TkHistoMap.cc.

60  {
61  if (!edm::Service<DQMStore>().isAvailable()) {
62  edm::LogError("TkHistoMap")
63  << "\n------------------------------------------"
64  "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like"
65  "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")"
66  "\n------------------------------------------";
67  }
68  dqmStore_ = edm::Service<DQMStore>().operator->();
69 }

References dqmStore_.

Referenced by load().

◆ loadTkHistoMap()

void TkHistoMap::loadTkHistoMap ( const std::string &  path,
const std::string &  MapName,
bool  mechanicalView = false 
)

Definition at line 76 of file TkHistoMap.cc.

76  {
77  MapName_ = MapName;
78  tkHistoMap_.resize(HistoNumber);
79  auto loadMap = [this, &path, mechanicalView](DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) {
81  for (int layer = 1; layer < HistoNumber; ++layer) {
82  folder = folderDefinition(ibooker, path, MapName_, layer, mechanicalView, fullName);
83 #ifdef debug_TkHistoMap
84  LogTrace("TkHistoMap") << "[TkHistoMap::loadTkHistoMap] folder " << folder << " histoName " << fullName
85  << " find " << folder.find_last_of("/") << " length " << folder.length();
86 #endif
87  if (folder.find_last_of('/') != folder.length() - 1)
88  folder += "/";
89  tkHistoMap_[layer] = igetter.get(folder + fullName);
90 #ifdef debug_TkHistoMap
91  LogTrace("TkHistoMap") << "[TkHistoMap::loadTkHistoMap] folder " << folder << " histoName " << fullName
92  << " layer " << layer << " ptr " << tkHistoMap_[layer] << " find "
93  << folder.find_last_of("/") << " length " << folder.length();
94 #endif
95  }
96  };
97  dqmStore_->meBookerGetter(loadMap);
98 }

References dqmStore_, printsummarytable::folder, folderDefinition(), newFWLiteAna::fullName, HistoNumber, phase1PixelTopology::layer, LogTrace, SiPixelPhase1Summary_cfi::MapName, MapName_, dqm::implementation::DQMStore::meBookerGetter(), castor_dqm_sourceclient_file_cfg::path, AlCaHLTBitMon_QueryRunRegistry::string, and tkHistoMap_.

Referenced by BuildTrackerMapPlugin::read().

◆ save()

void TkHistoMap::save ( const std::string &  filename)

Definition at line 71 of file TkHistoMap.cc.

71  {
72  // dqmStore_ only for saving
74 }

References dqmStore_, corrVsCorr::filename, and dqm::implementation::DQMStore::save().

Referenced by SiStripDetVOffTkMapPlotter::analyze(), and TkVoltageMapCreator::beginRun().

◆ saveAsCanvas()

void TkHistoMap::saveAsCanvas ( const std::string &  filename,
const std::string &  options = "",
const std::string &  mode = "RECREATE" 
)

Definition at line 287 of file TkHistoMap.cc.

287  {
288  // TCanvas C(MapName_,MapName_,200,10,900,700);
289  TCanvas* CTIB =
290  new TCanvas(std::string("Canvas_" + MapName_ + "TIB").c_str(), std::string("Canvas_" + MapName_ + "TIB").c_str());
291  TCanvas* CTOB =
292  new TCanvas(std::string("Canvas_" + MapName_ + "TOB").c_str(), std::string("Canvas_" + MapName_ + "TOB").c_str());
293  TCanvas* CTIDP = new TCanvas(std::string("Canvas_" + MapName_ + "TIDP").c_str(),
294  std::string("Canvas_" + MapName_ + "TIDP").c_str());
295  TCanvas* CTIDM = new TCanvas(std::string("Canvas_" + MapName_ + "TIDM").c_str(),
296  std::string("Canvas_" + MapName_ + "TIDM").c_str());
297  TCanvas* CTECP = new TCanvas(std::string("Canvas_" + MapName_ + "TECP").c_str(),
298  std::string("Canvas_" + MapName_ + "TECP").c_str());
299  TCanvas* CTECM = new TCanvas(std::string("Canvas_" + MapName_ + "TECM").c_str(),
300  std::string("Canvas_" + MapName_ + "TECM").c_str());
301  CTIB->Divide(2, 2);
302  CTOB->Divide(2, 3);
303  CTIDP->Divide(1, 3);
304  CTIDM->Divide(1, 3);
305  CTECP->Divide(3, 3);
306  CTECM->Divide(3, 3);
307 
308  int i;
309  i = 0;
310  CTIB->cd(++i);
311  tkHistoMap_[TkLayerMap::TIB_L1]->getTProfile2D()->Draw(options.c_str());
312  CTIB->cd(++i);
313  tkHistoMap_[TkLayerMap::TIB_L2]->getTProfile2D()->Draw(options.c_str());
314  CTIB->cd(++i);
315  tkHistoMap_[TkLayerMap::TIB_L3]->getTProfile2D()->Draw(options.c_str());
316  CTIB->cd(++i);
317  tkHistoMap_[TkLayerMap::TIB_L4]->getTProfile2D()->Draw(options.c_str());
318 
319  i = 0;
320  CTIDP->cd(++i);
321  tkHistoMap_[TkLayerMap::TIDP_D1]->getTProfile2D()->Draw(options.c_str());
322  CTIDP->cd(++i);
323  tkHistoMap_[TkLayerMap::TIDP_D2]->getTProfile2D()->Draw(options.c_str());
324  CTIDP->cd(++i);
325  tkHistoMap_[TkLayerMap::TIDP_D3]->getTProfile2D()->Draw(options.c_str());
326 
327  i = 0;
328  CTIDM->cd(++i);
329  tkHistoMap_[TkLayerMap::TIDM_D1]->getTProfile2D()->Draw(options.c_str());
330  CTIDM->cd(++i);
331  tkHistoMap_[TkLayerMap::TIDM_D2]->getTProfile2D()->Draw(options.c_str());
332  CTIDM->cd(++i);
333  tkHistoMap_[TkLayerMap::TIDM_D3]->getTProfile2D()->Draw(options.c_str());
334 
335  i = 0;
336  CTOB->cd(++i);
337  tkHistoMap_[TkLayerMap::TOB_L1]->getTProfile2D()->Draw(options.c_str());
338  CTOB->cd(++i);
339  tkHistoMap_[TkLayerMap::TOB_L2]->getTProfile2D()->Draw(options.c_str());
340  CTOB->cd(++i);
341  tkHistoMap_[TkLayerMap::TOB_L3]->getTProfile2D()->Draw(options.c_str());
342  CTOB->cd(++i);
343  tkHistoMap_[TkLayerMap::TOB_L4]->getTProfile2D()->Draw(options.c_str());
344  CTOB->cd(++i);
345  tkHistoMap_[TkLayerMap::TOB_L5]->getTProfile2D()->Draw(options.c_str());
346  CTOB->cd(++i);
347  tkHistoMap_[TkLayerMap::TOB_L6]->getTProfile2D()->Draw(options.c_str());
348 
349  i = 0;
350  CTECP->cd(++i);
351  tkHistoMap_[TkLayerMap::TECP_W1]->getTProfile2D()->Draw(options.c_str());
352  CTECP->cd(++i);
353  tkHistoMap_[TkLayerMap::TECP_W2]->getTProfile2D()->Draw(options.c_str());
354  CTECP->cd(++i);
355  tkHistoMap_[TkLayerMap::TECP_W3]->getTProfile2D()->Draw(options.c_str());
356  CTECP->cd(++i);
357  tkHistoMap_[TkLayerMap::TECP_W4]->getTProfile2D()->Draw(options.c_str());
358  CTECP->cd(++i);
359  tkHistoMap_[TkLayerMap::TECP_W5]->getTProfile2D()->Draw(options.c_str());
360  CTECP->cd(++i);
361  tkHistoMap_[TkLayerMap::TECP_W6]->getTProfile2D()->Draw(options.c_str());
362  CTECP->cd(++i);
363  tkHistoMap_[TkLayerMap::TECP_W7]->getTProfile2D()->Draw(options.c_str());
364  CTECP->cd(++i);
365  tkHistoMap_[TkLayerMap::TECP_W8]->getTProfile2D()->Draw(options.c_str());
366  CTECP->cd(++i);
367  tkHistoMap_[TkLayerMap::TECP_W9]->getTProfile2D()->Draw(options.c_str());
368 
369  i = 0;
370  CTECM->cd(++i);
371  tkHistoMap_[TkLayerMap::TECM_W1]->getTProfile2D()->Draw(options.c_str());
372  CTECM->cd(++i);
373  tkHistoMap_[TkLayerMap::TECM_W2]->getTProfile2D()->Draw(options.c_str());
374  CTECM->cd(++i);
375  tkHistoMap_[TkLayerMap::TECM_W3]->getTProfile2D()->Draw(options.c_str());
376  CTECM->cd(++i);
377  tkHistoMap_[TkLayerMap::TECM_W4]->getTProfile2D()->Draw(options.c_str());
378  CTECM->cd(++i);
379  tkHistoMap_[TkLayerMap::TECM_W5]->getTProfile2D()->Draw(options.c_str());
380  CTECM->cd(++i);
381  tkHistoMap_[TkLayerMap::TECM_W6]->getTProfile2D()->Draw(options.c_str());
382  CTECM->cd(++i);
383  tkHistoMap_[TkLayerMap::TECM_W7]->getTProfile2D()->Draw(options.c_str());
384  CTECM->cd(++i);
385  tkHistoMap_[TkLayerMap::TECM_W8]->getTProfile2D()->Draw(options.c_str());
386  CTECM->cd(++i);
387  tkHistoMap_[TkLayerMap::TECM_W9]->getTProfile2D()->Draw(options.c_str());
388 
389  TFile* f = new TFile(filename.c_str(), mode.c_str());
390  CTIB->Write();
391  CTIDP->Write();
392  CTIDM->Write();
393  CTOB->Write();
394  CTECP->Write();
395  CTECM->Write();
396  f->Close();
397  delete f;
398 }

References f, corrVsCorr::filename, mps_fire::i, MapName_, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, AlCaHLTBitMon_QueryRunRegistry::string, TkLayerMap::TECM_W1, TkLayerMap::TECM_W2, TkLayerMap::TECM_W3, TkLayerMap::TECM_W4, TkLayerMap::TECM_W5, TkLayerMap::TECM_W6, TkLayerMap::TECM_W7, TkLayerMap::TECM_W8, TkLayerMap::TECM_W9, TkLayerMap::TECP_W1, TkLayerMap::TECP_W2, TkLayerMap::TECP_W3, TkLayerMap::TECP_W4, TkLayerMap::TECP_W5, TkLayerMap::TECP_W6, TkLayerMap::TECP_W7, TkLayerMap::TECP_W8, TkLayerMap::TECP_W9, TkLayerMap::TIB_L1, TkLayerMap::TIB_L2, TkLayerMap::TIB_L3, TkLayerMap::TIB_L4, TkLayerMap::TIDM_D1, TkLayerMap::TIDM_D2, TkLayerMap::TIDM_D3, TkLayerMap::TIDP_D1, TkLayerMap::TIDP_D2, TkLayerMap::TIDP_D3, tkHistoMap_, TkLayerMap::TOB_L1, TkLayerMap::TOB_L2, TkLayerMap::TOB_L3, TkLayerMap::TOB_L4, TkLayerMap::TOB_L5, and TkLayerMap::TOB_L6.

◆ setBinContent()

void TkHistoMap::setBinContent ( DetId  detid,
float  value 
)

Definition at line 204 of file TkHistoMap.cc.

204  {
208  tkHistoMap_[layer]->getTProfile2D()->SetBinEntries(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix, xybin.iy),
209  1);
210  tkHistoMap_[layer]->getTProfile2D()->SetBinContent(tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix, xybin.iy),
211  value);
212  } else if (tkHistoMap_[layer]->kind() == MonitorElement::Kind::TH2F) {
213  tkHistoMap_[layer]->setBinContent(xybin.ix, xybin.iy, value);
214  }
215 
216 #ifdef debug_TkHistoMap
217  LogTrace("TkHistoMap") << "[TkHistoMap::setbincontent] setBinContent detid " << detid.rawId() << " Layer " << layer
218  << " value " << value << " ix,iy " << xybin.ix << " " << xybin.iy << " " << xybin.x << " "
219  << xybin.y << " " << tkHistoMap_[layer]->getTProfile2D()->GetName() << " bin "
220  << tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.ix, xybin.iy);
221 
222  LogTrace("TkHistoMap") << "[TkHistoMap::setbincontent] "
223  << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.ix, xybin.iy);
224  for (size_t ii = 0; ii < 4; ii++)
225  for (size_t jj = 0; jj < 11; jj++) {
226  LogTrace("TkHistoMap") << "[TkHistoMap::setbincontent] " << ii << " " << jj << " "
227  << tkHistoMap_[layer]->getTProfile2D()->GetBinContent(ii, jj);
228  }
229 #endif
230 }

References cached_detid, cached_layer, cached_XYbin, TkDetMap::findLayer(), TkDetMap::getXY(), cuy::ii, TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, findQualityFiles::jj, CalibrationSummaryClient_cfi::kind, phase1PixelTopology::layer, LogTrace, DetId::rawId(), MonitorElementData::TH2F, tkdetmap_, tkHistoMap_, MonitorElementData::TPROFILE2D, TkLayerMap::XYbin::x, and TkLayerMap::XYbin::y.

Referenced by add().

Member Data Documentation

◆ cached_detid

DetId TkHistoMap::cached_detid
private

Definition at line 91 of file TkHistoMap.h.

Referenced by add(), fill(), getEntries(), getValue(), load(), and setBinContent().

◆ cached_layer

int16_t TkHistoMap::cached_layer
private

Definition at line 92 of file TkHistoMap.h.

Referenced by add(), fill(), getEntries(), getValue(), load(), and setBinContent().

◆ cached_XYbin

TkLayerMap::XYbin TkHistoMap::cached_XYbin
private

Definition at line 93 of file TkHistoMap.h.

Referenced by add(), fill(), getEntries(), getValue(), and setBinContent().

◆ dqmStore_

DQMStore* TkHistoMap::dqmStore_ {nullptr}
private

Definition at line 88 of file TkHistoMap.h.

Referenced by loadServices(), loadTkHistoMap(), save(), and TkHistoMap().

◆ HistoNumber

int TkHistoMap::HistoNumber
private

Definition at line 95 of file TkHistoMap.h.

Referenced by createTkHistoMap(), dumpInTkMap(), and loadTkHistoMap().

◆ isTH2F_

bool TkHistoMap::isTH2F_
private

Definition at line 97 of file TkHistoMap.h.

Referenced by createTkHistoMap(), and load().

◆ MapName_

std::string TkHistoMap::MapName_
private

Definition at line 96 of file TkHistoMap.h.

Referenced by getLayerName(), loadTkHistoMap(), saveAsCanvas(), and TkHistoMap().

◆ tkdetmap_

const TkDetMap* TkHistoMap::tkdetmap_
private

◆ tkHistoMap_

std::vector<MonitorElement*> TkHistoMap::tkHistoMap_
private
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
TkLayerMap::TIB_L3
Definition: TkDetMap.h:23
mps_fire.i
i
Definition: mps_fire.py:428
TkLayerMap::TIB_L2
Definition: TkDetMap.h:22
TkHistoMap::setBinContent
void setBinContent(DetId detid, float value)
Definition: TkHistoMap.cc:204
TkLayerMap::TOB_L4
Definition: TkDetMap.h:34
TkLayerMap::TECM_W4
Definition: TkDetMap.h:40
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
printsummarytable.folder
folder
Definition: printsummarytable.py:7
TkHistoMap::MapName_
std::string MapName_
Definition: TkHistoMap.h:96
TkLayerMap::TECP_W9
Definition: TkDetMap.h:54
TkLayerMap::TOB_L1
Definition: TkDetMap.h:31
TkDetMap::getLayerName
static std::string getLayerName(int in)
Definition: TkDetMap.cc:237
TkLayerMap::XYbin::ix
int16_t ix
Definition: TkDetMap.h:15
dqm::implementation::IBooker::bookProfile2D
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
TkLayerMap::TECM_W5
Definition: TkDetMap.h:41
TkLayerMap::TECM_W1
Definition: TkDetMap.h:37
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
TkLayerMap::TIDP_D1
Definition: TkDetMap.h:28
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
TkDetMap::getXY
const TkLayerMap::XYbin & getXY(DetId detid, DetId &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
Definition: TkDetMap.cc:548
dqm::implementation::DQMStore::meBookerGetter
void meBookerGetter(iFunc f)
Definition: DQMStore.h:632
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
TrackerMap::fill
void fill(int layer, int ring, int nmod, float x)
Definition: TrackerMap.cc:3288
TkHistoMap::cached_detid
DetId cached_detid
Definition: TkHistoMap.h:91
TkLayerMap::XYbin::iy
int16_t iy
Definition: TkDetMap.h:15
TkLayerMap::TECP_W6
Definition: TkDetMap.h:51
TkHistoMap::getValue
float getValue(DetId detid)
Definition: TkHistoMap.cc:250
TkLayerMap::TOB_L6
Definition: TkDetMap.h:36
TkDetMap::getLayerNum
static int getLayerNum(const std::string &in)
Definition: TkDetMap.cc:311
MonitorElementData::Kind::TH2F
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
options
Definition: options.py:1
TkHistoMap::load
void load(const TkDetMap *tkDetMap, const std::string &path, float baseline, bool mechanicalView, bool isTH2F, bool createTkMap=true)
Definition: TkHistoMap.cc:47
TkHistoMap::fill
void fill(DetId detid, float value)
Definition: TkHistoMap.cc:176
TkLayerMap::TECP_W5
Definition: TkDetMap.h:50
TkHistoMap::getLayerNum
uint16_t getLayerNum(const std::string &layerName)
Definition: TkHistoMap.h:55
TkLayerMap::TOB_L5
Definition: TkDetMap.h:35
TkLayerMap::TIDM_D3
Definition: TkDetMap.h:27
TkDetMap::getDetFromBin
DetId getDetFromBin(int layer, int ix, int iy) const
Definition: TkDetMap.h:191
TkHistoMap::dqmStore_
DQMStore * dqmStore_
Definition: TkHistoMap.h:88
TkLayerMap::TIDP_D2
Definition: TkDetMap.h:29
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
TkLayerMap::TECP_W4
Definition: TkDetMap.h:49
TkDetMap::findLayer
int16_t findLayer(DetId detid, DetId &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
Definition: TkDetMap.cc:568
TkHistoMap::tkHistoMap_
std::vector< MonitorElement * > tkHistoMap_
Definition: TkHistoMap.h:94
dqm::implementation::DQMStore::save
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:784
TkLayerMap::TECM_W6
Definition: TkDetMap.h:42
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
newFWLiteAna.fullName
fullName
Definition: newFWLiteAna.py:122
TkLayerMap::TIDP_D3
Definition: TkDetMap.h:30
geometryDiff.file
file
Definition: geometryDiff.py:13
TkHistoMap::cached_layer
int16_t cached_layer
Definition: TkHistoMap.h:92
TkLayerMap::TECM_W9
Definition: TkDetMap.h:45
TkLayerMap::TECM_W8
Definition: TkDetMap.h:44
TkHistoMap::HistoNumber
int HistoNumber
Definition: TkHistoMap.h:95
TkLayerMap::XYbin::x
float x
Definition: TkDetMap.h:16
TkLayerMap::TECM_W7
Definition: TkDetMap.h:43
TkLayerMap::TECM_W2
Definition: TkDetMap.h:38
TkHistoMap::createTkHistoMap
void createTkHistoMap(DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline, bool mechanicalView)
Definition: TkHistoMap.cc:100
TkDetMap::getDetsForLayer
std::vector< DetId > getDetsForLayer(int layer) const
Definition: TkDetMap.h:196
TkHistoMap::folderDefinition
std::string folderDefinition(DQMStore::IBooker &ibooker, std::string folder, const std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
Definition: TkHistoMap.cc:138
edm::Service
Definition: Service.h:30
createfilelist.int
int
Definition: createfilelist.py:10
TkHistoMap::getLayerName
std::string getLayerName(std::string title)
Definition: TkHistoMap.h:54
SiStripFolderOrganizer::setSiStripFolderName
void setSiStripFolderName(std::string name)
Definition: SiStripFolderOrganizer.cc:41
TkLayerMap::TECP_W7
Definition: TkDetMap.h:52
value
Definition: value.py:1
TkHistoMap::tkdetmap_
const TkDetMap * tkdetmap_
Definition: TkHistoMap.h:90
TkLayerMap::TIB_L1
Definition: TkDetMap.h:21
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
SiPixelPhase1Summary_cfi.MapName
MapName
Definition: SiPixelPhase1Summary_cfi.py:17
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TkLayerMap::TIB_L4
Definition: TkDetMap.h:24
TkHistoMap::isTH2F_
bool isTH2F_
Definition: TkHistoMap.h:97
TkLayerMap::TECP_W8
Definition: TkDetMap.h:53
TkHistoMap::cached_XYbin
TkLayerMap::XYbin cached_XYbin
Definition: TkHistoMap.h:93
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
TkLayerMap::TECP_W1
Definition: TkDetMap.h:46
MonitorElementData::Kind::TPROFILE2D
TkLayerMap::TECP_W2
Definition: TkDetMap.h:47
TkLayerMap::TECP_W3
Definition: TkDetMap.h:48
TkHistoMap::getEntries
float getEntries(DetId detid)
Definition: TkHistoMap.cc:260
dqm::implementation::IGetter
Definition: DQMStore.h:484
relativeConstraints.value
value
Definition: relativeConstraints.py:53
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
TkDetMap::getComponents
void getComponents(int layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY) const
Definition: TkDetMap.cc:589
SiStripFolderOrganizer
Definition: SiStripFolderOrganizer.h:27
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
TkLayerMap::TIDM_D2
Definition: TkDetMap.h:26
ME
Definition: ME.h:11
SiStripFolderOrganizer::getSubDetLayerFolderName
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
Definition: SiStripFolderOrganizer.cc:208
TkLayerMap::XYbin::y
float y
Definition: TkDetMap.h:16
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TkHistoMap::getDetId
DetId getDetId(const std::string &title, int ix, int iy)
Definition: TkHistoMap.h:49
dqm::implementation::IBooker
Definition: DQMStore.h:43
TkLayerMap::TIDM_D1
Definition: TkDetMap.h:25
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
TkLayerMap::TECM_W3
Definition: TkDetMap.h:39
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
phase1PixelTopology::layerName
constexpr char const * layerName[numberOfLayers]
Definition: phase1PixelTopology.h:37
SiStripSubdetector::Subdetector
Subdetector
Definition: SiStripEnums.h:5
TkLayerMap::TOB_L3
Definition: TkDetMap.h:33
TkLayerMap::XYbin
Definition: TkDetMap.h:12
TkDetMap::getSubDetLayerSide
static void getSubDetLayerSide(int in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side)
Definition: TkDetMap.cc:383
cuy.ii
ii
Definition: cuy.py:589
TkHistoMap::loadServices
void loadServices()
Definition: TkHistoMap.cc:60
TkLayerMap::TOB_L2
Definition: TkDetMap.h:32