diff --git a/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py b/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py index 4ba90944b8ee28c571f61d91671070b3e2c7268a..ff8e8a79a017d4e090c2fa11535f399604ddb671 100644 --- a/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py +++ b/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py @@ -191,10 +191,10 @@ def getLabels(labels, partition = ''): def getCellNameTMDB(partition, channel): - return _cellNameTMDB_LB[channel] if partition.startswith('L') else _cellNameTMDB_EB[channel] + return _cellNameTMDB_LB[channel] if partition.startswith('L') else _cellNameTMDB_EB[channel] def getCellChannelTMDB_Labels(partition): - return _cellNameTMDB_LB if partition.startswith('L') else _cellNameTMDB_EB + return _cellNameTMDB_LB if partition.startswith('L') else _cellNameTMDB_EB def addValueVsModuleAndChannelMaps(group, name, title, path, subDirectory = False, type = 'TH2D', value = '', trigger = '', run = ''): @@ -313,7 +313,7 @@ def addTile2DHistogramsArray(helper, algorithm, name = '', xvalue = '', yvalue = dimensions = _getDimensions(triggers = triggers, perPartition = perPartition, perSample = perSample, perGain = perGain, allPartitions = allPartitions) - array = helper.addArray(dimensions, algorithm, name) + array = helper.addArray(dimensions, algorithm, name, topPath = path) for postfix, tool in array.Tools.items(): kwargs = _parsePostfix(postfix, triggers = triggers, perPartition = perPartition, @@ -326,10 +326,10 @@ def addTile2DHistogramsArray(helper, algorithm, name = '', xvalue = '', yvalue = fullName = xvalue + ',' + yvalue + (',' + value if 'Profile' in type else '') + ';' fullName += getTileHistogramName(name = name,separator = separator, **kwargs) - fullPath = getTileHistogramPath(path = path, subDirectory = subDirectory, **kwargs) + subPath = getTileHistogramPath(path = '', subDirectory = subDirectory, **kwargs) fullTitle = getTileHistogramTitle(title = title, run = run, **kwargs) - tool.defineHistogram( fullName, path = fullPath, type = type, title = fullTitle, + tool.defineHistogram( fullName, path = subPath, type = type, title = fullTitle, xlabels = nxlabels, ylabels = nylabels, xbins = xbins, xmin = xmin, xmax = xmax, ybins = ybins, ymin = ymin, ymax = ymax, weight = weight) @@ -535,7 +535,7 @@ def addTile1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = dimensions = _getDimensions(triggers = triggers, perPartition = perPartition, perSample = perSample, perGain = perGain, allPartitions = allPartitions) - array = helper.addArray(dimensions, algorithm, name) + array = helper.addArray(dimensions, algorithm, name, topPath = path) for postfix, tool in array.Tools.items(): kwargs = _parsePostfix(postfix, triggers = triggers, perPartition = perPartition, @@ -547,10 +547,10 @@ def addTile1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = fullName = xvalue + (',' + value if 'Profile' in type else '') + ';' fullName += getTileHistogramName(name = name,separator = separator, **kwargs) - fullPath = getTileHistogramPath(path = path, subDirectory = subDirectory, **kwargs) + subPath = getTileHistogramPath(path = '', subDirectory = subDirectory, **kwargs) fullTitle = getTileHistogramTitle(title = title, run = run, **kwargs) - tool.defineHistogram( fullName, path = fullPath, type = type, title = fullTitle, + tool.defineHistogram( fullName, path = subPath, type = type, title = fullTitle, xlabels = nxlabels, xbins = xbins, xmin = xmin, xmax = xmax, opt = opt) return array @@ -590,7 +590,7 @@ def addTileModuleArray(helper, algorithm, name, title, path, def addTileTMDB_2DHistogramsArray(helper, algorithm, name = '', value = '', title = '', path = '', type = 'TH2D', run = ''): - array = helper.addArray([int(Tile.MAX_ROS - 1)], algorithm, name) + array = helper.addArray([int(Tile.MAX_ROS - 1)], algorithm, name, topPath = path) for postfix, tool in array.Tools.items(): ros = int(postfix.split('_').pop()) + 1 @@ -604,7 +604,7 @@ def addTileTMDB_2DHistogramsArray(helper, algorithm, name = '', value = '', fullTitle = getTileHistogramTitle(title, run = run, partition = partition) - tool.defineHistogram( fullName, path = path, type = type, title = fullTitle, + tool.defineHistogram( fullName, path = '', type = type, title = fullTitle, xlabels = nxlabels, ylabels = nylabels, xbins = Tile.MAX_DRAWER, xmin = -0.5, xmax = Tile.MAX_DRAWER - 0.5, ybins = ybins, ymin = -0.5, ymax = ybins - 0.5) @@ -619,7 +619,7 @@ def addTileTMDB_1DHistogramsArray(helper, algorithm, name = '', xvalue = '', val baseName = "{}_{}".format(name, partition) nChannels = len(_cellNameTMDB_LB) if partition.startswith('L') else len(_cellNameTMDB_EB) dimensions = [int(Tile.MAX_DRAWER), nChannels] if perModule else [nChannels] - array = helper.addArray(dimensions, algorithm, baseName, topPath = 'Tile') + array = helper.addArray(dimensions, algorithm, baseName, topPath = path) for postfix, tool in array.Tools.items(): elements = postfix.split('_') channel = int(elements.pop()) @@ -631,7 +631,6 @@ def addTileTMDB_1DHistogramsArray(helper, algorithm, name = '', xvalue = '', val moduleOrPartition = 'Module ' + partition + module if perModule else 'Partition ' + partition fullTitle = 'Run {} {} TMDB {}: {}'.format(run, moduleOrPartition, cell, title) - fullPath = path.replace('Tile/', '') if path.startswith('Tile/') else path - tool.defineHistogram(fullName, path = fullPath, type = type, title = fullTitle, + tool.defineHistogram(fullName, path = '', type = type, title = fullTitle, xbins = xbins, xmin = xmin, xmax = xmax)