Skip to content

Commit

Permalink
Fix #35827
Browse files Browse the repository at this point in the history
  • Loading branch information
lecriste committed Oct 28, 2021
1 parent c85ee6e commit 337ef45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Validation/RecoTrack/python/plotting/plotting.py
Expand Up @@ -49,7 +49,8 @@ def _setStyle():
def _getObject(tdirectory, name):
obj = tdirectory.Get(name)
if not obj:
print("Did not find {obj} from {dir}".format(obj=name, dir=tdirectory.GetPath()))
if verbose:
print("Did not find {obj} from {dir}".format(obj=name, dir=tdirectory.GetPath()))
return None
return obj

Expand Down
3 changes: 1 addition & 2 deletions Validation/RecoTrack/python/plotting/validation.py
Expand Up @@ -1201,6 +1201,7 @@ def _doPlotsForPlotter(self, plotter, sample, limitSubFoldersOnlyTo=None):
if not os.path.exists(newdir):
os.makedirs(newdir, exist_ok=True)

plotterFolder.create(self._openFiles, self._labels, dqmSubFolder)
p = multiprocessing.Process(target=self._doPlots, args=(plotterFolder, dqmSubFolder, newsubdir, newdir, iProc, return_dict))
proc.append((plotterFolder, dqmSubFolder, p))
p.start()
Expand Down Expand Up @@ -1294,7 +1295,6 @@ def doPlots(self, plotters, plotterDrawArgs={}, **kwargs):
self._openFiles = []

def _doPlots(self, plotterFolder, dqmSubFolder, newsubdir, newdir, iProc, return_dict):
plotterFolder.create(self._openFiles, self._labels, dqmSubFolder)
fileList = plotterFolder.draw(directory=newdir, **self._plotterDrawArgs)

if len(fileList) == 0:
Expand Down Expand Up @@ -1362,7 +1362,6 @@ def doPlots(self, plotters, plotterDrawArgs={}, **kwargs):
self._openFiles = []

def _doPlots(self, plotterFolder, dqmSubFolder, newsubdir, newdir, iProc, return_dict):
plotterFolder.create(self._openFiles, self._labels, dqmSubFolder)
fileList = plotterFolder.draw(directory=newdir, **self._plotterDrawArgs)

# check if plots are produced
Expand Down

0 comments on commit 337ef45

Please sign in to comment.