diff --git a/LArCalorimeter/LArConfiguration/CMakeLists.txt b/LArCalorimeter/LArConfiguration/CMakeLists.txt index 9ffc2a572dd23a580d5e1a31d8cc7462fedee9a5..8fdca7918b71ab4e2a8bc8df55891a715c5a7789 100644 --- a/LArCalorimeter/LArConfiguration/CMakeLists.txt +++ b/LArCalorimeter/LArConfiguration/CMakeLists.txt @@ -1,12 +1,10 @@ -################################################################################ -# Package: LArConfiguration -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( LArConfiguration ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) if( NOT "${CMAKE_PROJECT_NAME}" STREQUAL "AthSimulation" ) atlas_add_test( LArElecCalibDBConfig_test diff --git a/LArCalorimeter/LArDigitization/CMakeLists.txt b/LArCalorimeter/LArDigitization/CMakeLists.txt index e31f694723d547dbcda0e531203f3858abbc4d9c..3303c75882ed4b845390c7f3b82c4d58a75eb1b8 100644 --- a/LArCalorimeter/LArDigitization/CMakeLists.txt +++ b/LArCalorimeter/LArDigitization/CMakeLists.txt @@ -1,6 +1,4 @@ -################################################################################ -# Package: LArDigitization -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( LArDigitization ) @@ -15,17 +13,18 @@ atlas_add_library( LArDigitizationLib PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES CaloIdentifier AthenaBaseComps - AthenaKernel Identifier xAODEventInfo GaudiKernel - LArIdentifier LArRawEvent LArSimEvent + AthenaKernel xAODEventInfo GaudiKernel + LArElecCalib LArRawEvent LArSimEvent LArRecConditions LArRawConditions CaloDetDescrLib - PileUpToolsLib StoreGateLib SGtests LArCablingLib EventInfoUtils - PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorObjects ) + PileUpToolsLib StoreGateLib LArCablingLib + PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib EventInfoUtils + GeneratorObjects Identifier LArIdentifier ) + atlas_add_component( LArDigitization src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES LArDigitizationLib ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) diff --git a/LArCalorimeter/LArDigitization/python/LArDigitGetter.py b/LArCalorimeter/LArDigitization/python/LArDigitGetter.py index 6ff2b043faa4af12b313fde6215216e2d25d4986..b5e65a919a6f10602544348d1617535be1227ab7 100644 --- a/LArCalorimeter/LArDigitization/python/LArDigitGetter.py +++ b/LArCalorimeter/LArDigitization/python/LArDigitGetter.py @@ -1,9 +1,8 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Getter for LArDigit from LArHit for MC digitization from AthenaCommon.Logging import logging -import traceback from RecExConfig.Configured import Configured class LArDigitGetter (Configured) : diff --git a/LArCalorimeter/LArDigitization/python/LArPileUpToolDefault.py b/LArCalorimeter/LArDigitization/python/LArPileUpToolDefault.py index 0b6903c39efd05b9a4e22d2ff6783d1276038228..b5775cdd06c0fc75beefdafbadb0aee0256a08d6 100644 --- a/LArCalorimeter/LArDigitization/python/LArPileUpToolDefault.py +++ b/LArCalorimeter/LArDigitization/python/LArPileUpToolDefault.py @@ -1,9 +1,8 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -# function to configure LArPileUpTool - -from AthenaCommon.Logging import logging +from AthenaCommon.AlgSequence import AthSequencer +# function to configure LArPileUpTool def LArPileUpToolDefault(useLArFloat=True,isOverlay=False,outputKey='LArDigitContainer_MC',outputKey_DigiHSTruth='LArDigitContainer_DigiHSTruth',name='LArPileUpToolDefault'): if isOverlay: @@ -21,7 +20,7 @@ def LArPileUpToolDefault(useLArFloat=True,isOverlay=False,outputKey='LArDigitCon theTool.DoDigiTruthReconstruction = digitizationFlags.doDigiTruth() - except Exception as configException: + except Exception: import traceback traceback.print_exc() diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/CMakeLists.txt b/LArCalorimeter/LArExample/LArCalibProcessing/CMakeLists.txt index 92fdab3744b9fed02fcc82a2690e7ea360c611b8..a5e2bf05d2166a68785634ace558673e0f0db996 100644 --- a/LArCalorimeter/LArExample/LArCalibProcessing/CMakeLists.txt +++ b/LArCalorimeter/LArExample/LArCalibProcessing/CMakeLists.txt @@ -1,6 +1,4 @@ -################################################################################ -# Package: LArCalibProcessing -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( LArCalibProcessing ) @@ -9,8 +7,6 @@ atlas_subdir( LArCalibProcessing ) find_package( cx_Oracle ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) -atlas_install_runtime( test/LArCalibProcessing_TestConfiguration.xml ) atlas_install_scripts( share/LAr_updateHVcalib_online.sh share/LAr_updateHVcalibNoise.sh ) - diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/python/TimeStampToRunLumi.py b/LArCalorimeter/LArExample/LArCalibProcessing/python/TimeStampToRunLumi.py index 35ae357c7d634d9e8e7382444b5b407a2f0dbde5..9c291d262155d03de0e61c676b49053303b1efb8 100644 --- a/LArCalorimeter/LArExample/LArCalibProcessing/python/TimeStampToRunLumi.py +++ b/LArCalorimeter/LArExample/LArCalibProcessing/python/TimeStampToRunLumi.py @@ -7,8 +7,8 @@ def TimeStampToRunLumi(tmstmp,guard=1,dbInstance="CONDBR2"): db=dbSvc.openDatabase("COOLONL_TRIGGER/"+dbInstance) folder=db.getFolder("/TRIGGER/LUMI/LBTIME") range=guard*24*60*60*1e9 # 2 days in ns - t1=long(tmstmp-range) - t2=long(tmstmp+range) + t1=int(tmstmp-range) + t2=int(tmstmp+range) itr=folder.browseObjects(t1,t2,cool.ChannelSelection.all()) while itr.goToNext(): obj=itr.currentRef() diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/python/extractFolderInfo.py b/LArCalorimeter/LArExample/LArCalibProcessing/python/extractFolderInfo.py index 450f8f078ada7cf05ab643a2b50f9efbf308638c..c7dac55f37a7901bed4ef5aaa468ff0a19a8ac55 100644 --- a/LArCalorimeter/LArExample/LArCalibProcessing/python/extractFolderInfo.py +++ b/LArCalorimeter/LArExample/LArCalibProcessing/python/extractFolderInfo.py @@ -18,7 +18,7 @@ def extractFolderInfo(dbname,globaltag="",checkFolders=[],runnumber=cool.Validit ss=selection.split(",") for s in ss: if len(s)==0:continue - idx=s.find(":"); + idx=s.find(":") if idx==-1: c1=cool.ChannelId(int(s)) c2=c1 @@ -27,9 +27,9 @@ def extractFolderInfo(dbname,globaltag="",checkFolders=[],runnumber=cool.Validit c2=cool.ChannelId(int(s[1+idx:])) #print ("ExtractFolderInfo: Add channel range",c1,"to",c2) if sel is None: - sel=cool.ChannelSelection(c1,c2,cool.ChannelSelection.sinceBeforeChannel); + sel=cool.ChannelSelection(c1,c2,cool.ChannelSelection.sinceBeforeChannel) else: - sel.addRange(c1,c2); + sel.addRange(c1,c2) if sel is None: print ("ExtractFolderInfo: No COOL channel selection given, work on all channels") @@ -44,7 +44,7 @@ def extractFolderInfo(dbname,globaltag="",checkFolders=[],runnumber=cool.Validit if len(checkFolders): takeFolder=False for cf in checkFolders: - if cf[-1] is "/": cf=cf[0:-1] + if cf[-1] == "/": cf=cf[0:-1] idx=len(cf) if fn.startswith(cf) and (idx>=len(fn) or fn[idx]=="/"): takeFolder=True diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/python/extractOFCFlavor.py b/LArCalorimeter/LArExample/LArCalibProcessing/python/extractOFCFlavor.py index 12049a70df4eed9f9f44c02909d00785440bc4fc..035044b1285b02b144267b94b926d27ac345d37b 100644 --- a/LArCalorimeter/LArExample/LArCalibProcessing/python/extractOFCFlavor.py +++ b/LArCalorimeter/LArExample/LArCalibProcessing/python/extractOFCFlavor.py @@ -2,7 +2,6 @@ #!/bin/env python from PyCool import cool -from string import * def getOFCFlavor(): onlineOFCFolder="/LAR/ElecCalibFlat/OFC" @@ -36,7 +35,6 @@ def getOFCFlavor(): db.closeDatabase() OFCOptions=[] - currOFCOption=None db=dbSvc.openDatabase("COOLOFL_LAR/CONDBR2") #db=dbSvc.openDatabase("sqlite://;schema=freshConstants_ofl.db;dbname=CONDBR2") @@ -60,7 +58,7 @@ def getOFCFlavor(): if offlineOFCFolder.endswith("%isamples1phase" % curr_nsamples): try: currentOFCOption=(offlineOFCFolder,pFldr.resolveTag("LARCALIB-RUN2-00")) - except: + except Exception: print ("Could not resolve global tag in folder ",offlineOFCFolder) pass pass diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/CMakeLists.txt b/LArCalorimeter/LArExample/LArConditionsCommon/CMakeLists.txt index d2520bc3599850de066a84d17e4555cabeca1bcd..afa766df1f9c83a4da90fb1fc136fd803e0da958 100644 --- a/LArCalorimeter/LArExample/LArConditionsCommon/CMakeLists.txt +++ b/LArCalorimeter/LArExample/LArConditionsCommon/CMakeLists.txt @@ -1,12 +1,9 @@ -################################################################################ -# Package: LArConditionsCommon -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( LArConditionsCommon ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) atlas_install_scripts( share/LArCellConditions.py share/DumpLArRunFormat.py python/getCurrentFolderTag.py ) - diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py index 6f221c59fa7a21ef044cc0ee37e6491d6e4e71fe..0e893c535c71f133c52605947722f81d5f442014 100644 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ##================================================================================= ## Name: LArCellConditionsAlg.py @@ -7,7 +7,6 @@ ## and print the bad channel status ## ##================================================================================== -from __future__ import print_function __author__="Walter Lampl <walter.lampl@cern.ch>" __doc__ = " An athena-like algorithm to interactivly convert LAr Identifiers and print the bad channel status" @@ -16,17 +15,13 @@ __doc__ = " An athena-like algorithm to interactivly convert LAr Identifiers and from AthenaPython.PyAthena import StatusCode import AthenaPython.PyAthena as PyAthena -import ROOT,cppyy +import ROOT -from ROOT import HWIdentifier, Identifier, Identifier32, IdentifierHash, LArBadChannel, LArBadChanBitPacking +from ROOT import HWIdentifier, Identifier, IdentifierHash, LArBadChannel, LArBadChanBitPacking from ROOT import CaloDetDescrManager from ctypes import c_uint - -from string import * -#from cmath import pi from time import clock - import os class LArCellConditionsAlg(PyAthena.Alg): @@ -98,8 +93,8 @@ class LArCellConditionsAlg(PyAthena.Alg): if self.includeLocation: try: - self.caloDDM = CaloDetDescrManager.instance() ; - except: + self.caloDDM = CaloDetDescrManager.instance() + except Exception: print("Failed to retrieve CaloDDM") return StatusCode.Failure @@ -226,7 +221,7 @@ class LArCellConditionsAlg(PyAthena.Alg): if rep.startswith("SEARCH"): - inp=rep_in[6:].strip(); + inp=rep_in[6:].strip() starttime=clock() self.search(inp) print("seach time %.1f sec" % (clock()-starttime)) @@ -246,7 +241,7 @@ class LArCellConditionsAlg(PyAthena.Alg): print(t.get_identifier32().get_compact()," IsLAr (online)") if self.offlineID.is_lar(t): print(t.get_identifier32().getCompact()," isLAr (offline)") - except: + except Exception: pass @@ -372,7 +367,7 @@ class LArCellConditionsAlg(PyAthena.Alg): if file is not None: file.write(out+"\n") print(out) self.nLinesPrinted=self.nLinesPrinted+1 - if self.nLinesPrinted%40 is 0: + if self.nLinesPrinted%40 == 0: c=input("Press 'q' to quit, 'a' for all ...") if c.upper().startswith("Q"): return True @@ -385,7 +380,7 @@ class LArCellConditionsAlg(PyAthena.Alg): self.nLinesPrinted=0 try: rep=input("Enter Id >") - except: + except Exception: return "" return rep.strip() @@ -416,12 +411,12 @@ class LArCellConditionsAlg(PyAthena.Alg): onlName+="FT "+str(ft)+"("+ftname+")/Slot "+str(slot)+"/Chan "+str(chan) try: - calibLines=self.larCabling.calibSlotLine(chid); + calibLines=self.larCabling.calibSlotLine(chid) if (len(calibLines)): onlName+="/CL" for calib_chid in calibLines: onlName+=" "+str(self.onlineID.channel(calib_chid)) - except: + except Exception: pass onlName+=']' @@ -474,7 +469,7 @@ class LArCellConditionsAlg(PyAthena.Alg): #hex-input try: id_int=int(upInput,16) - except: + except Exception: self._oflErrStr="Can't interpret hexadecimal identifier, got " + upInput return None id=Identifier(id_int << 32) @@ -485,7 +480,7 @@ class LArCellConditionsAlg(PyAthena.Alg): elif upInput.isdigit(): try: id_int=int(upInput,10) - except: + except Exception: self._oflErrStr="Can't interpret decimal identifier, got "+upInput return None id=Identifier(id_int << 32) @@ -495,7 +490,7 @@ class LArCellConditionsAlg(PyAthena.Alg): return None else: #given as expanded ID - tbl=str.maketrans(",:;/\#"," "); + tbl=str.maketrans(r",:;/\#"," ") fields=[] for f in upInput.translate(tbl).split(): if len(f): @@ -532,9 +527,9 @@ class LArCellConditionsAlg(PyAthena.Alg): self._oflErrStr="Can't interpret input: Expected 5 or 6 sub-fields, found "+str(len(fields)) return None - if sidefield.endswith("A") or sidefield.endswith("P") or sidefield.endswith("POS") or sidefield is '1': + if sidefield.endswith("A") or sidefield.endswith("P") or sidefield.endswith("POS") or sidefield == '1': side=1 - elif sidefield.endswith("C") or sidefield.endswith("N") or sidefield.endswith("NEG") or sidefield is '0': + elif sidefield.endswith("C") or sidefield.endswith("N") or sidefield.endswith("NEG") or sidefield == '0': side=-1 else: self._oflErrStr="Can't interpret field for detector side, got "+ sidefield @@ -558,7 +553,7 @@ class LArCellConditionsAlg(PyAthena.Alg): region=int(fields[-3]) eta=int(fields[-2]) phi=int(fields[-1]) - except: + except Exception: self._oflErrStr="Not-numerical input for region, eta or phi" return None @@ -566,7 +561,7 @@ class LArCellConditionsAlg(PyAthena.Alg): #self.offlineID.set_do_checks(True) try: #Build Region ID regid=self.offlineID.region_id(subcalo,bepn,layer,region) - except: + except Exception: self._oflErrStr="Failed to build offline region identifier. Layer/region values inconsistent?" return None @@ -587,7 +582,7 @@ class LArCellConditionsAlg(PyAthena.Alg): try: id=self.offlineID.cell_id(regid,eta,phi) #id=self.offlineID.cell_id(subcalo,bepn,layer,region,eta,phi) - except: + except Exception: self._oflErrStr="Failed to build offline identifier. One or more values out-of-range?" id=None @@ -603,7 +598,7 @@ class LArCellConditionsAlg(PyAthena.Alg): #hex-input try: id_int=int(upInput,16) - except: + except Exception: self._onlErrStr="Can't interpret hexadecimal online identifier, got "+input return None @@ -620,7 +615,7 @@ class LArCellConditionsAlg(PyAthena.Alg): elif upInput.isdigit(): try: id_int=int(upInput,10) - except: + except Exception: self._onlErrStr="Can't interpret decimal online identifier, got "+input return None @@ -634,7 +629,7 @@ class LArCellConditionsAlg(PyAthena.Alg): return None else: #given as expanded ID - tbl=str.maketrans(",:;/\#"," "); + tbl=str.maketrans(r",:;/\#"," ") fields=[] for f in upInput.translate(tbl).split(): if len(f): @@ -671,7 +666,7 @@ class LArCellConditionsAlg(PyAthena.Alg): chan=int(fields[-1]) slot=int(fields[-2]) ft=int(fields[-3]) - except: + except Exception: self._onlErrStr="Not-numerical input for FT slot or channel" return None @@ -697,7 +692,7 @@ class LArCellConditionsAlg(PyAthena.Alg): #self.onlineID.set_do_checks(True) try: id=self.onlineID.channel_Id(bec,side,ft,slot,chan) - except: + except Exception: self._onlErrStr="Failed to build online identifier. One or more values out-of-range?" id=None #self.onlineID.set_do_checks(False) @@ -718,7 +713,7 @@ class LArCellConditionsAlg(PyAthena.Alg): outfile=None layer=None cl=None - tbl=str.maketrans(",:;#="," "); + tbl=str.maketrans(",:;#="," ") tokens=[] for t in input.translate(tbl).split(): if len(t): @@ -743,14 +738,14 @@ class LArCellConditionsAlg(PyAthena.Alg): pos=pos+1 try: e1=float(input[:pos]) - except: + except Exception: print("Expected numerical value, got",input[:pos] ) return None if uplow is not None: try: e2=float(input[pos+1:]) - except: + except Exception: print("Expected numerical value after '+-', got",input[pos+1:]) return None @@ -877,7 +872,7 @@ class LArCellConditionsAlg(PyAthena.Alg): if cl is not None: try: - calibLines=self.larCabling.calibSlotLine(chid); + calibLines=self.larCabling.calibSlotLine(chid) keep=False for foundCLs in calibLines: if self.onlineID.channel(foundCLs) == cl: diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondContChannels.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondContChannels.py index 97a7a3a7fa97b9480de1235cd548562853a5db16..84241f2310aa0e9d2dbcac6919db120594e60d16 100755 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondContChannels.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondContChannels.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # File: LArConditionsCommon/python/LArCondContChannels.py # Author: RD Schaffer (R.D.Schaffer@cern.ch) @@ -7,8 +7,6 @@ # LArConditionsContainer group numbering and COOL channel numbering. # -from __future__ import print_function - import operator class LArCondContChannels(object) : @@ -53,7 +51,7 @@ class LArCondContChannels(object) : def isSubDetectorGrouping(self, type): return type == self.SubDetectorGrouping - def isSubDetectorGrouping(self, type): + def isExtSubDetectorGrouping(self, type): return type == self.ExtSubDetectorGrouping def isFeedThroughGrouping(self, type): diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondDataDumper.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondDataDumper.py index 1a619253b7e15d478895331ef39e456f35ef1813..a25440190ca773725019be2e8023f4ec322027a7 100755 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondDataDumper.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondDataDumper.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration #---------------------------------------------------------------- # class LArCondDataDumper @@ -7,8 +7,7 @@ # #---------------------------------------------------------------- # python for LArConditionsContainer -from __future__ import print_function -from LArRawConditions.LArConditionsContainer import * +from LArRawConditions.LArConditionsContainer import LArConditionsContainer # pyKernel access from PyKernel import PyKernel @@ -144,8 +143,8 @@ class LArCondDataDumper(object) : # Add on extra iterators for the python class try: - TheCont = LArConditionsContainer(typ.__name__) - except: + _ = LArConditionsContainer(typ.__name__) + except Exception: print("Cannot get ",typ.__name__," Container") try : @@ -189,7 +188,7 @@ class LArCondDataDumper(object) : keys.sort() print(" Feedthroughs ",keys ) - except: + except Exception: print(" accessing ",key," failed ") typ, value, traceBack = sys.exc_info() #_logger.error("resetDefinedJobs : %s %s" % (typ,value)) @@ -216,7 +215,7 @@ class LArCondDataDumper(object) : # ignore them for the moment. It may be that there are two # methods, one providing access to individual values, and # another giving a whole vector of values. - except: + except Exception: pass if operator.isNumberType(obj): print("obj type = ",objType.__name__) @@ -247,6 +246,6 @@ class LArCondDataDumper(object) : if attrName.find("m_") == 0 or attrName.find("get") == 0: try: attr = getattr(obj, attrName) - except: + except Exception: print("Could not get attr", attrName) self.getDataMembers(attr, attrName, newTab) diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondFlags.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondFlags.py index 6080809a654ca03e401cda07125637ee8cd1e1ec..c3e16997871eaac15d6763354b5018019bf38185 100644 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondFlags.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCondFlags.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration #====================================================================== # File: LArConditionsCommon/python/LArConditionsFlags.py @@ -70,7 +70,6 @@ larCondFlags.LArCondFolderTags()['/LAR/ElecCalibMC']='LARElecCalibMC-CSC02-K-QGS #======================================================================= from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer from AthenaCommon.JobProperties import jobproperties -from AthenaCommon.AppMgr import ServiceMgr as svcMgr class LArfSamplG4Phys(JobProperty): ### MC tag suffix for G4 Physics (EMV or BERT) @@ -357,7 +356,7 @@ class LArCondFlags(JobPropertyContainer): if theDDV.startswith("Rome"): DDVtype="Rome" has_mphys=False - to_override=True + do_override=True elif theDDV.startswith("DC2") or theDDV.startswith("CTB"): DDVtype="DC2" has_mphys=False @@ -370,7 +369,7 @@ class LArCondFlags(JobPropertyContainer): DDVtype=theDDV[0:12] # for example "ATLAS-CSC-01" try: versionCSC = int(theDDV[10:12]) - except: + except Exception: self._log.error(' Unknown CSC version '+jobproperties.Global.DetDescrVersion()) versionCSC = -1 do_override=True @@ -428,10 +427,9 @@ class LArCondFlags(JobPropertyContainer): elif theDDV.startswith("ATLAS-CSC"): DDVtype=theDDV[0:12] # for example "ATLAS-CSC-01" try: - versionCSC = int(theDDV[10:12]) - except: + int(theDDV[10:12]) + except Exception: self._log.error(' Unknown CSC version '+jobproperties.Global.DetDescrVersion()) - versionCSC = -1 elif theDDV.startswith("ATLAS-GEO"): DDVtype=theDDV[0:9] # use "ATLAS-GEO" @@ -479,7 +477,7 @@ class LArCondFlags(JobPropertyContainer): # a special case: if DDVtype=="ATLAS-Comm" : - if 'LArCosmicFlags' in dir() and hasattr(LArCosmicFlags,'Rel1300xSim') and LArCosmicFlags.Rel1300xSim : + if 'LArCosmicFlags' in dir() and hasattr(LArCosmicFlags,'Rel1300xSim') and LArCosmicFlags.Rel1300xSim : # noqa: F821 # a special fix for rel 13 cosmic MC events DDVtype=DDVtype+"Sim" diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArExtendedFTGrouping.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArExtendedFTGrouping.py index 8d61bb53b2953dad5a05816bbbac0a0a63ab05dc..9e54c75d03f336bade584a42a92f8a2ba808b3ab 100644 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArExtendedFTGrouping.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArExtendedFTGrouping.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from __future__ import print_function @@ -107,7 +107,7 @@ class LArExtendedFTGrouping: extPart+=[p] for p in extPart: - if self._partitions.has_key(p): + if p in self._partitions: for g in gains: for c in self._partitions[p]: chans+=[c+(g*236)] @@ -126,7 +126,6 @@ class LArExtendedFTGrouping: return retVal retVal=str(chans[0]) c1=chans[0] - sep=',' series=False for c2 in chans[1:]: if c1 == c2: @@ -148,7 +147,6 @@ class LArExtendedFTGrouping: def getChannelSelection(self,partitions,gains): - chans=list() return self.makeRange(self.getChannelList(partitions,gains)) def getChannelSelectionAllGains(self,partitions): @@ -181,7 +179,7 @@ class LArExtendedFTGrouping: def channelsPerPartition(self,chans,show=True): class counterElem: def __init__(self,l,n): - self.size=l; + self.size=l self.name=n self.counts=[0,0,0] def inc(self,g): @@ -211,7 +209,7 @@ class LArExtendedFTGrouping: for c in chans: (gain,cs)=self.getGain(c) - if cs == None: + if cs is None: print("ERROR: Unkown channel",c) else: if (c<711): diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArExtendedSubDetGrouping.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArExtendedSubDetGrouping.py index f58d7016eeb756da169308fc7ad987a393d38c43..e8fd71f39a172073fb808ec4abf0ea5cad5d7922 100644 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArExtendedSubDetGrouping.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArExtendedSubDetGrouping.py @@ -1,8 +1,4 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -from __future__ import print_function - -import six - class LArExtendedSubDetGrouping: def __init__(self): @@ -77,7 +73,7 @@ class LArExtendedSubDetGrouping: #Lookup-dict indexed by channel (partition is the payload) self._revLookup=dict() - for (p, chs) in six.iteritems (self._partitions): + for (p, chs) in self._partitions.items(): for c in chs: self._revLookup[c]=p @@ -132,7 +128,6 @@ class LArExtendedSubDetGrouping: return retVal retVal=str(chans[0]) c1=chans[0] - sep=',' series=False for c2 in chans[1:]: if c1 == c2: @@ -154,7 +149,6 @@ class LArExtendedSubDetGrouping: def getChannelSelection(self,partitions,gains): - chans=list() return self.makeRange(self.getChannelList(partitions,gains)) def getChannelSelectionAllGains(self,partitions): @@ -187,7 +181,7 @@ class LArExtendedSubDetGrouping: def channelsPerPartition(self,chans,show=True): class counterElem: def __init__(self,l,n): - self.size=l; + self.size=l self.name=n self.counts=[0,0,0] def inc(self,g): @@ -212,12 +206,12 @@ class LArExtendedSubDetGrouping: print( " ") partCounter=dict() - for (p, chs) in six.iteritems (self._partitions): + for (p, chs) in self._partitions.items(): partCounter[p]=counterElem(len(chs),p) for c in chans: (gain,cs)=self.getGain(c) - if cs == None: + if cs is None: print( "ERROR: Unkown channel",c ) else: if (c<39): diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArHVDB.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArHVDB.py index 71c7b7c78cedc43a2441c0e78965f50a596f33dc..5451ab88542481472caa95d0c9ae1fa99c9345d9 100644 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArHVDB.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArHVDB.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # python fragment to enable HV database access from IOVDbSvc.CondDB import conddb @@ -12,7 +12,6 @@ if not conddb.isMC and not conddb.isOnline: conddb.addFolder("LAR_OFL","/LAR/HVPathologiesOfl/Rvalues",className="AthenaAttributeList") from AthenaCommon.AlgSequence import AthSequencer - from Gaudi.Configuration import DEBUG condseq = AthSequencer("AthCondSeq") from LArRecUtils.LArRecUtilsConf import LArHVIdMappingAlg diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArRunFormat.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArRunFormat.py index 400b82be12e64e4cda4a744120b6236d3acc09fc..443dac576e180c79994aaa9a1265d873e335bc2a 100755 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArRunFormat.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArRunFormat.py @@ -1,8 +1,7 @@ #!/usr/bin/env python -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -from __future__ import print_function from CoolConvUtilities.AtlCoolLib import indirectOpen class LArRunInfo: @@ -64,12 +63,11 @@ def getLArFormatForRun(run,readOracle=True,quiet=False,connstring=None): from IOVDbSvc.CondDB import conddb connstring = "COOLONL_LAR/"+conddb.dbdata - mlog_LRF.info("Connecting to database " + connstring) + mlog_LRF.info("Connecting to database %s", connstring) print ("run=",run) runDB=indirectOpen(connstring,oracle=readOracle) if (runDB is None): mlog_LRF.error("Cannot connect to database %s",connstring) - del mlog_LRF raise RuntimeError("getLArFormatForRun ERROR: Cannot connect to database %s",connstring) format=None nSamples=None @@ -88,14 +86,12 @@ def getLArFormatForRun(run,readOracle=True,quiet=False,connstring=None): runType=payload['runType'] latency=ord(payload['l1aLatency']) firstSample=ord(payload['firstSample']) - except Exception as e: - mlog_LRF.warning("No information in /LAR/Configuration/RunLog for run %i" % run) + except Exception: + mlog_LRF.warning("No information in /LAR/Configuration/RunLog for run %i", run) #mlog_LRF.warning(e) - del mlog_LRF return None runDB.closeDatabase() - mlog_LRF.info("Found info for run %d" % run) - del mlog_LRF + mlog_LRF.info("Found info for run %d", run) return LArRunInfo(nSamples,gainType,latency,firstSample,format,runType) # command line driver for convenience diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/getCurrentFolderTag.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/getCurrentFolderTag.py index 8319038c79aecd3d9a3b46f240a166fd2f532cfa..57680b06e38c665df23fabe8bb5678d157475886 100755 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/getCurrentFolderTag.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/getCurrentFolderTag.py @@ -1,8 +1,7 @@ #!/bin/env python -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -from __future__ import print_function import sys from PyCool import cool @@ -25,18 +24,16 @@ def getCurrentFolderTag(dbname,folderName): f=db.getFolder(folderName) try: current=f.resolveTag(currentGlobal) - except: + except Exception: print('Warning: could not resolve ',currentGlobal,' in db: ',dbname) if "DBR2" in dbname: print('resolving for the global CONDBR2-BLKPA-2014-00') - tmpGlobal='CONDBR2-BLKPA-2014-00' - else: + else: print('resolving for the global COMCOND-BLKPA-RUN1-06') - tmpGlobal='COMCOND-BLKPA-RUN1-06' try: current=f.resolveTag('CONDBR2-BLKPA-2014-00') - except: + except Exception: print('Also not working, giving up') pass pass @@ -44,7 +41,7 @@ def getCurrentFolderTag(dbname,folderName): # NEXT exists, try to resolve it try: next=f.resolveTag(nextGlobal) - except: + except Exception: pass pass diff --git a/LArCalorimeter/LArMonTools/CMakeLists.txt b/LArCalorimeter/LArMonTools/CMakeLists.txt index 16a38e3e8386b1f6aadfa9037d9ee6f834db3a44..1ae69b5dee04e5fbbe13e9bb27add02e24894892 100644 --- a/LArCalorimeter/LArMonTools/CMakeLists.txt +++ b/LArCalorimeter/LArMonTools/CMakeLists.txt @@ -1,23 +1,21 @@ -################################################################################ -# Package: LArMonTools -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( LArMonTools ) # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) +find_package( Boost ) find_package( CLHEP ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 ) +find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO ) # Component(s) in the package: atlas_add_component( LArMonTools src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaMonitoringLib StoreGateLib SGtests Identifier GaudiKernel LArIdentifier LArRawEvent LArRecConditions LArCablingLib LWHists TrigDecisionToolLib CaloConditions AthenaKernel AthenaPoolUtilities xAODEventInfo LArCOOLConditions LArRawConditions LArRecEvent CaloInterfaceLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloGeoHelpers CaloIdentifier EventContainers AthenaMonitoringLib StoreGateLib Identifier GaudiKernel LArIdentifier LArRawEvent LArRecConditions LArCablingLib LWHists TrigDecisionToolLib CaloConditions AthenaKernel AthenaPoolUtilities xAODEventInfo LArCOOLConditions LArRawConditions LArRecEvent CaloInterfaceLib LArElecCalib TrigAnalysisInterfaces ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.txt share/*.py ) diff --git a/LArCalorimeter/LArMonTools/python/evolutionBadChannels.py b/LArCalorimeter/LArMonTools/python/evolutionBadChannels.py index 311d5284025a38ced2f0b205f744878b5d560e3a..e8d2d630e7c6d7bbc65257a40eeebbd8ffacf718 100644 --- a/LArCalorimeter/LArMonTools/python/evolutionBadChannels.py +++ b/LArCalorimeter/LArMonTools/python/evolutionBadChannels.py @@ -59,19 +59,17 @@ def returnPartName(partNb): # Main ================================================================= -import os, sys -import string -from numpy import * +import sys +from numpy import array, zeros -import ROOT from ROOT import gROOT, gDirectory -from ROOT import gStyle, TCanvas, TString -from ROOT import TFile, TTree, TRFIOFile -from ROOT import TH1F,TH2F,TBrowser,TProfile2D,TGraph,TLegend +from ROOT import gStyle, TCanvas +from ROOT import TRFIOFile +from ROOT import TGraph, TLegend gROOT.Reset() gStyle.SetPalette(1) -gStyle.SetCanvasColor(0); +gStyle.SetCanvasColor(0) gStyle.SetOptStat(100110) tag = "UPD4" # UPD4 (used for the bulk) is the default diff --git a/LArCalorimeter/LArROD/CMakeLists.txt b/LArCalorimeter/LArROD/CMakeLists.txt index c53b25571f05363e89f606f199e43a9d8db36461..43880e8e6720385c82ea87f807d753dd70a92e62 100644 --- a/LArCalorimeter/LArROD/CMakeLists.txt +++ b/LArCalorimeter/LArROD/CMakeLists.txt @@ -24,7 +24,7 @@ atlas_add_component( LArROD LINK_LIBRARIES LArRODLib ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) atlas_add_test( LArRawChannelBuilderAlg diff --git a/LArCalorimeter/LArROD/python/LArRODConfig.py b/LArCalorimeter/LArROD/python/LArRODConfig.py index 459637e914854ce3857cd1899479b17e6b984735..3daaad25e1d24f8155002f0ec1428c910be777fa 100644 --- a/LArCalorimeter/LArROD/python/LArRODConfig.py +++ b/LArCalorimeter/LArROD/python/LArRODConfig.py @@ -1,9 +1,8 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -from AthenaCommon import CfgMgr +from AthenaCommon import CfgMgr, CfgGetter def getLArRawChannelBuilder(name="LArRawChannelBuilder" , **kwargs): - from AthenaCommon.AppMgr import ToolSvc, ServiceMgr kwargs.setdefault('LArRawChannelKey', "LArRawChannels") @@ -29,7 +28,6 @@ def getLArRawChannelBuilder(name="LArRawChannelBuilder" , **kwargs): from LArROD.LArRODFlags import larRODFlags kwargs.setdefault('firstSample',larRODFlags.firstSample()) - from AthenaCommon import CfgGetter iovDbSvc=CfgGetter.getService("IOVDbSvc") from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") @@ -48,7 +46,6 @@ def getLArRawChannelBuilder(name="LArRawChannelBuilder" , **kwargs): return CfgMgr.LArRawChannelBuilderAlg(name, **kwargs) def getLArRawChannelBuilder_DigiHSTruth(name="LArRawChannelBuilder_DigiHSTruth" , **kwargs): - from AthenaCommon.AppMgr import ToolSvc, ServiceMgr kwargs.setdefault('LArRawChannelKey', "LArRawChannels_DigiHSTruth") kwargs.setdefault('LArDigitKey', 'LArDigitContainer_DigiHSTruth') diff --git a/LArCalorimeter/LArROD/python/LArRODConfigDb.py b/LArCalorimeter/LArROD/python/LArRODConfigDb.py index 9cedc2e3aa0a398f0ced45d04526fc19ea901f87..ad1f0d7f26151b34c8b17ac9a94ebb610f227a91 100644 --- a/LArCalorimeter/LArROD/python/LArRODConfigDb.py +++ b/LArCalorimeter/LArROD/python/LArRODConfigDb.py @@ -1,5 +1,5 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -from AthenaCommon.CfgGetter import addTool, addAlgorithm +from AthenaCommon.CfgGetter import addAlgorithm addAlgorithm("LArROD.LArRODConfig.getLArRawChannelBuilder", "LArRawChannelBuilder") diff --git a/LArCalorimeter/LArROD/python/LArRawChannelGetter.py b/LArCalorimeter/LArROD/python/LArRawChannelGetter.py index 176efeb7184dfc557d1a3649ab896155d2860707..461bba07c15a9da0ad1bd7d3141f78994cc651ef 100755 --- a/LArCalorimeter/LArROD/python/LArRawChannelGetter.py +++ b/LArCalorimeter/LArROD/python/LArRawChannelGetter.py @@ -2,8 +2,6 @@ # specifies LArRawChannels getting -from __future__ import print_function - from AthenaCommon.Logging import logging from RecExConfig.Configured import Configured @@ -25,7 +23,7 @@ class LArRawChannelGetter ( Configured ) : try: from LArDigitization.LArDigitGetter import LArDigitGetter theLArDigitGetter = LArDigitGetter() - except Exception as configException: + except Exception: mlog.error("could not get handle to LArDigitGetter Quit") import traceback mlog.error(traceback.format_exc()) @@ -187,7 +185,7 @@ class LArRawChannelGetter ( Configured ) : from AthenaCommon.GlobalFlags import globalflags if globalflags.InputFormat() == 'bytestream': - if not "LArRawChannelContainer/LArRawChannels" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: + if "LArRawChannelContainer/LArRawChannels" not in svcMgr.ByteStreamAddressProviderSvc.TypeNames: svcMgr.ByteStreamAddressProviderSvc.TypeNames+=["LArRawChannelContainer/LArRawChannels"] # In the case of DSP monitoring and reading rawchannels, need to give a different name to the LArRawChannels container @@ -196,7 +194,7 @@ class LArRawChannelGetter ( Configured ) : if larRODFlags.doDSP() and larRODFlags.readRawChannels(): #Reading LArRawChannel print ("Reading RawChannels in DSP physics mode") # !!! The name of the LArRawChannels container read from the Bytestream is LArRawChannels_fB !!! - if not "LArRawChannelContainer/LArRawChannels_fB" in svcMgr.ByteStreamAddressProviderSvc.TypeNames: + if "LArRawChannelContainer/LArRawChannels_fB" not in svcMgr.ByteStreamAddressProviderSvc.TypeNames: svcMgr.ByteStreamAddressProviderSvc.TypeNames+=["LArRawChannelContainer/LArRawChannels_fB"] print (svcMgr.ByteStreamAddressProviderSvc.TypeNames) @@ -206,7 +204,7 @@ class LArRawChannelGetter ( Configured ) : try: from AthenaCommon import CfgGetter topSequence += CfgGetter.getAlgorithm("LArRawChannelBuilder", tryDefaultConfigurable=True) - except Exception as cfgException: + except Exception: mlog.error("Failed to retrieve LArRawChannelBuilder. Quit") import traceback mlog.error(traceback.format_exc()) diff --git a/LArCalorimeter/LArROD/python/LArRawChannelGetter_DigiHSTruth.py b/LArCalorimeter/LArROD/python/LArRawChannelGetter_DigiHSTruth.py index 23d74a1258bc3c394f0da799c7081276c2fc6cb6..2d51f047abebeb77373c1c427bc55fb15cff9c74 100755 --- a/LArCalorimeter/LArROD/python/LArRawChannelGetter_DigiHSTruth.py +++ b/LArCalorimeter/LArROD/python/LArRawChannelGetter_DigiHSTruth.py @@ -14,7 +14,6 @@ class LArRawChannelGetter_DigiHSTruth ( Configured ) : from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() - from AthenaCommon.AppMgr import ToolSvc from LArROD.LArRODFlags import larRODFlags from AthenaCommon.GlobalFlags import globalflags @@ -25,11 +24,10 @@ class LArRawChannelGetter_DigiHSTruth ( Configured ) : else: # MC Case try: - from AthenaCommon import CfgGetter from LArRODConfig import getLArRawChannelBuilder_DigiHSTruth theLArRawChannelBuilder_DigiHSTruth = getLArRawChannelBuilder_DigiHSTruth() topSequence += theLArRawChannelBuilder_DigiHSTruth - except Exception as cfgException: + except Exception: import traceback mlog.error(traceback.format_exc()) mlog.error("Failed to retrieve LArRawChannelBuilder_DigiHSTruth. Quit") diff --git a/LArCalorimeter/LArROD/python/LArSCellGetter.py b/LArCalorimeter/LArROD/python/LArSCellGetter.py index 9ffdcdf7c330f71672f55ef20bc91b38cd5c443a..87832c683642278a3e7aa80c6272a598cb0daa88 100755 --- a/LArCalorimeter/LArROD/python/LArSCellGetter.py +++ b/LArCalorimeter/LArROD/python/LArSCellGetter.py @@ -23,7 +23,7 @@ class LArSCellGetter ( Configured ) : try: from LArL1Sim.LArSCL1Getter import LArSCL1Getter theLArSCL1Getter = LArSCL1Getter() - except Exception as configException: + except Exception: import traceback mlog.error(traceback.format_exc()) mlog.error("could not get handle to LArDigitGetter Quit") @@ -32,10 +32,6 @@ class LArSCellGetter ( Configured ) : mlog.error("LArSCL1Getter unusable. Quite") return False - from LArROD.LArRODFlags import larRODFlags - - from AthenaCommon.GlobalFlags import globalflags - # ADC2MeV tool from LArRecUtils.LArADC2MeVSCToolDefault import LArADC2MeVSCToolDefault theADC2MeVSCTool = LArADC2MeVSCToolDefault('LArADC2MeVSCTool') @@ -52,7 +48,7 @@ class LArSCellGetter ( Configured ) : theLArSCellBuilder.LArRawChannelContainerName="LArSuperCells" theLArSCellBuilder.DataLocation="LArDigitSCL1" - self_LArSCellBuilder = theLArSCellBuilder + self._LArSCellBuilder = theLArSCellBuilder topSequence += theLArSCellBuilder from LArRecUtils.LArRecUtilsConf import LArFlatConditionSvc if not hasattr(svcMgr,"LArFlatConditionSvc"): @@ -129,7 +125,7 @@ class LArSCellGetter ( Configured ) : def outputKey(cls): return cls._output[cls._outputType] - def outputType(self): + def outputType(cls): return cls._outputType def outputTypeKey(self): diff --git a/LArCalorimeter/LArRawConditions/CMakeLists.txt b/LArCalorimeter/LArRawConditions/CMakeLists.txt index 92accfdbc3bb88beda0fc13cc64f43956bea8929..4151213915cafbb50157666dad53e5d4380b1f4e 100644 --- a/LArCalorimeter/LArRawConditions/CMakeLists.txt +++ b/LArCalorimeter/LArRawConditions/CMakeLists.txt @@ -20,7 +20,7 @@ atlas_add_dictionary( LArRawConditions2Dict LINK_LIBRARIES LArRawConditions ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) atlas_add_test( LArConditionsContainerDB_test