-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement TH2Poly in DQM Services for HGCal DQM #41932
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,6 +243,8 @@ namespace dqm::impl { | |
static_cast<TH2D *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->Fill(x, yw, 1); | ||
else if (kind() == Kind::TH2I) | ||
static_cast<TH2I *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->Fill(x, yw, 1); | ||
else if (kind() == Kind::TH2Poly) | ||
static_cast<TH2Poly *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->Fill(x, yw, 1); | ||
else if (kind() == Kind::TPROFILE) | ||
static_cast<TProfile *>(accessRootObject(access, __PRETTY_FUNCTION__, 1))->Fill(x, yw, 1); | ||
else | ||
|
@@ -329,6 +331,8 @@ namespace dqm::impl { | |
static_cast<TH2D *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->Fill(x, y, zw); | ||
else if (kind() == Kind::TH2I) | ||
static_cast<TH2I *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->Fill(x, y, zw); | ||
else if (kind() == Kind::TH2Poly) | ||
static_cast<TH2Poly *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->Fill(x, y, zw); | ||
else if (kind() == Kind::TH3F) | ||
static_cast<TH3F *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->Fill(x, y, zw, 1); | ||
else if (kind() == Kind::TPROFILE) | ||
|
@@ -688,6 +692,12 @@ namespace dqm::impl { | |
|
||
/*** setter methods (wrapper around ROOT methods) ****/ | ||
// | ||
/// set polygon bin (TH2Poly) | ||
void MonitorElement::addBin(TGraph *graph) { | ||
auto access = this->accessMut(); | ||
static_cast<TH2Poly *>(accessRootObject(access, __PRETTY_FUNCTION__, 2))->AddBin(graph); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if the ROOT object is not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed,
|
||
} | ||
|
||
/// set content of bin (1-D) | ||
void MonitorElement::setBinContent(int binx, double content) { | ||
auto access = this->accessMut(); | ||
|
@@ -1032,6 +1042,12 @@ namespace dqm::impl { | |
return static_cast<TH2D *>(accessRootObject(access, __PRETTY_FUNCTION__, 2)); | ||
} | ||
|
||
TH2Poly *MonitorElement::getTH2Poly() { | ||
auto access = this->accessMut(); | ||
assert(kind() == Kind::TH2Poly); | ||
return static_cast<TH2Poly *>(accessRootObject(access, __PRETTY_FUNCTION__, 2)); | ||
} | ||
|
||
TH3F *MonitorElement::getTH3F() { | ||
auto access = this->accessMut(); | ||
assert(kind() == Kind::TH3F); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,7 +140,8 @@ struct MonitorElementData { | |
TH2I = 0x23, | ||
TH3F = 0x30, | ||
TPROFILE = 0x40, | ||
TPROFILE2D = 0x41 | ||
TPROFILE2D = 0x41, | ||
TH2Poly = 0x60 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why such a large gap between the previous value (0x41)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess I kept thinking of hexagons for a wafer map and then put a number starting with six. We can assign 0x24 for TH2Poly if it is feasible.
|
||
}; | ||
|
||
// Which window of time the ME is supposed to cover. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this should be corrected. I will update it in a commit accordingly.