def PixelDigitizationTool(name="PixelDigitizationTool", **kwargs): kwargs.setdefault("HardScatterSplittingMode", 0) from IOVDbSvc.CondDB import conddb if conddb.dbmc == "OFLP200" and not conddb.folderRequested("/PIXEL/HitDiscCnfg"): conddb.addFolderSplitMC("PIXEL", "/PIXEL/HitDiscCnfg", "/PIXEL/HitDiscCnfg") if not conddb.folderRequested("PIXEL/PixReco"): conddb.addFolder("PIXEL_OFL", "/PIXEL/PixReco") return BasicPixelDigitizationTool(name, **kwargs)
def LArOFCSCToolDefault(name="LArOFCSCToolDefault", **kw): # call base class constructor from AthenaCommon import CfgMgr kw['name'] = name tool = CfgMgr.LArOFCTool(**kw) mlog = logging.getLogger('LArOFCSCToolDefault::__init__ ') mlog.info("entering") # do the configuration if globalflags.DataSource() == 'data': return False else: tool.MCSym = False tool.IsMC = True tool.IsSuperCell = True tool.FromDatabase = False tool.keyShape = "LArShapeSC" tool.keyNoise = "LArNoiseSC" tool.keyPedestal = "LArPedestalSC" tool.UseDelta = 0 ### avoid unforseed options ### #tool.Dump = True from LArRecUtils.LArAutoCorrTotalSCToolDefault import LArAutoCorrTotalSCToolDefault theAutoCorrTool = LArAutoCorrTotalSCToolDefault() from AthenaCommon.AppMgr import ToolSvc ToolSvc += theAutoCorrTool tool.AutoCorrTool = theAutoCorrTool from IOVDbSvc.CondDB import conddb if (conddb.isMC and not conddb.folderRequested('/LAR/IdentifierOfl/OnOffIdMap_SC')): conddb.addFolder( "LAR_OFL", "<tag>LARIdentifierOflOnOffIdMap_SC-000</tag>/LAR/IdentifierOfl/OnOffIdMap_SC" ) if (conddb.isMC and not conddb.folderRequested('/LAR/ElecCalibMCSC/Pedestal')): conddb.addFolder( "LAR_OFL", "<tag>LARElecCalibMCSCPedestal-000</tag>/LAR/ElecCalibMCSC/Pedestal" ) if (conddb.isMC and not conddb.folderRequested('/LAR/ElecCalibMCSC/Noise')): conddb.addFolder( "LAR_OFL", "<tag>LARElecCalibMCSCNoise-000</tag>/LAR/ElecCalibMCSC/Noise") if (conddb.isMC and not conddb.folderRequested('/LAR/ElecCalibMCSC/Shape')): conddb.addFolder( "LAR_OFL", "<tag>LARElecCalibMCSCShape-000</tag>/LAR/ElecCalibMCSC/Shape") return tool
def __init__(self, name='LuminosityTool'): super(LuminosityToolOnline, self).__init__(name) mlog = logging.getLogger(name) # Keep values for invalid data self.SkipInvalid = False from IOVDbSvc.CondDB import conddb if conddb.dbdata == "COMP200": # Run1 folder = "/TRIGGER/LUMI/LBLESTONL" conddb.addFolder('TRIGGER_ONL', folder) #conddb.addFolder('TDAQ', '/TDAQ/OLC/CALIBRATIONS') #conddb.addFolder('TDAQ', '/TDAQ/OLC/BUNCHLUMIS') self.LumiFolderName = folder # Other folder names are now blank by default mlog.info("Created online %s using folder %s" % (name, folder)) elif conddb.dbdata == "CONDBR2": # Run2 folder = "/TRIGGER/LUMI/HLTPrefLumi" conddb.addFolder('TRIGGER_ONL', folder) self.LumiFolderName = folder # Other folder names are now blank by default mlog.info("Created online %s using folder %s" % (name, folder)) else: mlog.warning( "LuminosityToolOnline can't resolve conddb.dbdata = %s, assume Run2!" % conddb.dbdata) mlog.info("Created online %s using a dummy Run2 configuration!" % name) # Also need helper tool to make mu values properly if not conddb.isMC: toolName = "OnlineLumiCalibrationTool" self.OnlineLumiCalibrationTool = toolName if not hasattr(svcMgr.ToolSvc, toolName): from CoolLumiUtilities.OnlineLumiCalibrationToolDefault import OnlineLumiCalibrationToolDefault svcMgr.ToolSvc += OnlineLumiCalibrationToolDefault(toolName) mlog.info("LuminosityToolOnline added tool %s", toolName) else: mlog.info("LuminosityToolOnline found %s already defined!" % toolName)
def LArCalibIdMappingSC(): condSequence = AthSequencer("AthCondSeq") #temporarily disabled, until conditions will arrive to COOL #folder="/LAR/Identifier/CalibIdMap" #if hasattr(condSequence,"LArCalibLineMappingAlg") and condSequence.LArCalibLineMappingAlg.ReadKey==folder: # return #Already there.... #if conddb.isMC: # dbname="LAR_OFL" #else: # dbname="LAR" #conddb.addFolder(dbname,folder,className="AthenaAttributeList") # SC only in OFL database folder="/LAR/IdentifierOfl/CalibIdMap_SC" conddb.addFolder("","<db>sqlite://;schema=/afs/cern.ch/user/p/pavol/w0/public/LAr_Reco_SC_22/run/SCCalibMap.db;dbname=OFLP200</db>"+folder,className="AthenaAttributeList",forceMC=True) conddb.addOverride(folder,"LARIdentifierOflCalibIdMap_SC-000") condSequence+=LArCalibLineMappingAlg("LArCalibLineMappingAlgSC",ReadKey=folder, WriteKey="LArCalibIdMapSC",isSuperCell=True,MaxCL=16) return
def LBDurationCondAlgDefault(): name = 'LBDurationCondAlg' condSeq = AthSequencer('AthCondSeq') if hasattr(condSeq, name): return getattr(condSeq, name) from IOVDbSvc.CondDB import conddb folder = "/TRIGGER/LUMI/LBLB" if not conddb.folderRequested(folder): conddb.addFolder('TRIGGER', folder, className='AthenaAttributeList') from LumiBlockComps.LumiBlockCompsConf import LBDurationCondAlg alg = LBDurationCondAlg(name, LBLBFolderInputKey=folder, LBDurationOutputKey='LBDurationCondData') condSeq += alg return alg
def enable(self, folders = ['/Indet/Onl/Beampos', '/TRIGGER/LUMI/HLTPrefLumi', '/TRIGGER/HLT/PrescaleKey']): """Enable COOL folder updates for given folders (only use this for data)""" from AthenaCommon.AppMgr import ServiceMgr as svcMgr if not hasattr(svcMgr,'IOVDbSvc'): return self.CoolFolderMap = '/TRIGGER/HLT/COOLUPDATE' self.Folders = folders from IOVDbSvc.CondDB import conddb conddb.addFolder('TRIGGER', self.CoolFolderMap) # Make sure relevant folders are marked as 'extensible' for i, dbf in enumerate(svcMgr.IOVDbSvc.Folders): for f in self.Folders: if f in dbf and '<extensible/>' not in f: svcMgr.IOVDbSvc.Folders[i] += ' <extensible/>' log.info('IOVDbSvc folder %s not marked as extensible. Fixing this...', f)
def specialAddFolderSplitOnline(ident, folder1, folder2, force=False, forceMC=False, forceData=False): "Add access to given folder, using folder1 online, folder2 offline but do not append _OFL to the ident" from IOVDbSvc.CondDB import conddb if conddb.isOnline and not conddb.isMC: conddb.addFolder(ident, folder1, force=force, forceMC=forceMC, forceData=forceData) else: conddb.addFolder(ident, folder2, force=force, forceMC=forceMC, forceData=forceData)
def setAlg(self): hvFolder = "/PIXEL/DCS/HV" tempFolder = "/PIXEL/DCS/TEMPERATURE" dbInstance = "DCS_OFL" from AthenaCommon.AthenaCommonFlags import athenaCommonFlags if athenaCommonFlags.isOnline(): hvFolder = "/PIXEL/HLT/DCS/HV" tempFolder = "/PIXEL/HLT/DCS/TEMPERATURE" dbInstance = "PIXEL_ONL" from IOVDbSvc.CondDB import conddb if not conddb.folderRequested(hvFolder): conddb.addFolder(dbInstance, hvFolder, className="CondAttrListCollection") if not conddb.folderRequested(tempFolder): conddb.addFolder(dbInstance, tempFolder, className="CondAttrListCollection") from AthenaCommon.GlobalFlags import globalflags from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "PixelDCSCondHVAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondHVAlg condSeq += PixelDCSCondHVAlg(name="PixelDCSCondHVAlg", ReadKey=hvFolder) if not hasattr(condSeq, "PixelDCSCondTempAlg"): from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelDCSCondTempAlg condSeq += PixelDCSCondTempAlg(name="PixelDCSCondTempAlg", ReadKey=tempFolder) from AthenaCommon.AppMgr import ToolSvc if not hasattr(condSeq, "PixelSiPropertiesCondAlg"): from SiPropertiesTool.SiPropertiesToolConf import PixelSiPropertiesCondAlg condSeq += PixelSiPropertiesCondAlg( name="PixelSiPropertiesCondAlg") self.alg = getattr(condSeq, "PixelSiPropertiesCondAlg")
def loadCaloFolder(folder, tag, isMC=False): from IOVDbSvc.CondDB import conddb from AthenaCommon.AppMgr import ServiceMgr from IOVDbSvc.IOVDbSvcConf import IOVDbSvc ServiceMgr += IOVDbSvc() IOVDbSvc = ServiceMgr.IOVDbSvc if isMC: dbString = "CALO_OFL" else: dbString = "CALO" if (folder, tag) not in H1Calibration.loaded_folder: if H1Calibration.overrideFolder(): conddb.addFolder(dbString, folder + '<tag>' + tag + '</tag>', className='CaloRec::ToolConstants') else: conddb.addFolder(dbString, folder, className='CaloRec::ToolConstants') H1Calibration.loaded_folder.append((folder, tag))
def commonSCT_FastDigitizationConfig(name, **kwargs): # Setup the DCS folders and Svc used in the sctSiliconConditionsSvc from IOVDbSvc.CondDB import conddb if not conddb.folderRequested('/SCT/DCS/CHANSTAT'): conddb.addFolder("DCS_OFL", "/SCT/DCS/CHANSTAT") if not conddb.folderRequested('/SCT/DCS/MODTEMP'): conddb.addFolder("DCS_OFL", "/SCT/DCS/MODTEMP") if not conddb.folderRequested('/SCT/DCS/HV'): conddb.addFolder("DCS_OFL", "/SCT/DCS/HV") from AthenaCommon.AppMgr import ServiceMgr if not hasattr(ServiceMgr, "InDetSCT_DCSConditionsSvc"): from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_DCSConditionsSvc InDetSCT_DCSConditionsSvc = SCT_DCSConditionsSvc( name="InDetSCT_DCSConditionsSvc") ServiceMgr += InDetSCT_DCSConditionsSvc kwargs.setdefault("ClusterMaker", "FastClusterMakerTool") # Import Digitization job properties from Digitization.DigitizationFlags import digitizationFlags # set the random service, stream name streamName = kwargs.setdefault("RndmEngine", "FastSCT_Digitization") kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) # set rndm seeds if not digitizationFlags.rndmSeedList.checkForExistingSeed(streamName): digitizationFlags.rndmSeedList.addSeed(streamName, 49261510, 105132394) if digitizationFlags.doXingByXingPileUp(): kwargs.setdefault("FirstXing", FastSCT_FirstXing()) kwargs.setdefault("LastXing", FastSCT_LastXing()) from AthenaCommon import CfgMgr return CfgMgr.SCT_FastDigitizationTool(name, **kwargs)
def LArFEBConfigReaderDefault (name="LArFEBConfigReaderDefault", **kw): mlog = logging.getLogger( 'LArFEBConfigReaderDefault::__init__ ' ) if hasattr(ServiceMgr.ToolSvc,name): mlog.info("LArFEBConfigReader with name" + name + "already known to ToolSvc") return getattr(ServiceMgr.ToolSvc,name) # call base class constructor from AthenaCommon import CfgMgr kw['name'] = name tool = CfgMgr.LArFEBConfigReader (**kw) LArFebConfigFolders=[ "/LAR/Configuration/FEBConfig/Physics/EMBA1", "/LAR/Configuration/FEBConfig/Physics/EMBA2", "/LAR/Configuration/FEBConfig/Physics/EMBA3", "/LAR/Configuration/FEBConfig/Physics/EMBA4", "/LAR/Configuration/FEBConfig/Physics/EMBC1", "/LAR/Configuration/FEBConfig/Physics/EMBC2", "/LAR/Configuration/FEBConfig/Physics/EMBC3", "/LAR/Configuration/FEBConfig/Physics/EMBC4", "/LAR/Configuration/FEBConfig/Physics/EMECA1", "/LAR/Configuration/FEBConfig/Physics/EMECA2", "/LAR/Configuration/FEBConfig/Physics/EMECA3", "/LAR/Configuration/FEBConfig/Physics/EMECC1", "/LAR/Configuration/FEBConfig/Physics/EMECC2", "/LAR/Configuration/FEBConfig/Physics/EMECC3", "/LAR/Configuration/FEBConfig/Physics/FCALA", "/LAR/Configuration/FEBConfig/Physics/FCALC", "/LAR/Configuration/FEBConfig/Physics/HECA", "/LAR/Configuration/FEBConfig/Physics/HECC", ] for f in LArFebConfigFolders: conddb.addFolder("LAR_ONL",f) tool.ListOfFolders=LArFebConfigFolders return tool
def LArBadChannelAccess(algname="LArBadChannelCondAlg", dbString=None): from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if hasattr(condSeq, algname): print("Access to bad Feb info already set up") return from LArCabling.LArCablingAccess import LArOnOffIdMapping LArOnOffIdMapping() from IOVDbSvc.CondDB import conddb if dbString is not None: foldername = conddb.extractFolder(dbString) conddb.addFolder("", dbString, className="CondAttrListCollection") else: if conddb.isOnline: foldername = "/LAR/BadChannels/BadChannels" conddb.addFolder("LAR", foldername, className="CondAttrListCollection") else: foldername = "/LAR/BadChannelsOfl/BadChannels" conddb.addFolder("LAR_OFL", foldername, className="CondAttrListCollection") pass pass from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelCondAlg theLArBadChannelCondAlg = LArBadChannelCondAlg(algname) theLArBadChannelCondAlg.ReadKey = foldername condSeq += theLArBadChannelCondAlg return
def setFolders(self): from IOVDbSvc.CondDB import conddb if not conddb.folderRequested(self.channelFolder): if self.channelFolderDb is None: conddb.addFolderSplitMC(self.dbInstance, self.channelFolder, self.channelFolder, className="CondAttrListVec") else: conddb.addFolder(self.dbInstance, self.channelFolderDb, className="CondAttrListVec") if not conddb.folderRequested(self.moduleFolder): if self.moduleFolderDb is None: conddb.addFolderSplitMC(self.dbInstance, self.moduleFolder, self.moduleFolder, className="CondAttrListVec") else: conddb.addFolder(self.dbInstance, self.moduleFolderDb, className="CondAttrListVec") if not conddb.folderRequested(self.murFolder): if self.murFolderDb is None: conddb.addFolderSplitMC(self.dbInstance, self.murFolder, self.murFolder, className="CondAttrListVec") else: conddb.addFolder(self.dbInstance, self.murFolderDb, className="CondAttrListVec")
def BasicTRTFastDigitizationTool(name, **kwargs): from IOVDbSvc.CondDB import conddb if not conddb.folderRequested('/TRT/Calib/ToTCalib'): conddb.addFolderSplitOnline("TRT", "/TRT/Onl/Calib/ToTCalib", "/TRT/Calib/ToTCalib") if not conddb.folderRequested('/TRT/Calib/HTCalib'): conddb.addFolderSplitOnline("TRT", "/TRT/Onl/Calib/HTCalib", "/TRT/Calib/HTCalib") if not conddb.folderRequested('/TRT/Calib/errors'): conddb.addFolderSplitOnline("TRT", "/TRT/Onl/Calib/errors", "/TRT/Calib/errors") if not conddb.folderRequested('/TRT/Calib/PIDver_New'): conddb.addFolderSplitOnline("TRT", "/TRT/Onl/Calib/PIDver_New", "/TRT/Calib/PIDver_New") if not conddb.folderRequested('/TRT/Calib/PID_RToTver_New'): conddb.addFolderSplitOnline("TRT", "/TRT/Onl/Calib/PID_RToTver_New", "/TRT/Calib/PID_RToTver_New") if not conddb.folderRequested("/TRT/Calib/PID_vector"): conddb.addFolderSplitOnline("TRT", "/TRT/Onl/Calib/PID_vector", "/TRT/Calib/PID_vector") if not conddb.folderRequested("/TRT/Calib/ToT/ToTVectors"): conddb.addFolder("TRT_OFL", "/TRT/Calib/ToT/ToTVectors") if not conddb.folderRequested("/TRT/Calib/ToT/ToTValue"): conddb.addFolder("TRT_OFL", "/TRT/Calib/ToT/ToTValue") #choose random number service from Digitization.DigitizationFlags import digitizationFlags kwargs.setdefault("RndmSvc", digitizationFlags.rndmSvc()) streamName = kwargs.setdefault("RandomStreamName", "FastTRTDigitization") # set rndm seeds if not digitizationFlags.rndmSeedList.checkForExistingSeed(streamName): digitizationFlags.rndmSeedList.addSeed(streamName, 45123, 94345) from Digitization.DigitizationFlags import digitizationFlags if digitizationFlags.doXingByXingPileUp(): kwargs.setdefault("FirstXing", FastTRT_FirstXing()) kwargs.setdefault("LastXing", FastTRT_LastXing()) from AthenaCommon import CfgMgr return CfgMgr.TRTFastDigitizationTool(name, **kwargs)
def configureOnlineLuminosityCondAlg (name): mlog = logging.getLogger(name) kwargs = {} # Keep values for invalid data kwargs['SkipInvalid'] = False from IOVDbSvc.CondDB import conddb if conddb.dbdata == "COMP200": # Run1 folder = "/TRIGGER/LUMI/LBLESTONL" conddb.addFolder('TRIGGER_ONL', folder, className = 'CondAttrListCollection') elif conddb.dbdata == "CONDBR2": # Run2 folder = "/TRIGGER/LUMI/HLTPrefLumi" conddb.addFolder('TRIGGER_ONL', folder, className = 'CondAttrListCollection') else: # Run 2 mlog.warning("LuminosityCondAlgDefault can't resolve conddb.dbdata = %s, assume Run2!", conddb.dbdata) mlog.info("Using dummy Run 2 configuration") folder = '' kwargs['LuminosityFolderInputKey'] = folder mlog.info("Created online %s using folder %s", name, folder) # Need the calibration tool just to get the proper MuToLumi value from CoolLumiUtilities.OnlineLumiCalibrationCondAlgDefault \ import OnlineLumiCalibrationCondAlgDefault calibAlg = OnlineLumiCalibrationCondAlgDefault() kwargs['OnlineLumiCalibrationInputKey'] = calibAlg.LumiCalibOutputKey if calibAlg else '' # Other folder names should be blank. kwargs['BunchLumisInputKey'] = '' kwargs['BunchGroupInputKey'] = '' kwargs['FillParamsInputKey'] = '' return kwargs
def BunchLumisCondAlgDefault(): name = 'BunchLumisCondAlg' condSeq = AthSequencer('AthCondSeq') if hasattr(condSeq, name): return getattr(condSeq, name) # Should only be used for Run 1. from IOVDbSvc.CondDB import conddb if conddb.dbdata != 'COMP200': return None folder = '/TDAQ/OLC/BUNCHLUMIS' from AthenaCommon.GlobalFlags import globalflags if globalflags.isOverlay(): # Load reduced channel list for overlay jobs to try to reduce COOL access # Need Lucid AND, OR, HitOR, BcmH OR, BcmV OR conddb.addFolder( 'TDAQ', '<channelSelection>101,102,103,201,211</channelSelection> /TDAQ/OLC/BUNCHLUMIS', className='CondAttrListCollection') else: conddb.addFolder('TDAQ', folder, className='CondAttrListCollection') from CoolLumiUtilities.CoolLumiUtilitiesConf import \ BunchLumisCondAlg from CoolLumiUtilities.FillParamsCondAlgDefault import FillParamsCondAlgDefault fpalg = FillParamsCondAlgDefault() alg = BunchLumisCondAlg(name, BunchLumisFolderInputKey=folder, FillParamsInputKey=fpalg.FillParamsOutputKey, BunchLumisOutputKey='BunchLumisCondData') condSeq += alg return alg
def __init__(self, name="CaloNoiseToolDBMC"): # call base class constructor CaloNoiseToolDB.__init__(self, name) mlog = logging.getLogger('CaloNoiseToolDBMC::__init__ ') mlog.info("entering") from IOVDbSvc.CondDB import conddb # do the configuration from CaloTools.CaloNoiseFlags import jobproperties if jobproperties.CaloNoiseFlags.FixedLuminosity() >= 0: self.Luminosity = jobproperties.CaloNoiseFlags.FixedLuminosity() mlog.info( " Luminosity (in 10**33) units used for pileup noise from CaloNoiseFlags : %f" % self.Luminosity) else: if jobproperties.CaloNoiseFlags.UseCaloLuminosity(): lumiFolder = '/CALO/Ofl/Noise/PileUpNoiseLumi' conddb.addFolder('CALO_OFL', lumiFolder) mlog.info( "offline mode: use luminosity from /CALO/Ofl/Noise/PileuUpNoiseLumi to scale pileup noise" ) self.LumiFolderName = lumiFolder self.Luminosity = -1. else: from AthenaCommon.BeamFlags import jobproperties self.Luminosity = jobproperties.Beam.estimatedLuminosity( ) / 1e+33 mlog.info( " Luminosity (in 10**33) units used for pileup noise from BeamFlags : %f" % self.Luminosity) folders = (("CALO_OFL", "/CALO/Ofl/Noise/CellNoise"), ("LAR_OFL", "/LAR/NoiseOfl/CellNoise"), ("TILE_OFL", "/TILE/OFL02/NOISE/CELL")) for (db, fldr) in folders: conddb.addFolder(db, fldr) CaloNoiseToolDB.FolderNames = [f[1] for f in folders]
def CaloCellPedestalCorrDefault(name='CaloCellPedestalCorr'): import traceback from AthenaCommon.Logging import logging mlog = logging.getLogger('CaloCellPedestalCorrDefault') from AthenaCommon.AppMgr import ToolSvc from AthenaCommon.GlobalFlags import globalflags try: from CaloCellCorrection.CaloCellCorrectionConf import CaloCellPedestalCorr theCaloCellPedestalCorr = CaloCellPedestalCorr("CaloCellPedestalCorr") except: mlog.error("could not get handle to CaloCellPedestalCorr Quit") print traceback.format_exc() ToolSvc += theCaloCellPedestalCorr try: from CaloRec.CaloRecConf import CaloCellContainerCorrectorTool from CaloIdentifier import SUBCALO thePedestalTool = CaloCellContainerCorrectorTool( "PedestalTool", CaloNums=[SUBCALO.NSUBCALO], CellCorrectionToolNames=[theCaloCellPedestalCorr]) except: mlog.error( "could not get handle to CaloCellContainerCorrectorTool Quit") print traceback.format_exc() return False if globalflags.DataSource() == 'data': from IOVDbSvc.CondDB import conddb if conddb.isOnline: folder = '/CALO/Pedestal/CellPedestal' conddb.addFolder('CALO_ONL', folder) else: folder = '/CALO/Ofl/Pedestal/CellPedestal' conddb.addFolder('CALO_OFL', folder) theCaloCellPedestalCorr.FolderName = folder theCaloCellPedestalCorr.isMC = False else: theCaloCellPedestalCorr.isMC = True from AthenaCommon.AthenaCommonFlags import athenaCommonFlags from CaloRec.CaloCellFlags import jobproperties if globalflags.DataSource() == 'data' and ( not jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr()) and ( not athenaCommonFlags.isOnline()): lumiFolder = '/TRIGGER/LUMI/LBLESTONL' conddb.addFolder('TRIGGER_ONL', lumiFolder) theCaloCellPedestalCorr.Luminosity = -1 theCaloCellPedestalCorr.LumiFolderName = lumiFolder if jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr() and ( not athenaCommonFlags.isOnline()): from CaloTools.CaloLumiBCIDToolDefault import CaloLumiBCIDToolDefault theCaloLumiBCIDTool = CaloLumiBCIDToolDefault() ToolSvc += theCaloLumiBCIDTool theCaloCellPedestalCorr.LumiBCIDTool = theCaloLumiBCIDTool return thePedestalTool
def LArFebConfigCondAlgDefault (): condSeq = AthSequencer("AthCondSeq") if hasattr (condSeq,"LArFEBConfigCondAlg"): return getattr(condSeq,"LArFEBConfigCondAlg") theLArFEBConfigCondAlg = LArFEBConfigCondAlg() LArFebConfigFolders=[ "/LAR/Configuration/FEBConfig/Physics/EMBA1", "/LAR/Configuration/FEBConfig/Physics/EMBA2", "/LAR/Configuration/FEBConfig/Physics/EMBA3", "/LAR/Configuration/FEBConfig/Physics/EMBA4", "/LAR/Configuration/FEBConfig/Physics/EMBC1", "/LAR/Configuration/FEBConfig/Physics/EMBC2", "/LAR/Configuration/FEBConfig/Physics/EMBC3", "/LAR/Configuration/FEBConfig/Physics/EMBC4", "/LAR/Configuration/FEBConfig/Physics/EMECA1", "/LAR/Configuration/FEBConfig/Physics/EMECA2", "/LAR/Configuration/FEBConfig/Physics/EMECA3", "/LAR/Configuration/FEBConfig/Physics/EMECC1", "/LAR/Configuration/FEBConfig/Physics/EMECC2", "/LAR/Configuration/FEBConfig/Physics/EMECC3", "/LAR/Configuration/FEBConfig/Physics/FCALA", "/LAR/Configuration/FEBConfig/Physics/FCALC", "/LAR/Configuration/FEBConfig/Physics/HECA", "/LAR/Configuration/FEBConfig/Physics/HECC", ] for f in LArFebConfigFolders: conddb.addFolder("LAR_ONL",f,className="CondAttrListCollection") theLArFEBConfigCondAlg.ListOfFolders=LArFebConfigFolders theLArFEBConfigCondAlg.keyOutput="LArFebConfig" condSeq+=theLArFEBConfigCondAlg return theLArFEBConfigCondAlg
def configureLuminosityCondAlgRun2 (name): mlog = logging.getLogger(name) kwargs = {} # Set up DB configuration from IOVDbSvc.CondDB import conddb from RecExConfig.RecFlags import rec # Check if this is express stream or bulk from AthenaCommon.AthenaCommonFlags import athenaCommonFlags if rec.doExpressProcessing() or athenaCommonFlags.isOnline: lumiFolder = "/TRIGGER/LUMI/OnlPrefLumi" conddb.addFolder('TRIGGER_ONL', lumiFolder, className = 'CondAttrListCollection') else: lumiFolder = "/TRIGGER/OFLLUMI/OflPrefLumi" conddb.addFolder('TRIGGER_OFL', lumiFolder, className = 'CondAttrListCollection') mlog.info("configureLuminosityCondAlgRun2 requested %s", lumiFolder) kwargs['LuminosityFolderInputKey'] = lumiFolder mlog.info("Created Run2 %s using folder %s", name, lumiFolder) # Need the calibration tool just to get the proper MuToLumi value from CoolLumiUtilities.OnlineLumiCalibrationCondAlgDefault \ import OnlineLumiCalibrationCondAlgDefault calibAlg = OnlineLumiCalibrationCondAlgDefault() kwargs['OnlineLumiCalibrationInputKey'] = calibAlg.LumiCalibOutputKey if calibAlg else '' # Other folder names should be blank. kwargs['BunchLumisInputKey'] = '' kwargs['BunchGroupInputKey'] = '' kwargs['FillParamsInputKey'] = '' return kwargs
def FillParamsToolDefault(name="FillParamsTool"): mlog = logging.getLogger(name) if hasattr(svcMgr.ToolSvc, name): # re-use previously configured tool mlog.info("FillParamsToolDefault returning existing tool %s", name) return getattr(svcMgr.ToolSvc, name) # Instantiate new tool, by default configuration will do nothing fpTool = FillParamsTool(name) # Now configure based on the environment from IOVDbSvc.CondDB import conddb # Run1 if conddb.dbdata == "COMP200": folder = '/TDAQ/OLC/LHC/FILLPARAMS' fpTool.FillParamsFolderName = folder # Mistakenly created as multi-version folder, must specify HEAD from IOVDbSvc.CondDB import conddb if not conddb.folderRequested(folder): conddb.addFolder('TDAQ', folder) mlog.info("FillParamsToolDefault requested %s", folder) # Run2 - do nothing elif conddb.dbdata == "CONDBR2": pass # Unknown, complain and do nothing else: mlog.warning( "FillParamsToolDefault can't resolve conddb.dbdata = %s, assume Run2!" % conddb.dbdata) pass return fpTool
def __init__(self, name='LArShapeDumperTool', doShape=True): super(LArShapeDumperTool, self).__init__(name) self.DoShape = doShape if doShape: from LArConditionsCommon.LArCool import larcool if larcool is not None: nSamples = larcool.nSamples() else: print( "WARNING, can't determine number of samples for this run! Assume 4" ) nSamples = 4 from AthenaCommon.AppMgr import ServiceMgr as svcMgr svcMgr.PoolSvc.ReadCatalog += [ "apcfile:poolcond/PoolCat_comcond_castor.xml" ] from IOVDbSvc.CondDB import conddb #Run 1 version: #conddb.addFolder('LAR_OFL', '/LAR/ElecCalibOfl/Shape/RTM/5samples3bins17phases<tag>LARElecCalibOflShapeRTM5samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape5samples3bins17phases</key>') if (nSamples >= 5): conddb.addFolder( 'LAR_OFL', '/LAR/ElecCalibOfl/Shape/RTM/5samples3bins17phases<tag>LARElecCalibOflShapeRTM5samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape17phases</key>' ) elif (nSamples == 4): conddb.addFolder( 'LAR_OFL', '/LAR/ElecCalibOfl/Shape/RTM/4samples3bins17phases<tag>LARElecCalibOflShapeRTM4samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape17phases</key>' ) else: print("ERROR: Unexpected number of samples, got ", nSamples) pass pass pass
def CaloAffectedToolDefault(name='CaloAffectedToolDefault'): # check if tool already exists from AthenaCommon.AppMgr import ServiceMgr as svcMgr if hasattr(svcMgr.ToolSvc, name): # re-use previously configured (public) tool return getattr(svcMgr.ToolSvc, name) mlog = logging.getLogger( 'CaloAffectedToolDefault' ) from CaloTools.CaloToolsConf import CaloAffectedTool theTool = CaloAffectedTool(name) from RecExConfig.RecFlags import rec if rec.readRDO(): theTool.readRaw = True else: theTool.readRaw = False from IOVDbSvc.CondDB import conddb conddb.addFolder ('', '/LAR/LArAffectedRegionInfo<metaOnly/>') return theTool
def _CaloNoiseCondAlgMC(noiseAlgName, noisetype): mlog = logging.getLogger('CaloNoiseCondMC') from CaloTools.CaloToolsConf import CaloNoiseCondAlg theCaloNoiseAlg = CaloNoiseCondAlg(noiseAlgName, OutputKey=noisetype) from CaloTools.CaloNoiseFlags import jobproperties if jobproperties.CaloNoiseFlags.FixedLuminosity() >= 0: theCaloNoiseAlg.Luminosity = jobproperties.CaloNoiseFlags.FixedLuminosity( ) mlog.info( " Luminosity (in 10**33) units used for pileup noise from CaloNoiseFlags : %f", theCaloNoiseAlg.Luminosity) else: if jobproperties.CaloNoiseFlags.UseCaloLuminosity(): lumiFolder = '/CALO/Ofl/Noise/PileUpNoiseLumi' conddb.addFolder('CALO_OFL', lumiFolder, className="CondAttrListCollection") mlog.info( "offline mode: use luminosity from /CALO/Ofl/Noise/PileuUpNoiseLumi to scale pileup noise" ) theCaloNoiseAlg.LumiFolder = lumiFolder theCaloNoiseAlg.Luminosity = -1. else: from AthenaCommon.BeamFlags import jobproperties theCaloNoiseAlg.Luminosity = jobproperties.Beam.estimatedLuminosity( ) / 1e+33 mlog.info( " Luminosity (in 10**33) units used for pileup noise from BeamFlags : %f", theCaloNoiseAlg.Luminosity) pass pass theCaloNoiseAlg.LArNoiseFolder = "/LAR/NoiseOfl/CellNoise" conddb.addFolder("LAR_OFL", "/LAR/NoiseOfl/CellNoise", className="CondAttrListCollection") theCaloNoiseAlg.TileNoiseFolder = "/TILE/OFL02/NOISE/CELL" conddb.addFolder("TILE_OFL", "/TILE/OFL02/NOISE/CELL", className="CondAttrListCollection") theCaloNoiseAlg.CaloNoiseFolder = "/CALO/Ofl/Noise/CellNoise" conddb.addFolder("CALO_OFL", "/CALO/Ofl/Noise/CellNoise", className="CondAttrListCollection") return theCaloNoiseAlg
def GetAtlasReadyFilterTool(): from AthenaCommon.Logging import logging arft_local_logger = logging.getLogger('AtlasReadyFilterTool') from AthenaMonitoring.DQMonFlags import DQMonFlags from AthenaCommon.GlobalFlags import globalflags if (DQMonFlags.monManEnvironment == 'online' or globalflags.DataSource.get_Value() == 'geant4' or 'collisions' not in DQMonFlags.monManDataType.get_Value() or DQMonFlags.disableAtlasReadyFilter.get_Value()): arft_local_logger.info("Disabling ATLAS Ready monitoring filter") from AthenaMonitoring.AthenaMonitoringConf import DQDummyFilterTool return DQDummyFilterTool() if globalflags.DataSource.get_Value() != 'geant4': from IOVDbSvc.CondDB import conddb if not conddb.folderRequested('/TDAQ/RunCtrl/DataTakingMode'): conddb.addFolder('TDAQ', '/TDAQ/RunCtrl/DataTakingMode', className='AthenaAttributeList') from AthenaMonitoring.AthenaMonitoringConf import DQAtlasReadyFilterTool return DQAtlasReadyFilterTool()
def LuminosityToolOfflineRun2(name="LuminosityTool"): mlog = logging.getLogger(name) # Set up DB configuration from IOVDbSvc.CondDB import conddb from RecExConfig.RecFlags import rec lumiTool = LuminosityTool(name) # Check if this is express stream or bulk if rec.doExpressProcessing(): lumiFolder = "/TRIGGER/LUMI/OnlPrefLumi" if not conddb.folderRequested(lumiFolder): conddb.addFolder('TRIGGER_ONL', lumiFolder) else: lumiFolder = "/TRIGGER/OFLLUMI/OflPrefLumi" if not conddb.folderRequested(lumiFolder): conddb.addFolder('TRIGGER_OFL', lumiFolder) mlog.info("LuminosityToolOfflineRun2 requested %s", lumiFolder) lumiTool.LumiFolderName = lumiFolder mlog.info("Created Run2 %s using folder %s" % (name, lumiFolder)) # Need the calibration tool just to get the proper MuToLumi value toolName = "OnlineLumiCalibrationTool" lumiTool.OnlineLumiCalibrationTool = toolName if not hasattr(svcMgr.ToolSvc, toolName): from CoolLumiUtilities.OnlineLumiCalibrationToolDefault import OnlineLumiCalibrationToolDefault svcMgr.ToolSvc += OnlineLumiCalibrationToolDefault(toolName) mlog.info("LuminosityToolOfflineRun2 added tool %s", toolName) else: mlog.info("LuminosityToolOfflineRun2 found %s already defined!" % toolName) # Other folders needed by LuminosityTool folder = "/TRIGGER/LUMI/LBLB" if not conddb.folderRequested(folder): conddb.addFolder('TRIGGER', folder) mlog.info("LuminosityToolOfflineRun2 requested %s", folder) lumiTool.LBLBFolderName = folder # Other folder names are now blank by default return lumiTool
def setupCOOLDCS(self, defTag="", dbConnection="", useHV=True, useHVSET=False, useSTATUS=True): """ Call this function to read DCS from COOL folder. Input parameters: - defTag : Tag to be added to each folder tag (NGO change this to a hierarchical tag!) - dbConnection : The DB connection string to use [default "": auto-initialization by CondDBSetup.py] """ #=== prevent a second initialization if self._coolDCSIsConfigured: self._msg.info( "setupCOOLDCS already called previously, ignoring this repeated call!" ) return self._coolDCSIsConfigured = True ## #=== ensure the availability of TileDCSSvc from AthenaCommon.GlobalFlags import globalflags from AthenaCommon.AthenaCommonFlags import athenaCommonFlags TileUseDCS = (not athenaCommonFlags.isOnline() ) and globalflags.DataSource() == 'data' ## get a handle to the ServiceManager from AthenaCommon.AppMgr import ServiceMgr as svcMgr if TileUseDCS and not hasattr(svcMgr, "TileDCSSvc"): self._msg.info("setting up DCS TileCal conditions data") dbConnStr = 'DCS_OFL' from IOVDbSvc.CondDB import conddb if useHV: conddb.addFolder(dbConnStr, "/TILE/DCS/HV") if useHVSET: conddb.addFolder(dbConnStr, "/TILE/DCS/HVSET") if useSTATUS: conddb.addFolder(dbConnStr, "/TILE/DCS/STATES") self._msg.info("Adding TileDCSSvc to ServiceMgr") svcMgr += CfgMgr.TileDCSSvc() from IOVDbSvc.CondDB import conddb if (conddb.GetInstance() == 'CONDBR2'): self._msg.info("setting up TileDCSSvc for RUN2") svcMgr.TileDCSSvc.Version = 2 else: self._msg.info("setting up TileDCSSvc for RUN1") svcMgr.TileDCSSvc.Version = 1
def CaloCellPedestalCorrDefault(name='CaloCellPedestalCorr'): import traceback from AthenaCommon.Logging import logging mlog = logging.getLogger( 'CaloCellPedestalCorrDefault' ) from AthenaCommon.AppMgr import ToolSvc from AthenaCommon.GlobalFlags import globalflags try: from CaloCellCorrection.CaloCellCorrectionConf import CaloCellPedestalCorr theCaloCellPedestalCorr = CaloCellPedestalCorr("CaloCellPedestalCorr") except: mlog.error("could not get handle to CaloCellPedestalCorr Quit") traceback.print_exc() #ToolSvc += theCaloCellPedestalCorr if globalflags.DataSource()=='data' : from IOVDbSvc.CondDB import conddb if conddb.isOnline: folder = '/CALO/Pedestal/CellPedestal' conddb.addFolder('CALO_ONL',folder,className="CondAttrListCollection") else: folder= '/CALO/Ofl/Pedestal/CellPedestal' conddb.addFolder('CALO_OFL',folder,className="CondAttrListCollection") theCaloCellPedestalCorr.PedestalShiftFolder = folder theCaloCellPedestalCorr.isMC=False else: theCaloCellPedestalCorr.isMC=True from AthenaCommon.AthenaCommonFlags import athenaCommonFlags from CaloRec.CaloCellFlags import jobproperties if globalflags.DataSource()=='data' and (not jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr()) and (not athenaCommonFlags.isOnline()): lumiFolder = '/TRIGGER/LUMI/LBLESTONL' conddb.addFolder('TRIGGER_ONL',lumiFolder,className="CondAttrListCollection"); theCaloCellPedestalCorr.Luminosity = -1 theCaloCellPedestalCorr.LumiFolderName = lumiFolder if jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr() and (not athenaCommonFlags.isOnline()): from CaloRec.CaloBCIDAvgAlgDefault import CaloBCIDAvgAlgDefault CaloBCIDAvgAlgDefault() theCaloCellPedestalCorr.CaloBCIDAverageKey="CaloBCIDAverage" else: theCaloCellPedestalCorr.CaloBCIDAverageKey="" return theCaloCellPedestalCorr
def LArADC2MeVSCToolDefault (name="LArADC2MeVSCToolDefault", **kw): # call base class constructor from AthenaCommon import CfgMgr kw['name'] = name tool = CfgMgr.LArADC2MeVTool (**kw) mlog = logging.getLogger( 'LArADC2MeVSCToolDefault::__init__ ' ) mlog.info("entering") tool.IsSC=True tool.MCSym = False tool.UseFEBGainTresholds=True # do the configuration if globalflags.DataSource()=='data': # to be changed to True when everything is ready mlog.info("in data case") tool.UseMphysOverMcal = True tool.UseHVScaleCorr = False if larCondFlags.useLArFEBGainThresholds(): from LArRecUtils.LArFEBConfigReaderDefault import LArFEBConfigReaderDefault theLArFebConfigReader=LArFEBConfigReaderDefault() #theLArFebConfigReader.OutputLevel=DEBUG ServiceMgr.ToolSvc+=theLArFebConfigReader tool.FebConfigReader=theLArFebConfigReader tool.UseFEBGainTresholds=True else: mlog.info("in MC case") tool.UseMphysOverMcal = False tool.UseHVScaleCorr = False tool.keyADC2DAC='LArRampSC' tool.keyDAC2uA='LArDAC2uASC' tool.keyuA2MeV='LAruA2MeVSC' from IOVDbSvc.CondDB import conddb if ( conddb.isMC and not conddb.folderRequested('/LAR/ElecCalibMCSC/DAC2uA') ) : conddb.addFolder("LAR_OFL","<tag>LARElecCalibMCSCDAC2uA-000</tag>/LAR/ElecCalibMCSC/DAC2uA") if ( conddb.isMC and not conddb.folderRequested('/LAR/ElecCalibMCSC/uA2MeV') ) : conddb.addFolder("LAR_OFL","<tag>LARElecCalibMCSCuA2MeV-000</tag>/LAR/ElecCalibMCSC/uA2MeV") if ( conddb.isMC and not conddb.folderRequested('/LAR/ElecCalibMCSC/Ramp') ) : conddb.addFolder("LAR_OFL","<tag>LARElecCalibMCSCRamp-000</tag>/LAR/ElecCalibMCSC/Ramp") return tool
def setFolders(self): from IOVDbSvc.CondDB import conddb if ((self.readAllDBFolders and self.returnHVTemp) or (not self.readAllDBFolders and not self.returnHVTemp)): if not conddb.folderRequested(self.stateFolder): conddb.addFolder(self.dbInstance, self.stateFolder, className="CondAttrListCollection") if ((self.readAllDBFolders and self.returnHVTemp) or self.returnHVTemp): if not conddb.folderRequested(self.hvFolder): conddb.addFolder(self.dbInstance, self.hvFolder, className="CondAttrListCollection") if not conddb.folderRequested(self.tempFolder): conddb.addFolder(self.dbInstance, self.tempFolder, className="CondAttrListCollection")
InDetFlags.doConvVtxNtuple = False InDetFlags.doV0VtxNtuple = False InDetFlags.doRefit = doRefitTracks InDetFlags.doLowBetaFinder = False InDetFlags.doPrintConfigurables = True # [HIGHD0 TESTING] -- > setting the Large-d0 retracking InDetFlags.doDVRetracking = True # [JDC] ADDED InDetFlags.doxAOD = True InDetFlags.doForwardTracks = False InDetFlags.doTrackSegmentsPixelPrdAssociation = False ##Added to fix bug not finding PixelClustering tools in 17.2.2 from IOVDbSvc.CondDB import conddb conddb.addFolder("PIXEL_OFL","/PIXEL/PixelClustering/PixelClusNNCalib") # [JDC] END # --- activate (memory/cpu) monitoring InDetFlags.doPerfMon = True # IMPORTANT NOTE: initialization of the flags and locking them is done in InDetRec_jobOptions.py! # This way RecExCommon just needs to import the properties without doing anything else! # DO NOT SET JOBPROPERTIES AFTER THIS LINE! The change will be ignored! from InDetRecExample.InDetKeys import InDetKeys if InDetFlags.doVertexFinding() and readAOD: InDetKeys.Tracks = InDetKeys.TrackParticles() # [JDC] ADDED # Where to put this ? ... Encuentra que algoritmo usa esto en # highd0 y activalo ahi, con el "if highD0()"
## ************************************************************ ## $Id: CondDB_jobOptions.py,v 1.1 2008-09-23 13:29:11 mgwilson Exp $ ## ************************************************************ from IOVDbSvc.CondDB import conddb ## Allow retrieval of the length of luminosity blocks conddb.addFolder('TRIGGER','/TRIGGER/LUMI/LBLB')
#we need it to extract the year from the run #else execution fails from RecExConfig.RecFlags import rec filelist=runArgs.inputNames n=filelist[0].count('/') filename=filelist[0].split('/')[n] projectName=str(filename.split('.')[0]) rec.__dict__.get('projectName').set_Value(projectName) #-------------------------------------------------------------- # Configuring folder for noisy strip comparison #------------------------------------------------------------- from IOVDbSvc.CondDB import conddb conddb.dbdata = 'CONDBR2' conddb.addFolder("SCT_OFL","<db>COOLOFL_SCT/CONDBR2</db> /SCT/Derived/Monitoring<tag>SctDerivedMonitoring-RUN2-UPD4-004</tag>") #conddb.addFolder("SCT_OFL","<db>COOLOFL_SCT/CONDBR2</db> /SCT/Derived/Monitoring<tag>SctDerivedMonitoring-RUN2-UPD4-004</tag><forceRunNumber>259237</forceRunNumber>") # GeoModel & MagneticFieldSvc #-------------------------------------------------------------- from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit import MagFieldServices.SetupField #-------------------------------------------------------------- # Configuring the cabling #-------------------------------------------------------------- from InDetRecExample.InDetJobProperties import InDetFlags InDetFlags.doPrintConfigurables = True include( "InDetRecExample/InDetRecCabling.py" )
# Set up the ATLAS Ready filter tool from AthenaCommon.Logging import logging arft_local_logger = logging.getLogger('AtlasReadyFilterTool_jobOptions') if not 'DQMonFlags' in dir(): arft_local_logger.debug("AtlasReadyFilterTool_jobOptions.py: DQMonFlags not yet imported - I import them now") from AthenaMonitoring.DQMonFlags import DQMonFlags if not 'monAtlasReadyFilterTool' in dir(): if globalflags.DataSource.get_Value() != 'geant4': from IOVDbSvc.CondDB import conddb conddb.addFolder('TDAQ', '/TDAQ/RunCtrl/DataTakingMode') from AthenaMonitoring.AthenaMonitoringConf import DQAtlasReadyFilterTool monAtlasReadyFilterTool = DQAtlasReadyFilterTool() if (DQMonFlags.monManEnvironment == 'online' or globalflags.DataSource.get_Value() == 'geant4' or 'collisions' not in DQMonFlags.monManDataType.get_Value() or DQMonFlags.disableAtlasReadyFilter.get_Value()): arft_local_logger.info("Disabling ATLAS Ready monitoring filter") monAtlasReadyFilterTool.alwaysReturnTrue = True ToolSvc += monAtlasReadyFilterTool del arft_local_logger
OutputLevel = BTaggingFlags.OutputLevel ) ToolSvc += JetTagPerformanceJetProb from IOVDbSvc.CondDB import conddb if PerfCalibrationSingleFolder: PerfCalibrationFolders = [] PerfCalibrationFolders.append(PerfCalibrationRoot+SingleFolderName) # Note that the code below uses local variables rather than BTaggingFlags for folder in PerfCalibrationFolders: if CalibrationFromLocalReplica: connection = "<dbConnection>sqlite://X;schema=mycool.db;dbname=OFLP200</dbConnection> "+folder+" <tag>"+CalibrationTag+"</tag>" conddb.addFolder("", connection) print 'connection string: ' + connection else: if CalibrationFromCERN: conddb.addFolder("","<dbConnection>oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_GLOBAL;dbname=OFLP200</dbConnection> "+folder+" <tag>"+CalibrationTag+"</tag>") else: if CalibrationTag == "": conddb.addFolder('GLOBAL_OFL',folder) else: conddb.addFolder('GLOBAL_OFL',folder+" <tag>"+CalibrationTag+"</tag>") if BTaggingFlags.OutputLevel < 3: print JetTagPerformanceCalibrationBroker print JetTagPerformanceSV0
channels = JetCollectionForCalib, channelAliases = BTaggingFlags.CalibrationChannelAliases, shadowFoldersAndChannels = BTaggingFlags.CalibrationSingleFolder, OutputLevel = BTaggingFlags.OutputLevel ) ToolSvc += BTagCalibrationBrokerTool theApp.Dlls+=['DetDescrCondExample','DetDescrCondTools'] from IOVDbSvc.CondDB import conddb # with new scheme, only one actual COOL folder: if BTaggingFlags.CalibrationSingleFolder: theFolders = [] theFolders.append(BTaggingFlags.CalibrationFolderRoot+'RUN12') for folder in theFolders: if BTaggingFlags.CalibrationFromLocalReplica: conddb.addFolder("","<dbConnection>sqlite://X;schema=mycool.db;dbname=OFLP200</dbConnection> "+folder+" <tag>"+BTaggingFlags.CalibrationTag+"</tag>") else: if BTaggingFlags.CalibrationFromCERN: conddb.addFolder("","<dbConnection>oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_GLOBAL;dbname=OFLP200</dbConnection> "+folder+" <tag>"+BTaggingFlags.CalibrationTag+"</tag>") else: if BTaggingFlags.CalibrationTag == "": conddb.addFolder(connSchema,folder) else: conddb.addFolder(connSchema,folder+" <tag>"+BTaggingFlags.CalibrationTag+"</tag>") if BTaggingFlags.OutputLevel < 3: print BTagCalibrationBrokerTool
if not ('conddb' in dir()): IOVDbSvc = Service("IOVDbSvc") from IOVDbSvc.CondDB import conddb # # --- Load PixelConditionsServices # if DetFlags.haveRIO.pixel_on(): # Load pixel conditions summary service from PixelConditionsServices.PixelConditionsServicesConf import PixelConditionsSummarySvc InDetPixelConditionsSummarySvc = PixelConditionsSummarySvc() # Load pixel calibration service if not athenaCommonFlags.isOnline(): if not conddb.folderRequested('/PIXEL/PixCalib'): conddb.addFolder("PIXEL_OFL","/PIXEL/PixCalib") from PixelConditionsServices.PixelConditionsServicesConf import PixelCalibSvc InDetPixelCalibSvc = PixelCalibSvc() ServiceMgr += InDetPixelCalibSvc if InDetFlags.doPrintConfigurables(): print InDetPixelCalibSvc # Load pixel special pixel map services if athenaCommonFlags.isOnline() : InDetPixelConditionsSummarySvc.UseSpecialPixelMap = False else: InDetPixelConditionsSummarySvc.UseSpecialPixelMap = True if not conddb.folderRequested('/PIXEL/PixMapShort'): conddb.addFolder("PIXEL_OFL","/PIXEL/PixMapShort") if not conddb.folderRequested('/PIXEL/PixMapLong'): conddb.addFolder("PIXEL_OFL","/PIXEL/PixMapLong")