From 400dba193f3d9b3e6447b72c81906fe63fc19c1b Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Thu, 22 Oct 2020 09:06:04 +0200 Subject: [PATCH] PixelMonitoring: cmake fixes, enable flake8 --- .../PixelMonitoring/CMakeLists.txt | 20 ++++++------------- .../python/PixelAthErrorMonAlgCfg.py | 20 +++++++------------ .../python/PixelAthHitMonAlgCfg.py | 11 +++++----- 3 files changed, 18 insertions(+), 33 deletions(-) diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/PixelMonitoring/CMakeLists.txt index 144bde139400..c52696659bc4 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/CMakeLists.txt +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/CMakeLists.txt @@ -1,22 +1,14 @@ -################################################################################ -# Package: PixelMonitoring -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( PixelMonitoring ) -# External dependencies: -find_package( ROOT COMPONENTS Core MathCore Hist ) - # Component(s) in the package: atlas_add_component( PixelMonitoring src/*.h src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib AtlasDetDescr - GaudiKernel InDetRawData InDetPrepRawData TrkTrack - AthenaPoolUtilities GeoPrimitives xAODEventInfo EventPrimitives InDetIdentifier - InDetReadoutGeometry InDetRIO_OnTrack LWHists TrkParameters TrkSpacePoint - TrkTrackSummary TrkToolInterfaces PixelCablingLib PixelGeoModelLib PathResolver - InDetTrackSelectionToolLib InDetConditionsSummaryService PixelConditionsToolsLib ) + LINK_LIBRARIES AthenaMonitoringKernelLib AthenaMonitoringLib AtlasDetDescr EventPrimitives + InDetConditionsSummaryService InDetIdentifier InDetPrepRawData InDetRIO_OnTrack InDetRawData + InDetReadoutGeometry InDetTrackSelectionToolLib PixelCablingLib PixelConditionsData + TrkMeasurementBase TrkRIO_OnTrack TrkToolInterfaces TrkTrack TrkTrackSummary ) -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthErrorMonAlgCfg.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthErrorMonAlgCfg.py index c778ba94a673..a3a2d5505c40 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthErrorMonAlgCfg.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthErrorMonAlgCfg.py @@ -7,11 +7,10 @@ @brief Configuration of Pixel Error Monitoring Histograms for Run 3 ''' from PixelMonitoring.PixelAthMonitoringBase import define2DProfHist -from PixelMonitoring.PixelAthMonitoringBase import define1DLayers, defineMapVsLumiLayers +from PixelMonitoring.PixelAthMonitoringBase import defineMapVsLumiLayers from PixelMonitoring.PixelAthMonitoringBase import define1DProfLumiLayers -from PixelMonitoring.PixelAthMonitoringBase import layers, totcuts, xbinsem, xminsem, lumibinsx -from PixelMonitoring.PixelAthMonitoringBase import addOnTrackTxt, fullDressTitle -from PixelMonitoring.PixelAthMonitoringBase import runtext +from PixelMonitoring.PixelAthMonitoringBase import layers +from PixelMonitoring.PixelAthMonitoringBase import fullDressTitle from PixelMonitoring.PixelAthMonitoringBase import errbbinsy, errbminsy, errbbsizy, errtbinsy from PixelMonitoring.PixelAthMonitoringBase import ErrBitLabels, ErrCatRODModLabels, ErrCatLabels, ErrCatRODModLabelsNorm, ErrCatLabelsNorm from PixelMonitoring.PixelAthMonitoringBase import ErrStateLabelsFEI3, ErrStateLabelsFEI4 @@ -23,12 +22,8 @@ def PixelAthErrorMonAlgCfg(helper, alg, **kwargs): alg -- algorithm Configurable object returned from addAlgorithm kwargs -- jo agruments ''' - doOnline = kwargs.get('doOnline', False) - doLumiBlock = kwargs.get('doLumiBlock', False) - path = '/Pixel/Errors/' pathExpert = '/Pixel/ErrorsExpert/' - pathLowStat = '/Pixel/LumiBlock/' errorGroup = helper.addGroup(alg, 'Error') @@ -107,12 +102,11 @@ def PixelAthErrorMonAlgCfg(helper, alg, **kwargs): title = fullDressTitle('IBL ServiceRecord Unweighted', False, ';SR',';# errors/event') varName += ';ServiceRecord_Unweighted_IBL' errorGroup.defineHistogram(varName, - type='TH1F', path=pathExpert, title=title, - xbins=40, xmin=-0.5, xmax=39.5) + type='TH1F', path=pathExpert, title=title, + xbins=40, xmin=-0.5, xmax=39.5) varName = 'ServiceRecord_val' title = fullDressTitle('IBL ServiceRecord Weighted with Payload', False, ';SR',';# errors/event') varName += ';ServiceRecord_Weighted_IBL' errorGroup.defineHistogram(varName, weight='ServiceRecord_wgt', - type='TH1F', path=pathExpert, title=title, - xbins=40, xmin=-0.5, xmax=39.5) - + type='TH1F', path=pathExpert, title=title, + xbins=40, xmin=-0.5, xmax=39.5) diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py index 20d240a20e59..50ada6a7aca4 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # ''' @@ -8,9 +8,8 @@ ''' from PixelMonitoring.PixelAthMonitoringBase import define2DProfHist, definePP0Histos, getLayerGroup -from PixelMonitoring.PixelAthMonitoringBase import define1DLayers from PixelMonitoring.PixelAthMonitoringBase import define1DProfLumiLayers -from PixelMonitoring.PixelAthMonitoringBase import layers, totcuts, xbinsem, xminsem, lumibinsx, bcidbinsx +from PixelMonitoring.PixelAthMonitoringBase import layers, lumibinsx, bcidbinsx from PixelMonitoring.PixelAthMonitoringBase import addOnTrackTxt, addOnTrackToPath, fullDressTitle from PixelMonitoring.PixelAthMonitoringBase import runtext @@ -74,8 +73,8 @@ def PixelAthHitMonAlgCfg(helper, alg, **kwargs): fullvarstr+= ',{0}_{1}'.format(histoname, 'val') fullvarstr+= ';' + histoname + '_{0}'.format(layer) layerGroup.defineHistogram(fullvarstr, - type='TProfile', path=pathGroup, title=title, - xbins=bcidbinsx, xmin=-0.5, xmax=-0.5+bcidbinsx) + type='TProfile', path=pathGroup, title=title, + xbins=bcidbinsx, xmin=-0.5, xmax=-0.5+bcidbinsx) histoGroupName = 'Hit_Occupancy_PP0' title = 'Average per module(FE) hit occupancy reset every 5 min' @@ -109,7 +108,7 @@ def PixelAthHitMonAlgCfg(helper, alg, **kwargs): titleLB = 'Hit Level 1 Accept lowstat {0}'.format(layer) + runtext + ';Level 1 Accept;# hits' fullvarstrLB = varName + ';' + histonameLB layerGroup.defineHistogram(fullvarstrLB, - type='TH1F', path=pathLowStat, title=title, + type='TH1F', path=pathLowStat, title=titleLB, xbins=14, xmin=-1.5, xmax=12.5, duration='lowStat') ### -- GitLab