From 8a2be70ed98dedc44182b1118a6b04ffcc1dec3c Mon Sep 17 00:00:00 2001 From: Tamara Vazquez Schroeder <tamara.vazquez.schroeder@cern.ch> Date: Sun, 15 Jul 2018 18:37:15 +0000 Subject: [PATCH] Merge branch 'tilecal-for-21.0' into '21.0' Updates in python scripts to read calibration constants from COOL See merge request atlas/athena!12677 (cherry picked from commit 73b2e80dc5a83682666413190c1d312c76ca51d0 [formerly 9ca99bf981188377bdd07ceac0a0457337143b79]) ea28a6a6 Minor update in python scripts which dump conditions data from COOL 51243e34 setting back executable flag for all python scripts Former-commit-id: db4e206a830998e5490d8148c018e1170a483ce7 --- .../python/TileBchTools.py | 2 +- .../python/TileCalibDefaultWriter.py | 2 +- .../python/TileCalibLogger.py | 2 +- .../python/TileCalibTools.py | 2 +- .../python/TileCellTools.py | 35 ++++++--- .../python/TileCoolCommentsReader.py | 2 +- .../TileCalibBlobPython/python/__init__.py | 2 +- .../TileCalibBlobPython/share/BchCleanup.py | 2 +- .../share/CheckTagAssociation.py | 2 +- .../share/Example_ReadSampleNoise.py | 2 +- .../share/PlotCalibFromCool.py | 2 +- .../share/PlotPulseshapeFromCool.py | 2 +- .../share/ReadBadBitsFromCool.py | 2 +- .../share/ReadBchFromCool.py | 2 +- .../share/ReadCalibFromCool.py | 2 +- .../share/ReadCellNoiseFromCool.py | 26 ++++--- .../share/ReadCellNoiseFromCoolCompare.py | 78 ++++++++++++------- .../share/ReadFloatFromCool.py | 2 +- .../share/ReadFromCoolCompare.py | 6 +- .../share/ReadLUTFromCool.py | 2 +- .../share/ReadNoiseFromCool.py | 2 +- .../share/ReadOfcFromCool.py | 2 +- .../share/ReadTripsProbsFromCool.py | 2 +- .../share/TileCalibBlobPython_Ofl_Onl.py | 2 +- .../TileCalibBlobPython_badChannelExample.py | 2 +- ...ileCalibBlobPython_writeAutoCrFromASCII.py | 2 +- .../TileCalibBlobPython_writeBchFromASCII.py | 2 +- .../share/TileCalibBlobPython_writeBchM7.py | 2 +- .../TileCalibBlobPython_writeBchOnlM8.py | 2 +- .../TileCalibBlobPython_writeDefaultCs.py | 2 +- ...ileCalibBlobPython_writeDefaultOnlNoise.py | 2 +- .../TileCalibBlobPython_writeDefaults.py | 2 +- ...alibBlobPython_writeIntegratorFromASCII.py | 2 +- ...bBlobPython_writeMuonReceiverPulseShape.py | 2 +- .../share/TileCalibBlobPython_writeOfc.py | 2 +- .../TileCalibBlobPython_writePedFromASCII.py | 2 +- ...eCalibBlobPython_writeTileMuIdFromASCII.py | 2 +- ...ileCalibBlobPython_writeTimingFromASCII.py | 2 +- ...alibBlobPython_writeTripsProbsFromASCII.py | 2 +- .../share/TileSynchronizeBch.py | 2 +- .../share/TileSynchronizeOnlBchWithOfl.py | 2 +- .../share/WriteBchToCool.py | 2 +- .../share/WriteCalibToCool.py | 2 +- .../share/WriteCellNoiseToCool.py | 13 +++- .../share/integrator_ascii2db.py | 2 +- .../share/integrator_readDb.py | 2 +- .../share/maskDeadModules.py | 2 +- .../share/testcurrent_tag.py | 2 +- 48 files changed, 150 insertions(+), 94 deletions(-) mode change 100755 => 100644 TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py index 711ca20c2ab..41e4e94074f 100644 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # TileBchTools.py # Nils Gollub <nils.gollub@cern.ch>, 2007-12-17 # diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py index 140a2a1fdcf..fd953a16134 100644 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # TileCalibDefaultWriter.py # Nils Gollub <nils.gollub@cern.ch>, 2007-11-23 # modified Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-07-09 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibLogger.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibLogger.py index fee7f8dc972..b75e68f2565 100644 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibLogger.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibLogger.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # TileCalibLogger.py # Nils Gollub <nils.gollub@cern.ch>, 2007-11-29 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py index cdc42f4be12..2a1a4099680 100644 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # TileCalibTools.py # Nils Gollub <nils.gollub@cern.ch>, 2007-11-23 # Carlos Solans <carlos.solans@cern.ch>, 2012-10-19 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py index 33351942577..723f4874fcc 100644 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration import bisect @@ -7,10 +7,11 @@ class TileCellHashMgr(): This class ised to convert cell hash to cell name """ #____________________________________________________________________ - def __init__(self, geometry='Default'): + def __init__(self, geometry='Default', cabling='RUN2'): #=== initialize all arrays self._geometry=geometry + self._cabling=cabling if geometry == "UpgradeABC": self._cellNames=[ ["A-1","A-2","A-3","B-1","C-1","A-4","A-5","A-6","A-7","B-2","C-2","A-8","A-9","D-1","A-10","A-11","B-3","C-3","A-12","A-13","A-14","A-15","B-4","C-4", @@ -108,11 +109,19 @@ class TileCellHashMgr(): if index==0 and ((part==4 and module==18) or (part==5 and module==15)): index+=8 if index==0 and (module==14 or module==15 or module==18 or module==19): index+=6 if index==1 and ((module>=39 and module<=42) or (module>=55 and module<=58)): index+=6 - if index==2 and (module==7 or module==25 or module==44 or module==53): index+=7 - if index==2 and (module==8 or module==24 or module==43 or module==54): index+=8 - if part==4: - if index==2 and (module==28 or module==31 or module==35 or module==38): index+=7 - if index==2 and (module==29 or module==32 or module==34 or module==37): index+=9 + if index==2 and (self._cabling=='RUN2' or self._cabling=='RUN2a'): + if part==4: # E4' in EBC + if module==28 or module==31 or module==35 or module==38: index+=7 # E1m + if module==29 or module==32 or module==34 or module==37: index+=9 # E4' + if module==7 or module==25 or module==44 or module==53: index+=7 # E1m + if module==8 or module==24 or module==43 or module==54: index+=8 # MBTS + if self._cabling=='RUN2a': + if part==5: # EBA + if module==4 or module==21 or module==47 or module==60: index+=7 # E1m + if module==3 or module==20 or module==46 or module==59: index+=8 # MBTS + if part==4: # EBC + if module==4 or module==18 or module==47 or module==60: index+=7 # E1m + if module==3 or module==19 or module==46 or module==59: index+=8 # MBTS return (modName,self._cellNames[part][index]) @@ -131,9 +140,15 @@ class TileCellHashMgr(): if index==0 and ((part==4 and module==18) or (part==5 and module==15)): index+=8 if index==0 and (module>=15 and module<=18): index+=6 if index==1 and ((module>=39 and module<=42) or (module>=55 and module<=58)): index+=6 - if index==2 and (module==7 or module==8 or module==25 or module==24 or module==44 or module==43 or module==53 or module==54): index+=7 - if part==4: - if index==2 and (module==28 or module==29 or module==31 or module==32 or module==35 or module==34 or module==38 or module==37): index+=7 + if index==2 and (self._cabling=='RUN2' or self._cabling=='RUN2a'): + if part==4: # E4' in EBC + if module==28 or module==29 or module==31 or module==32 or module==35 or module==34 or module==38 or module==37: index+=7 # E1m or E4' + if module==7 or module==8 or module==25 or module==24 or module==44 or module==43 or module==53 or module==54: index+=7 # E1m or MBTS + if self._cabling=='RUN2a': + if part==5: # EBA + if module==4 or module==3 or module==21 or module==20 or module==47 or module==46 or module==60 or module==59: index+=7 # E1m or MBTS + if part==4: # EBC + if module==4 or module==3 or module==18 or module==19 or module==47 or module==46 or module==60 or module==59: index+=7 # E1m or MBTS return self._cellNames[part][index] diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py old mode 100755 new mode 100644 index 9d843a9f8af..a15935c7dd5 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCoolCommentsReader.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration """ Migrated to the TileCalibWeb package diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/__init__.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/__init__.py index 584a051f0a8..087661f9fae 100644 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/__init__.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # File TileCalibBlobPython/python/__init__.py # Author: nils.gollub@cern.ch diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py index 6e77e92267d..588f8653e0d 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # File: BchCleanup.py # Package: TileCalibBlobPython diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py index 4cec58414eb..eeef9425f30 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # CheckTagAssociation.py # Andrei Artamonov 2012 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py index 57e8af227b8..08c14496028 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # Example_ReadSampleNoise.py # Nils Gollub <nils.gollub@cern.ch>, 2008-06-16 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py index e5037427b78..28502519ed6 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # PlotCalibFromCool.py # Using Part of ReadCalibfromCool.py to plot constants diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py index aa2e1b85ba6..198156c78db 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # PlotPulseshapeFromCool.py # Nils Gollub <nils.gollub@cern.ch>, 2008-06-05 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py index e0d480da2c4..6b72a53c9c9 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadBadBitsFromCool.py --schema='COOLOFL_TILE/CONDBR2' --folder='OFL02' --tag='UPD4' # Sanya Solodkov 2011-07-15 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py index f8989191fc4..32767d403c7 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadBchFromCool.py --schema='COOLOFL_TILE/CONDBR2' --folder='OFL02' --tag='UPD4' # Sanya Solodkov 2011-07-15 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py index 11b2d15c56c..107302eab93 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadCalibFromCool.py # Andrei Artamonov 2009-11-03 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py index fc7b8efdf09..7e8d7b12d6b 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadFloatFromCaloCool.py # Carlos.Solans <Carlos.Solans@cern.ch> @@ -91,11 +91,6 @@ import cppyy from CaloCondBlobAlgs import CaloCondTools, CaloCondLogger from TileCalibBlobPython import TileCalibTools from TileCalibBlobPython import TileCellTools -hashMgr=None -hashMgrDef=TileCellTools.TileCellHashMgr() -hashMgrA=TileCellTools.TileCellHashMgr("UpgradeA") -hashMgrBC=TileCellTools.TileCellHashMgr("UpgradeBC") -hashMgrABC=TileCellTools.TileCellHashMgr("UpgradeABC") #=== get a logger log = CaloCondLogger.getLogger("ReadCellNoise") @@ -143,6 +138,19 @@ elif schema=='MC': # shortcut for COOLOFL_TILE/OFLP200 or COOLOFL_LAR/OFLP200 folderPath='/TILE/OFL02/NOISE/CELL' if tag=='UPD4': tag='OFLCOND-RUN12-SDR-31' # change default to tag used in MC15 +if run<222222 or 'COMP200' in schema: + cabling = 'RUN1' +else: + if ('OFLP200' in schema and run>=310000) or run>=343000: + cabling = 'RUN2a' + else: + cabling = 'RUN2' +hashMgr=None +hashMgrDef=TileCellTools.TileCellHashMgr(cabling=cabling) +hashMgrA=TileCellTools.TileCellHashMgr("UpgradeA") +hashMgrBC=TileCellTools.TileCellHashMgr("UpgradeBC") +hashMgrABC=TileCellTools.TileCellHashMgr("UpgradeABC") + db = CaloCondTools.openDbConn(schema, "READONLY") if folderPath.startswith('/TILE') or tag=='UPD1' or tag=='UPD4' or 'COND'in tag: @@ -213,7 +221,7 @@ if brief or doubl: dm=" " for i in xrange(indexmax): names += [""] else: - name1 = ["Noise cell ", "gain ","0.00"] + name1 = ["Noise cell ", "gain ","0.00 "] names = ["RMS ", "pileup ", "RMS1 ", "RMS2 ", "Ratio "] for i in xrange(len(names),indexmax): names += ["c"+str(i)+" "] dm="\t" @@ -224,10 +232,10 @@ for cell in xrange(cellmin,cellmax): msg="%s%4d %s%d\t" % ( name1[0], cell, name1[1], gain) for index in xrange(indexmin,indexmax): v=blobFlt.getData(cell, gain, index) - if doubl: msg += "%s%s%s" % (names[index],"{0:<15.10g}".format(v),dm) + if doubl: msg += "%s%s%s" % (names[index],"{0:<15.10g}".format(v).ljust(15),dm) elif v<5.e-7: msg += "%s%s%s" % (names[index],name1[2],dm) elif v<1: msg += "%s%8.6f%s" % (names[index],v,dm) - else: msg += "%s%s%s" % (names[index],"{0:<8.7g}".format(v),dm) + else: msg += "%s%s%s" % (names[index],"{0:<8.7g}".format(v).ljust(8),dm) print msg #=== close DB diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py index 778a67ebb38..0b9d11f8c10 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadCellNoiseFromCoolCompare.py # based on ReadCellNoiseFromCool.py and ReadFromCoolCompare.py @@ -25,17 +25,19 @@ def usage(): print "-t2, --tag2= specify tag2 to use, f.i. UPD1 or UPD4 or tag suffix like 14TeV-N200_dT50-01" print "-r2, --run2= specify 2-nd run number, by default uses latest iov" print "-l2, --lumi2= specify 2-nd lumi block number, default is 0" - print "-m, --maxdiff= specify an absolute maximal difference to compare constants" + print "-m, --maxdiff= specify an absolute maximal difference to compare constants" print "-m2, --maxdiffpercent= specify the maximal difference in percents to compare constants" print "-n, --channel= specify cool channel to read (48 by defalt)" print "-c, --cell= specify cell hash (0-5183), default is -1, means all cells" print "-g, --gain= specify gain to print (0-3), default is -1, means all gains" print "-i, --index= specify parameter index (0-4), default is -1, means all parameters" + print "-z, --zero= zero threshold - treat values in DB below this threshold as zeros" + print "-w, --wide wide format - print all values per cell in one line" print "-b, --brief print only numbers without character names" print "-d, --double print values with double precision" -letters = "hs:t:f:r:l:s2:t2:f2:r2:l2:m:m2:n:c:g:i:bd" -keywords = ["help","schema=","tag=","folder=","run=","lumi=","schema2=","tag2=","folder2=","run2=","lumi2=","maxdiff=","maxdiffpercent=","channel=","cell=","gain=","index=","brief","double"] +letters = "hs:t:f:r:l:s2:t2:f2:r2:l2:m:m2:n:c:g:i:z:wbd" +keywords = ["help","schema=","tag=","folder=","run=","lumi=","schema2=","tag2=","folder2=","run2=","lumi2=","maxdiff=","maxdiffpercent=","channel=","cell=","gain=","index=","zero=","wide","brief","double"] try: opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords) @@ -63,6 +65,8 @@ gain = -1 index = -1 brief = False doubl = False +multi = True +zthr = 5e-7 for o, a in opts: if o in ("-s","--schema"): @@ -99,6 +103,10 @@ for o, a in opts: maxdiff = float(a) elif o in ('--maxdiffpercent'): maxdiffpercent = float(a) + elif o in ("-z","--zero"): + zthr = float(a) + elif o in ("-w","--wide"): + multi = False elif o in ("-b","--brief"): brief = True elif o in ("-d","--double"): @@ -128,7 +136,6 @@ import cppyy from CaloCondBlobAlgs import CaloCondTools, CaloCondLogger from TileCalibBlobPython import TileCalibTools from TileCalibBlobPython import TileCellTools -hashMgr=TileCellTools.TileCellHashMgr() #=== get a logger log = CaloCondLogger.getLogger("ReadCellNoise") @@ -177,6 +184,15 @@ elif schema=='MC': # shortcut for COOLOFL_TILE/OFLP200 or COOLOFL_LAR/OFLP200 folderPath='/TILE/OFL02/NOISE/CELL' if tag=='UPD4': tag='IOVDEP-02' # change default to tag used in DC14 +if run<222222 or 'COMP200' in schema: + cabling = 'RUN1' +else: + if ('OFLP200' in schema and run>=310000) or run>=343000: + cabling = 'RUN2a' + else: + cabling = 'RUN2' +hashMgr=TileCellTools.TileCellHashMgr(cabling=cabling) + db = CaloCondTools.openDbConn(schema, "READONLY") if folderPath.startswith('/TILE') or tag=='UPD1' or tag=='UPD4' or 'COND'in tag: @@ -298,14 +314,11 @@ log.info("From DB: ncell: %d ngain %d index nval %d" % (ncell, ngain, nval)) if brief or doubl: name1 = ["","","0.0 "] - names = [] - - + names = ["S0 ", "Pl ", "S1 ", "S2 ", "Ra "] dm=" " - for i in xrange(indexmax): names += [""] else: - name1 = ["Noise cell ", "gain ","0.00"] - names = ["RMS ", "pileup ", "RMS1 ", "RMS2 ", "Ratio "] + name1 = ["Noise cell ", "gain ","0.00 "] + names = [" RMS ", "pileup ", " RMS1 ", " RMS2 ", " Ratio "] for i in xrange(len(names),indexmax): names += ["c"+str(i)+" "] dm="\t" for cell in xrange(cellmin,cellmax): @@ -313,27 +326,36 @@ for cell in xrange(cellmin,cellmax): name1[0] = "%s %6s hash " % hashMgr.getNames(cell) for gain in xrange(gainmin,gainmax): msg="%s%4d %s%d\t" % ( name1[0], cell, name1[1], gain) + l0=len(msg) + if multi: dm="\n"+msg for index in xrange(indexmin,indexmax): v=blobFlt.getData(cell, gain, index) v2=blobFlt2.getData(cell, gain, index) - dv12 = abs(v - v2) - if v == 0: - dv12percent=0 + dv12 = v - v2 + if abs(dv12)<zthr: + dv12 = 0 + if v2 == 0: + if v==0: dp12=0 + else: dp12=100 else: - dv12percent=dv12*100/v - - #if doubl: msg += "%s%s%s" % (names[index],"{0:<15.10g}".format(v),dm) - #elif v<5.e-7: msg += "%s%s%s" % (names[index],name1[2],dm) - #elif v<1: msg += "%s%8.6f%s" % (names[index],v,dm) - #else: msg += "%s%s%s" % (names[index],"{0:<8.7g}".format(v),dm) - - if abs(dv12) > maxdiff and abs(dv12percent) > maxdiffpercent: - if doubl: msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],"{0:<15.10g}".format(v),"{0:<15.10g}".format(v2),"{0:<15.10g}".format(dv12),"{0:<15.10g}".format(dv12percent),dm) - elif v<5.e-7: msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],name1[2],"{0:<8.7g}".format(v2),"{0:<8.7g}".format(dv12),"{0:<8.7g}".format(dv12percent),dm) - elif v<1: msg += "%s v1 %8.6f v2 %8.6f diff %8.6f diffpercent %8.6f%s" % (names[index],v,v2,dv12,dv12percent,dm) - else: msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],"{0:<8.7g}".format(v),"{0:<8.7g}".format(v2),"{0:<8.7g}".format(dv12),"{0:<8.7g}".format(dv12percent),dm) - - print msg + dp12=dv12*100/v2 + + if abs(dv12) > maxdiff and abs(dp12) > maxdiffpercent: + if doubl: + s1 = "{0:<14.9g}".format(v) if v<0 else "{0:<15.10g}".format(v) + s2 = "{0:<14.9g}".format(v2) if v2<0 else "{0:<15.10g}".format(v2) + s3 = "{0:<14.9g}".format(dv12) if dv12<0 else "{0:<15.10g}".format(dv12) + s4 = "{0:<14.9g}".format(dp12) if dp12<0 else "{0:<15.10g}".format(dp12) + msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],s1.ljust(15),s2.ljust(15),s3.ljust(15),s4.ljust(15),dm) + else: + s1 = name1[2] if abs(v)<zthr else "%8.6f" % v if abs(v)<1 else "{0:<8.7g}".format(v).ljust(8) + s2 = name1[2] if abs(v2)<zthr else "%8.6f" % v2 if abs(v2)<1 else "{0:<8.7g}".format(v2).ljust(8) + s3 = name1[2] if abs(dv12)<zthr else "%8.6f" % dv12 if abs(dv12)<1 else "{0:<8.7g}".format(dv12).ljust(8) + s4 = name1[2] if abs(dp12)<zthr else "%8.6f" % dp12 if abs(dp12)<1 else "{0:<8.7g}".format(dp12).ljust(8) + msg += "%s v1 %s v2 %s diff %s diffpercent %s%s" % (names[index],s1[:8],s2[:8],s3[:8],s4[:8],dm) + + if len(msg)>l0: + print msg[:len(msg)-len(dm)] #=== close DB db.closeDatabase() diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py index 2bb32c312f9..d0ecaf9f28d 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadFloatFromCool.py # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-11-18 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py index 1aaa7525781..61a61d6f756 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadFromCoolCompare.py # (Based on A. Solodkov's script ReadCsFromCool.py) @@ -234,7 +234,9 @@ os2 = flt2.getObjSizeByte()/4 if (os <> os2) or (ot <> ot2): log.error("Object sizes (%s vs %s) or types (%s vs %s) are different" % (os, os2, ot, ot2)) - sys.exit() + answ=raw_input(' continue anyway? (y/n)') + if (answ <> 'y'): + sys.exit() v =[] v2=[] diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py index 37a39d032dd..e5f05651145 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadLUTFromCool.py # Lukas Pribyl <lukas.pribyl@cern.ch>, 2010-03-18 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py index dd88f887eaa..dc41b7d7c95 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadNoiseFromCool.py # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-08-05 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py index 244f0a39e63..01a12f6c4df 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ReadOfcFromCool.py # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-07-25 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py index 663ac732d7f..65b337a710b 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # ./ReadTripsProbsFromCool.py --schema='COOLOFL_TILE/OFLP200' --folder='OFL02' --tag='UPD4' diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_Ofl_Onl.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_Ofl_Onl.py index adfa6a67621..6e8cc5e720f 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_Ofl_Onl.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_Ofl_Onl.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_Ofl_Onl.py # Lukas Pribyl diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py index a51626d9770..1a8d7c10c03 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_badChannelExample.py # Nils Gollub <nils.gollub@cern.ch>, 2007-12-19 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py index 6d1a15df96b..baa526e83b3 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writePedFromASCII.py # Nils Gollub <nils.gollub@cern.ch>, 2008-03-03 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py index e1dc3674de0..19c9e2ca7a9 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_badChannelExample.py # Nils Gollub <nils.gollub@cern.ch>, 2007-12-19 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py index 61d1bb7b11b..44b46435b65 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeBchM7.py # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-05-29 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py index cbca2647131..7323dbb63b2 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeBchOnlM8.py # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-07-14 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py index 4226ee450a4..771b50277e4 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeDefaults.py # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py index 9f8e0c8a467..8f94bc2b235 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeDefaults.py # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py index 8dd20ddfff7..d6b5686f418 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeDefaults.py # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py index 269dde37416..94842f67a81 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeIntegratorFromASCII.py # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-12-05 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py index 8b26af2c366..e6fc4939da7 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # from TileCalibBlobPython import TileCalibTools, TileCalibDefaultWriter diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py index 48f18d11fed..b0389f126d1 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeOfc.py # Nils Gollub <nils.gollub@cern.ch>, 2007-11-19 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py index 3887f035205..90408a3f5d6 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writePedFromASCII.py # Nils Gollub <nils.gollub@cern.ch>, 2008-03-03 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py index 9b5dc304a92..c33b29a9f15 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeTileMuIdFromASCII.py # Lukas Pribyl <lukas.pribyl@cern.ch>, 2009-04-29 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py index 433645fa6a3..81692cdb142 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_writeTimingFromASCII.py # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py index f95ea8723b7..e2173b64f11 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # import getopt,sys,os,string diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py index 2c402012f42..d7d411d2780 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileSynchronizeBch.py <TAG1> <TAG2> <MASKONLY> <RUN1> <RUN2> # sanya.solodkov@cern.ch July 2016 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py index 9d406889d43..c35bf7452c2 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileSynchronizeOnlBchWithOfl.py <TAG> <RUN> # lukas.pribyl@cern.ch March 2010 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py index bfb3be5a21a..4e8193a972c 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # WriteBchToCool.py # Alexander Solodkov <Sanya.Solodkov@cern.ch>, 2014-09-09 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py index 59205bf6416..0c378c14238 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # WriteCalibToCool.py # Sanya Solodkov 2014-08-29 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py index 2d95f6c9286..0838e1a49cb 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # File: WriteCellNoiseToCool.py # Purpose: Manual update of cell noise constants from ascii file @@ -163,8 +163,17 @@ import cppyy from CaloCondBlobAlgs import CaloCondTools from TileCalibBlobPython import TileCalibTools from TileCalibBlobPython import TileCellTools +if run<0: + cabling = 'RUN2a' +elif run<222222 or 'COMP200' in ischema: + cabling = 'RUN1' +else: + if ('OFLP200' in ischema and run>=310000) or run>=343000: + cabling = 'RUN2a' + else: + cabling = 'RUN2' hashMgr=None -hashMgrDef=TileCellTools.TileCellHashMgr() +hashMgrDef=TileCellTools.TileCellHashMgr(cabling=cabling) hashMgrA=TileCellTools.TileCellHashMgr("UpgradeA") hashMgrBC=TileCellTools.TileCellHashMgr("UpgradeBC") hashMgrABC=TileCellTools.TileCellHashMgr("UpgradeABC") diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py index 0c4e2996ea4..78d3a8540dd 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # TileCalibBlobPython_integratorExample # Nils Gollub <nils.gollub@cern.ch>, 2008-02-07 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py index 65daa957542..a0e8e6cf7d2 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # integrator_readDb.py # Nils Gollub <nils.gollub@cern.ch>, 2008-02-07 diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py index eeba99e46f8..4032668ea9a 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # File: maskDeadModules.py # Purpose: Mask a dead module over a range. A new IOV gets created in the process. diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py index 9ba79b1f032..3681924bb9e 100755 --- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py +++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py @@ -1,6 +1,6 @@ #!/bin/env python -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration # # testcurrent_tag.py #================================================== -- GitLab