Skip to content

Commit

Permalink
simplify getTH2X, setNoAlphanumeric in the other places
Browse files Browse the repository at this point in the history
  • Loading branch information
jhgoh committed Sep 5, 2017
1 parent d37dcdc commit 88ca93d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions DQM/RPCMonitorDigi/interface/utils.h
Expand Up @@ -18,9 +18,7 @@ namespace rpcdqm{
static void setNoAlphanumeric(MonitorElement* myMe)
{
// Set no-alphanumeric flag to avoid malfunctioning in multithread environment.
TH2* h2 = nullptr;
if ( myMe->kind() == MonitorElement::DQM_KIND_TH2F ) h2 = myMe->getTH2F();
else if ( myMe->kind() == MonitorElement::DQM_KIND_TH2D ) h2 = myMe->getTH2D();
TH2* h2 = dynamic_cast<TH2*>(myMe->getTH1());
if ( !h2 ) return;

h2->GetXaxis()->SetNoAlphanumeric(true);
Expand Down Expand Up @@ -251,6 +249,7 @@ namespace rpcdqm{
void labelXAxisSector(MonitorElement * myMe){
//before do some checks
if (!myMe) return;
RPCMEHelper::setNoAlphanumeric(myMe);

std::stringstream xLabel;

Expand All @@ -265,6 +264,7 @@ namespace rpcdqm{
void labelXAxisSegment(MonitorElement * myMe){
//before do some checks
if (!myMe) return;
RPCMEHelper::setNoAlphanumeric(myMe);

std::stringstream xLabel;

Expand All @@ -284,6 +284,7 @@ namespace rpcdqm{

//before do some checks
if (!myMe) return;
RPCMEHelper::setNoAlphanumeric(myMe);

//set bin labels
if(region == 0){
Expand Down
2 changes: 1 addition & 1 deletion DQM/RPCMonitorDigi/src/RPCBookDetUnitME.cc
Expand Up @@ -97,7 +97,6 @@ void RPCMonitorDigi::bookSectorRingME(DQMStore::IBooker & ibooker, const std::st

meMap[os.str()]->setAxisTitle("strip", 1);
rpcdqm::utils rpcUtils;
rpcdqm::RPCMEHelper::setNoAlphanumeric(meMap[os.str()]);
rpcUtils.labelYAxisRoll( meMap[os.str()], 0, wheel, true);

}
Expand Down Expand Up @@ -152,6 +151,7 @@ void RPCMonitorDigi::bookSectorRingME(DQMStore::IBooker & ibooker, const std::st

meMap[os.str()] = ibooker.book2D(os.str(), os.str(), 96, 0.5, 96.5, 18 , 18.5, 36.5);
meMap[os.str()]->setAxisTitle("strip", 1);
rpcdqm::RPCMEHelper::setNoAlphanumeric(meMap[os.str()]);

for (int i = 1 ; i<= 18; i++) {
yLabel.str("");
Expand Down

0 comments on commit 88ca93d

Please sign in to comment.