diff --git a/LArCalorimeter/LArCabling/python/LArCablingConfig.py b/LArCalorimeter/LArCabling/python/LArCablingConfig.py index a470f8b0462517fb3a015316f9392d6d979cda06..1a8ddf0bfb8a3d2d4a532417650d144008383979 100644 --- a/LArCalorimeter/LArCabling/python/LArCablingConfig.py +++ b/LArCalorimeter/LArCabling/python/LArCablingConfig.py @@ -24,7 +24,7 @@ def _larCablingCfg(configFlags,algo,folder): ft=tagsperFolder[folder] folderwithtag=folder+"<tag>"+ft+"</tag>" else: - db='LAR' + db='LAR_ONL' folderwithtag=folder result.addCondAlgo(algo(ReadKey=folder),primary=True) diff --git a/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py b/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py index de0da87968640bb6e611c1016fcc53c31f089e72..fe1bdbc1aa1bdc936d026f9b9ef820ed18c02843 100644 --- a/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py +++ b/LArCalorimeter/LArConfiguration/python/LArElecCalibDBConfig.py @@ -52,6 +52,7 @@ def LArElecCalibDBRun2Cfg(ConfigFlags,condObjs): "MphysOverMcal":("LArMphysOverMcal","/LAR/ElecCalibFlat/MphysOverMcal",LArMphysOverMcalCondAlg), "OFC":("LArOFC","/LAR/ElecCalibFlat/OFC",LArOFCCondAlg), "Shape":("LArShape","/LAR/ElecCalibFlat/Shape",LArShapeCondAlg), + "HVScaleCorr":("LArHVScaleCorr","/LAR/ElecCalibFlat/HVScaleCorr",LArHVScaleCorrCondFlatAlg), } result=IOVDbSvcCfg(ConfigFlags) @@ -94,6 +95,7 @@ def LArElecCalibDBRun1Cfg(ConfigFlags,condObjs): "Pedestal":("/LAR/ElecCalibOnl/Pedestal<key>LArPedestal</key>","LAR_ONL""LArPedestalComplete"), "uA2MeV":("/LAR/ElecCalibOFl/uA2MeV/Symmetry","LAr_OFL", "LAruA2MeVMC"), "MphysOverMcal":("/LAR/ElecCalibOfl/MphysOverMcal/RTM","LAr_OFL","LArMphysOverMcalComplete"), + "HVScale":("/LAR/ElecCalibOnl/HVScaleCorr","LAR_ONL","LArHVScaleCorrComplete"), "OFC":("/LAR/ElecCalibOfl/OFC/PhysWave/RTM/"+ ConfigFlags.LAr.OFCShapeFolder if len(ConfigFlags.LAr.OFCShapeFolder)>0 else "5samples1phase","LAr_OFL","LArOFCComplete"), "Shape":("/LAR/ElecCalibOfl/Shape/RTM/"+ ConfigFlags.LAr.OFCShapeFolder if len(ConfigFlags.LAr.OFCShapeFolder)>0 else "5samples1phase","LAr_OFL","LArShapeComplete"), } @@ -107,7 +109,7 @@ def LArElecCalibDBRun1Cfg(ConfigFlags,condObjs): except KeyError: raise ConfigurationError("No conditions data %s found for Run-1 data" % condData) - result.merge(addFolderList(ConfigFlags,folderlist)) + result.merge(addFolderList(ConfigFlags,folderlist)) return result diff --git a/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgConfig.py b/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgConfig.py index d807f443915e192d8a28d2b8bc56dfcdc5ab634a..b7b442960ab91c8859d18c83776bd37f515e5a35 100644 --- a/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgConfig.py +++ b/LArCalorimeter/LArRecUtils/python/LArADC2MeVCondAlgConfig.py @@ -2,27 +2,32 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -def LArADC2MeVCondAlgDefault(configFlags): +def LArADC2MeVCondAlgCfg(configFlags): from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg from LArRecUtils.LArRecUtilsConf import LArADC2MeVCondAlg + from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDbCfg + from LArGeoAlgsNV.LArGMConfig import LArGMCfg result=ComponentAccumulator() result.merge(LArOnOffIdMappingCfg(configFlags)) + result.merge(LArGMCfg(configFlags)) #Needed for identifier helpers theADC2MeVCondAlg=LArADC2MeVCondAlg() isMC=configFlags.Input.isMC - if isMC: + requiredConditons=["Ramp","DAC2uA","uA2MeV"] if not configFlags.LAr.hasMphys(): theADC2MeVCondAlg.LArMphysOverMcalKey="" #No MphysOVerMcal else: theADC2MeVCondAlg.LArMphysOverMcalKey="LArMphysOverMcalSym" + requiredConditons+=["MphysOverMcal",] if not larCondFlags.hasHVCorr(): theADC2MeVCondAlg.LArHVScaleCorrKey="" - + else: + requiredConditons+=["HVScale",] theADC2MeVCondAlg.LAruA2MeVKey="LAruA2MeVSym" theADC2MeVCondAlg.LArDAC2uAKey="LArDAC2uASym" theADC2MeVCondAlg.LArRampKey="LArRampSym" @@ -30,9 +35,36 @@ def LArADC2MeVCondAlgDefault(configFlags): theADC2MeVCondAlg.UseFEBGainTresholds=False else: # not MC: - from LArRecUtils.LArFebConfigCondAlgDefault import LArFebConfigCondAlgDefault - LArFebConfigCondAlgDefault() - + requiredConditons=["Ramp","DAC2uA","uA2MeV","MphysOverMcal","HVScaleCorr"] + from LArRecUtils.LArFebConfigCondAlgConfig import LArFebConfigCondAlgCfg + result.merge(LArFebConfigCondAlgCfg(configFlags)) - result.addCondAlg(theADC2MeVCondAlg,primary=True) + result.merge(LArElecCalibDbCfg(configFlags,requiredConditons)) + result.addCondAlgo(theADC2MeVCondAlg,primary=True) return result + + +if __name__=="__main__": + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaCommon.Logging import log + from AthenaCommon.Constants import DEBUG + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + log.setLevel(DEBUG) + + from AthenaConfiguration.TestDefaults import defaultTestFiles + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.lock() + + cfg=ComponentAccumulator() + from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg + cfg.merge( TrigBSReadCfg(ConfigFlags) ) + + from LArGeoAlgsNV.LArGMConfig import LArGMCfg + cfg.merge(LArGMCfg(ConfigFlags)) + + + cfg.merge(LArADC2MeVCondAlgCfg(ConfigFlags)) + f=open("LArADC2MeVCondAlgo.pkl","w") + cfg.store(f) + f.close() diff --git a/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgConfig.py b/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgConfig.py index ae5aeec865f4bd4c24655a0aeabc56af6cdde92b..0ebe0ee66096049a962f7a68d83bbc0ea98cfecb 100644 --- a/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgConfig.py +++ b/LArCalorimeter/LArRecUtils/python/LArFebConfigCondAlgConfig.py @@ -3,7 +3,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from IOVDbSvc.IOVDbSvcConfig import addFolders from LArRecUtils.LArRecUtilsConf import LArFEBConfigCondAlg -def LArFEBConfigCondAlgCfg(flags, name="LArFEBConfigCondAlg", **kwargs): +def LArFebConfigCondAlgCfg(flags, name="LArFEBConfigCondAlg", **kwargs): """Return ComponentAccumulator with configured LArFEBConfigCondAlg""" defaultFolders = [ "/LAR/Configuration/FEBConfig/Physics/EMBA1", diff --git a/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfig.py b/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfig.py index 0454869526e8833b53d1aadeec9bbaf065f4464d..fd1d597c1d1640fa2854756813565c43441354bb 100644 --- a/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfig.py +++ b/LArCalorimeter/LArRecUtils/python/LArRecUtilsConfig.py @@ -5,7 +5,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaCommon.Logging import logging from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg -from LArRecUtils.LArFebConfigCondAlgConfig import LArFEBConfigCondAlgCfg +from LArRecUtils.LArFebConfigCondAlgConfig import LArFebConfigCondAlgCfg from LArRecUtils.LArRecUtilsConf import LArADC2MeVCondAlg from LArRecUtils.LArRecUtilsConf import LArMCSymCondAlg from LArRecUtils.LArRecUtilsConf import LArAutoCorrNoiseCondAlg @@ -26,7 +26,7 @@ def LArADC2MeVCondAlgCfg(flags, **kwargs): kwargs.setdefault("LArRampKey", "LArRampSym") kwargs.setdefault("UseFEBGainTresholds", False) else: - acc.merge(LArFEBConfigCondAlgCfg(flags)) + acc.merge(LArFebConfigCondAlgCfg(flags)) acc.addCondAlgo(LArADC2MeVCondAlg(**kwargs)) return acc