示例#1
0
    def initConfigTool(self, instanceName):
        "Init configuration conditions tool"

        # Set up SCT cabling
        from AthenaCommon.Include import include
        include('InDetRecExample/InDetRecCabling.py')

        from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
        from IOVDbSvc.CondDB import conddb
        if conddb.dbdata == "COMP200" or InDetTrigFlags.ForceCoraCool():
            sctdaqpath = '/SCT/DAQ/Configuration'
        else:
            sctdaqpath = '/SCT/DAQ/Config'

        if InDetTrigFlags.ForceCoolVectorPayload():
            sctdaqpath = '/SCT/DAQ/Config'

        from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup
        sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup(
        )
        sct_ConfigurationConditionsToolSetup.setChannelFolder(sctdaqpath +
                                                              "/Chip")
        sct_ConfigurationConditionsToolSetup.setModuleFolder(sctdaqpath +
                                                             "/Module")
        sct_ConfigurationConditionsToolSetup.setMurFolder(sctdaqpath + "/MUR")
        sct_ConfigurationConditionsToolSetup.setToolName(instanceName)
        sct_ConfigurationConditionsToolSetup.setup()
        configTool = sct_ConfigurationConditionsToolSetup.getTool()
        if self._print: print(configTool)
        if not (configTool.getFullName() in self.summaryTool.ConditionsTools):
            self.summaryTool.ConditionsTools += [configTool.getFullName()]

        if self._print: print(self.condDB)
        return configTool
    def initConfigSvc(self, instanceName):
        "Init configuration conditions service"

        if hasattr(self.svcMgr, instanceName):
            configSvc = getattr(self.svcMgr, instanceName)
        else:
            from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConfigurationConditionsSvc
            configSvc = SCT_ConfigurationConditionsSvc(name=instanceName)
            self.svcMgr += configSvc
            if self._print: print configSvc

        self.summarySvc.ConditionsServices += [instanceName]

        from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
        from IOVDbSvc.CondDB import conddb
        if conddb.dbdata == "COMP200" or InDetTrigFlags.ForceCoraCool():
            sctdaqpath = '/SCT/DAQ/Configuration'
        else:
            sctdaqpath = '/SCT/DAQ/Config'

        if InDetTrigFlags.ForceCoolVectorPayload():
            sctdaqpath = '/SCT/DAQ/Config'

        if not self.condDB.folderRequested(sctdaqpath + '/Chip'):
            self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/Chip',
                                         sctdaqpath + '/Chip')
        if not self.condDB.folderRequested(sctdaqpath + '/Module'):
            self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/Module',
                                         sctdaqpath + '/Module')
        if not self.condDB.folderRequested(sctdaqpath + '/MUR'):
            self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/MUR',
                                         sctdaqpath + '/MUR')

        if not self.condDB.folderRequested(sctdaqpath + '/ROD'):
            self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/ROD',
                                         sctdaqpath + '/ROD')
        if not self.condDB.folderRequested(sctdaqpath + '/RODMUR'):
            self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/RODMUR',
                                         sctdaqpath + '/RODMUR')
        if not self.condDB.folderRequested(sctdaqpath + '/Geog'):
            self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/Geog',
                                         sctdaqpath + '/Geog')

        if self._print: print self.condDB
        return configSvc