示例#1
0
def setSCT_CablingDataBase():
    from IOVDbSvc.CondDB import conddb
    from InDetRecExample.InDetJobProperties import InDetFlags

    SCTConfigurationFolderPath='/SCT/DAQ/Config/'

    #if its COMP200, use old folders...
    if (conddb.dbdata == "COMP200"):
        SCTConfigurationFolderPath='/SCT/DAQ/Configuration/'

    #...but now check if we want to override that decision with explicit flag (if there is one)
    try:
        if InDetFlags.ForceCoraCool():
            SCTConfigurationFolderPath='/SCT/DAQ/Configuration/'
    except Exception:
        pass

    try:
        if InDetFlags.ForceCoolVectorPayload():
            SCTConfigurationFolderPath='/SCT/DAQ/Config/'
    except Exception:
        pass

    try:
        if (InDetFlags.ForceCoolVectorPayload() and InDetFlags.ForceCoraCool()):
            # Setup logger
            from AthenaCommon.Logging import logging
            msg = logging.getLogger("SCT_CablingConfig")
            msg.setLevel(logging.INFO)
            msg.warning("*** SCT DB CONFIGURATION FLAG CONFLICT: Both CVP and CoraCool selected****")
            SCTConfigurationFolderPath=''
    except Exception:
        pass
        
    SCTRodConfigPath=SCTConfigurationFolderPath+'ROD'
    SCTMurConfigPath=SCTConfigurationFolderPath+'MUR'
    SCTRodMurConfigPath=SCTConfigurationFolderPath+'RODMUR'
    SCTGeogConfigPath=SCTConfigurationFolderPath+'Geog'

    if not conddb.folderRequested(SCTRodConfigPath):
        conddb.addFolderSplitMC("SCT",SCTRodConfigPath,SCTRodConfigPath, className="CondAttrListVec")
    if not conddb.folderRequested(SCTMurConfigPath):
        conddb.addFolderSplitMC("SCT", SCTMurConfigPath, SCTMurConfigPath, className="CondAttrListVec")
    if not conddb.folderRequested(SCTRodMurConfigPath):
        conddb.addFolderSplitMC("SCT",SCTRodMurConfigPath,SCTRodMurConfigPath, className="CondAttrListVec")
    if not conddb.folderRequested(SCTGeogConfigPath):
        conddb.addFolderSplitMC("SCT",SCTGeogConfigPath,SCTGeogConfigPath, className="CondAttrListVec")

    return SCTConfigurationFolderPath
示例#2
0
#
if DetFlags.detdescr.SCT_on() and not 'SCT_CablingSvc' in dir():
    SCTCablingDataSource = 'CORACOOL'
    SCTConfigurationFolderPath = '/SCT/DAQ/Config/'
    #if its COMP200, use old folders...
    if (conddb.dbdata == "COMP200"):
        SCTConfigurationFolderPath = '/SCT/DAQ/Configuration/'
    #...but now check if we want to override that decision with explicit flag (if there is one)
    try:
        if InDetFlags.ForceCoraCool():
            SCTConfigurationFolderPath = '/SCT/DAQ/Configuration/'
    except:
        pass

    try:
        if InDetFlags.ForceCoolVectorPayload():
            SCTConfigurationFolderPath = '/SCT/DAQ/Config/'
    except:
        pass

    try:
        if (InDetFlags.ForceCoolVectorPayload()
                and InDetFlags.ForceCoraCool()):
            print '*** SCT DB CONFIGURATION FLAG CONFLICT: Both CVP and CoraCool selected****'
            SCTConfigurationFolderPath = ''
    except:
        pass

    #to read SCT cabling from db
    from SCT_Cabling.SCT_CablingConf import SCT_CablingSvc
    SCT_CablingSvc = SCT_CablingSvc(DataSource="CORACOOL")