Skip to content

Commit

Permalink
Add a patch based on makortel's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ywkao committed Jun 13, 2023
1 parent 5fa5e4e commit 14e856f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DQMServices/Core/interface/DQMStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ namespace dqm {
double lowY,
double highY,
FUNC onbooking = NOOP()) {
return bookME(name, MonitorElementData::Kind::TH2F, [=]() {
return bookME(name, MonitorElementData::Kind::TH2Poly, [=]() {
auto th2poly = new TH2Poly(name, title, lowX, highX, lowY, highY);
onbooking(th2poly);
return th2poly;
Expand Down
6 changes: 5 additions & 1 deletion DQMServices/Core/src/MonitorElement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,11 @@ namespace dqm::impl {
/// set polygon bin (TH2Poly)
void MonitorElement::addBin(TGraph *graph) {
auto access = this->accessMut();
static_cast<TH2Poly *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->AddBin(graph);
if (kind() == Kind::TH2Poly) {
static_cast<TH2Poly *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->AddBin(graph);
} else {
incompatible(__PRETTY_FUNCTION__);
}
}

/// set content of bin (1-D)
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/Histograms/interface/MonitorElementCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ struct MonitorElementData {
TH2S = 0x21,
TH2D = 0x22,
TH2I = 0x23,
TH2Poly = 0x24,
TH3F = 0x30,
TPROFILE = 0x40,
TPROFILE2D = 0x41,
TH2Poly = 0x60
TPROFILE2D = 0x41
};

// Which window of time the ME is supposed to cover.
Expand Down

0 comments on commit 14e856f

Please sign in to comment.