From b14e2923331b0bbee4a3dca672d4c61af3591819 Mon Sep 17 00:00:00 2001
From: Charles Burton <burton@utexas.edu>
Date: Mon, 15 Jul 2019 13:38:08 +0000
Subject: [PATCH] Allow commas in titles, part 2

---
 Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py | 2 +-
 Control/AthenaMonitoring/python/GenericMonitoringTool.py   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py b/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py
index 21dc7d8c2d4..47e972416c4 100644
--- a/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py
+++ b/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py
@@ -81,7 +81,7 @@ def ExampleMonitoringConfig(inputFlags):
 
     ### STEP 5 ###
     # Configure histograms
-    myGroup.defineHistogram('lumiPerBCID',title='Luminosity","WithCommaInTitle;L/BCID;Events',
+    myGroup.defineHistogram('lumiPerBCID',title='Luminosity,WithCommaInTitle;L/BCID;Events',
                             path='ToRuleThemAll',xbins=10,xmin=0.0,xmax=10.0)
     myGroup.defineHistogram('lb', title='Luminosity Block;lb;Events',
                             path='ToFindThem',xbins=1000,xmin=-0.5,xmax=999.5,weight='testweight')
diff --git a/Control/AthenaMonitoring/python/GenericMonitoringTool.py b/Control/AthenaMonitoring/python/GenericMonitoringTool.py
index 4a591018ae1..524283b44fb 100644
--- a/Control/AthenaMonitoring/python/GenericMonitoringTool.py
+++ b/Control/AthenaMonitoring/python/GenericMonitoringTool.py
@@ -45,6 +45,7 @@ def defineHistogram(varname, type='TH1F', path=None,
 
     if title is None:
         title = varname
+    title = title.replace(',','","') # Commas used as delimiters, but "," is ok
 
     if athenaCommonFlags.isOnline() and type in ['TEfficiency']:
         log.warning('Histogram %s of type %s is not supported for online running and will not be added', varname, type)
-- 
GitLab