Skip to content

Commit 5284c46

Browse files
committed
Add a patch based on makortel's comments
1 parent 419cb6f commit 5284c46

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

DQMServices/Core/interface/DQMStore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ namespace dqm {
267267
double lowY,
268268
double highY,
269269
FUNC onbooking = NOOP()) {
270-
return bookME(name, MonitorElementData::Kind::TH2F, [=]() {
270+
return bookME(name, MonitorElementData::Kind::TH2Poly, [=]() {
271271
auto th2poly = new TH2Poly(name, title, lowX, highX, lowY, highY);
272272
onbooking(th2poly);
273273
return th2poly;

DQMServices/Core/src/MonitorElement.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,11 @@ namespace dqm::impl {
695695
/// set polygon bin (TH2Poly)
696696
void MonitorElement::addBin(TGraph *graph) {
697697
auto access = this->accessMut();
698-
static_cast<TH2Poly *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->AddBin(graph);
698+
if (kind() == Kind::TH2Poly) {
699+
static_cast<TH2Poly *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->AddBin(graph);
700+
} else {
701+
incompatible(__PRETTY_FUNCTION__);
702+
}
699703
}
700704

701705
/// set content of bin (1-D)

DataFormats/Histograms/interface/MonitorElementCollection.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ struct MonitorElementData {
138138
TH2S = 0x21,
139139
TH2D = 0x22,
140140
TH2I = 0x23,
141+
TH2Poly = 0x24,
141142
TH3F = 0x30,
142143
TPROFILE = 0x40,
143-
TPROFILE2D = 0x41,
144-
TH2Poly = 0x60
144+
TPROFILE2D = 0x41
145145
};
146146

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

0 commit comments

Comments
 (0)