] SpecialPixelMapSvc.SpecialPixelMapKeys = ['SpecialPixelMap', 'PixMapLong'] conddb.iovdbsvc.Folders += [ "<dbConnection> oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_PIXEL;dbname=COMP200 </dbConnection> /PIXEL/PixMapShort <tag>" + ReferenceTag + "</tag>" + "<key> /PIXEL/PixMapShortRef_oracle </key>" ] conddb.iovdbsvc.Folders += [ "<dbConnection> oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_PIXEL;dbname=COMP200 </dbConnection> /PIXEL/PixMapLong <tag>" + ReferenceLongTag + "</tag>" + "<key> /PIXEL/PixMapLongRef_oracle </key>" ] if os.path.isfile("noisemap.db"): SpecialPixelMapSvc.OverlayFolder = '/PIXEL/PixMapShortRef_sqlite' SpecialPixelMapSvc.OverlayLongFolder = '/PIXEL/PixMapLongRef_sqlite' SpecialPixelMapSvc.OverlayKey = 'PixMapShort_sqlite' SpecialPixelMapSvc.OverlayLongKey = 'PixMapLong_sqlite' SpecialPixelMapSvc.ModuleLevelOverlay = True conddb.iovdbsvc.Folders += [ "<dbConnection> sqlite://;schema=noisemap.db;dbname=COMP200 </dbConnection> /PIXEL/PixMapShort <tag>" + ReferenceTag + "</tag>" + "<key> /PIXEL/PixMapShortRef_sqlite </key>" ] conddb.iovdbsvc.Folders += [ "<dbConnection> sqlite://;schema=noisemap.db;dbname=COMP200 </dbConnection> /PIXEL/PixMapLong <tag>" + ReferenceLongTag + "</tag>" + "<key> /PIXEL/PixMapLongRef_sqlite </key>" ] ## configure the PixMapDBWriter algorithm:
def createSvc(self): from AthenaCommon.AppMgr import ToolSvc, ServiceMgr, theApp from IOVDbSvc.CondDB import conddb from PixelConditionsServices.PixelConditionsServicesConf import PixelConditionsSummarySvc as pixSummarySvc PixelConditionsSummarySvc = \ pixSummarySvc(name=self.instanceName('PixelConditionsSummarySvc'), UseDCS = self.useDCS, UseByteStream=self.useBS, #UseSpecialPixelMap= not self.onlineMode, UseSpecialPixelMap=True, UseTDAQ=self.useTDAQ ) #active states used by dcs (if on) if self.useDCS and not self.onlineMode: PixelConditionsSummarySvc.IsActiveStates = ['READY', 'ON'] PixelConditionsSummarySvc.IsActiveStatus = ['OK', 'WARNING'] ServiceMgr += PixelConditionsSummarySvc if self._print: print PixelConditionsSummarySvc # #create another instance of the PixelConditionsSummarySvc w/o BS # # service to be used with RegionSelector # InDetTrigRSPixelConditionsSummarySvc = pixSummarySvc(name='InDetTrigRSPixelConditionsSummarySvc', # UseDCS = self.useDCS, # UseByteStream=self.useBS # UseSpecialPixelMap= True, # ) # ServiceMgr += InDetTrigRSPixelConditionsSummarySvc # if self._print: print InDetTrigRSPixelConditionsSummarySvc if not self.onlineMode: from PixelConditionsServices.PixelConditionsServicesConf import PixelCalibSvc PixelCalibSvc = PixelCalibSvc( name=self.instanceName('PixelCalibSvc')) if not conddb.folderRequested("/PIXEL/PixCalib"): conddb.addFolder("PIXEL_OFL", "/PIXEL/PixCalib") if self._print: print PixelCalibSvc #only when inputsource=1 #if not conddb.folderRequested("/PIXEL/PixReco"): # conddb.addFolder("PIXEL_OFL","/PIXEL/PixReco") if not conddb.folderRequested("/PIXEL/PixReco"): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixReco", "/PIXEL/PixReco") #Configure PixelRecoDbTool from PixelConditionsTools.PixelConditionsToolsConf import PixelRecoDbTool PixelRecoDbTool = PixelRecoDbTool( name=self.instanceName('PixelRecoDbTool')) ToolSvc += PixelRecoDbTool PixelRecoDbTool.InputSource = 2 # if self.onlineMode: # PixelRecoDbTool.InputSource = 1 #after change of run1 conditions # else: # PixelRecoDbTool.InputSource = 2 if self._print: print PixelRecoDbTool #use corresponding PixelRecoDBTool from PixelConditionsServices.PixelConditionsServicesConf import PixelOfflineCalibSvc PixelOfflineCalibSvc = PixelOfflineCalibSvc( self.instanceName('PixelOfflineCalibSvc')) PixelOfflineCalibSvc.PixelRecoDbTool = PixelRecoDbTool ServiceMgr += PixelOfflineCalibSvc if self._print: print PixelOfflineCalibSvc ### configure the special pixel map service if not (conddb.folderRequested("/PIXEL/PixMapShort") or conddb.folderRequested("/PIXEL/Onl/PixMapShort")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixMapShort", "/PIXEL/PixMapShort") if not (conddb.folderRequested("/PIXEL/PixMapLong") or conddb.folderRequested("/PIXEL/Onl/PixMapLong")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixMapLong", "/PIXEL/PixMapLong") if not (conddb.folderRequested("/PIXEL/NoiseMapShort") or conddb.folderRequested("/PIXEL/Onl/NoiseMapShort")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/NoiseMapShort", "/PIXEL/NoiseMapShort") if not (conddb.folderRequested("/PIXEL/NoiseMapLong") or conddb.folderRequested("/PIXEL/Onl/NoiseMapLong")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/NoiseMapLong", "/PIXEL/NoiseMapLong") if not (conddb.folderRequested("/PIXEL/PixMapOverlay") or conddb.folderRequested("/PIXEL/Onl/PixMapOverlay")): conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/PixMapOverlay", "/PIXEL/PixMapOverlay") from PixelConditionsServices.PixelConditionsServicesConf import SpecialPixelMapSvc SpecialPixelMapSvc = SpecialPixelMapSvc(name='SpecialPixelMapSvc') ServiceMgr += SpecialPixelMapSvc SpecialPixelMapSvc.DBFolders = [ "/PIXEL/PixMapShort", "/PIXEL/PixMapLong" ] SpecialPixelMapSvc.SpecialPixelMapKeys = [ "SpecialPixelMap", "SpecialPixelMapLong" ] SpecialPixelMapSvc.DBFolders += [ "/PIXEL/NoiseMapShort", "/PIXEL/NoiseMapLong" ] SpecialPixelMapSvc.SpecialPixelMapKeys += [ "NoiseMapShort", "NoiseMapLong" ] SpecialPixelMapSvc.OverlayKey = "PixMapOverlay" SpecialPixelMapSvc.OverlayFolder = "/PIXEL/PixMapOverlay" ServiceMgr += SpecialPixelMapSvc #theApp.CreateSvc += [ 'SpecialPixelMapSvc/%s' % self.instanceName('SpecialPixelMapSvc') ] if self._print: print SpecialPixelMapSvc from AthenaCommon.AthenaCommonFlags import athenaCommonFlags from AthenaCommon.GlobalFlags import globalflags if self.useDCS or self.onlineMode: #sim if globalflags.DataSource() == 'geant4' or ( not athenaCommonFlags.isOnline()): if not conddb.folderRequested('/PIXEL/DCS/TEMPERATURE'): conddb.addFolder("DCS_OFL", "/PIXEL/DCS/TEMPERATURE") if not conddb.folderRequested('/PIXEL/DCS/HV'): conddb.addFolder("DCS_OFL", "/PIXEL/DCS/HV") if not conddb.folderRequested('/PIXEL/DCS/FSMSTATUS'): conddb.addFolder("DCS_OFL", "/PIXEL/DCS/FSMSTATUS") if not conddb.folderRequested('/PIXEL/DCS/FSMSTATE'): conddb.addFolder("DCS_OFL", "/PIXEL/DCS/FSMSTATE") else: if not conddb.folderRequested('/PIXEL/HLT/DCS/TEMPERATURE'): conddb.addFolder("PIXEL_ONL", "/PIXEL/HLT/DCS/TEMPERATURE") #conddb.addFolder("PIXEL","/PIXEL/HLT/DCS/TEMPERATURE <tag>PixDCSTemp-UPD1-00</tag>") if not conddb.folderRequested('/PIXEL/HLT/DCS/HV'): conddb.addFolder("PIXEL_ONL", "/PIXEL/HLT/DCS/HV") #conddb.addFolder("PIXEL","/PIXEL/HLT/DCS/HV <tag>PixDCSHV-UPD1-00</tag>") from PixelConditionsServices.PixelConditionsServicesConf import PixelDCSSvc InDetPixelDCSSvc = PixelDCSSvc( name='TrigPixelDCSSvc', RegisterCallback=True, TemperatureFolder="/PIXEL/DCS/TEMPERATURE", HVFolder="/PIXEL/DCS/HV", FSMStatusFolder="/PIXEL/DCS/FSMSTATUS", FSMStateFolder="/PIXEL/DCS/FSMSTATE", TemperatureFieldName="temperature", HVFieldName="HV", FSMStatusFieldName="FSM_status", FSMStateFieldName="FSM_state", UseFSMStatus=False, UseFSMState=False) if globalflags.DataSource() == 'data': if (not athenaCommonFlags.isOnline()): InDetPixelDCSSvc.TemperatureFolder = "/PIXEL/DCS/TEMPERATURE" InDetPixelDCSSvc.HVFolder = "/PIXEL/DCS/HV" else: InDetPixelDCSSvc.TemperatureFolder = "/PIXEL/HLT/DCS/TEMPERATURE" InDetPixelDCSSvc.HVFolder = "/PIXEL/HLT/DCS/HV" ServiceMgr += InDetPixelDCSSvc if self.useDCS or self.onlineMode: if self._print: print InDetPixelDCSSvc #this needs also updates how LorentzAngleSvc is accessed () from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleSvc PixelLorentzAngleSvc = SiLorentzAngleSvc(name='PixelLorentzAngleSvc') from PixelConditionsServices.PixelConditionsServicesConf import PixelSiliconConditionsSvc pixelSiliconConditionsSvc = PixelSiliconConditionsSvc( name=self.instanceName('PixelSiliconConditionsSvc'), PixelDCSSvc='TrigPixelDCSSvc') pixelSiliconConditionsSvc.ForceUseGeoModel = False pixelSiliconConditionsSvc.UseDBForHV = True pixelSiliconConditionsSvc.UseDBForTemperature = True ServiceMgr += pixelSiliconConditionsSvc PixelLorentzAngleSvc.SiConditionsServices = pixelSiliconConditionsSvc PixelLorentzAngleSvc.UseMagFieldSvc = True #may need also MagFieldSvc instance #if self.useDCS or self.onlineMode: #if (globalflags.DataSource() == 'data'): #else: #pixelSiliconConditionsSvc.ForceUseGeoModel = True #PixelLorentzAngleSvc.pixelForceUseGeoModel() if self._print: print pixelSiliconConditionsSvc print PixelLorentzAngleSvc
#conddb.iovdbsvc.Folders += [ "<dbConnection>sqlite://;schema=noisemap.db;dbname=OFLP200</dbConnection> /PIXEL/NoiseMap <tag>NoiseMap-000-00</tag>" ] #conddb.iovdbsvc.Folders += [ "<dbConnection>sqlite://;schema=module_overlay.db;dbname=COMP200</dbConnection> /PIXEL/PixMapOverlay <tag>PixMapOverlay-Test-00</tag>" ] ### configure the special pixel map service from PixelConditionsServices.PixelConditionsServicesConf import SpecialPixelMapSvc SpecialPixelMapSvc = SpecialPixelMapSvc() SpecialPixelMapSvc.DBFolders = ["/PIXEL/PixMapShort", "/PIXEL/PixMapLong"] SpecialPixelMapSvc.SpecialPixelMapKeys = [ "SpecialPixelMap", "SpecialPixelMapLong" ] SpecialPixelMapSvc.OverlayFolder = "/PIXEL/PixMapOverlay" SpecialPixelMapSvc.OverlayKey = "PixMapOverlay" #SpecialPixelMapSvc.RegisterCallback = False #SpecialPixelMapSvc.DataSource = "Textfiles" SpecialPixelMapSvc.ModuleIDsForPrinting = ["all"] ### configure the event selector ServiceMgr.EventSelector.RunNumber = 5 ### define the job from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence()
] conddb.iovdbsvc.Folders += [ "<dbConnection> oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_PIXEL;dbname=COMP200 </dbConnection> /PIXEL/NoiseMapShort <tag>" + ReferenceTag + "</tag>" + "<key> /PIXEL/NoiseMapShortRef_oracle </key>" ] conddb.iovdbsvc.Folders += [ "<dbConnection> oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_PIXEL;dbname=COMP200 </dbConnection> /PIXEL/NoiseMapLong <tag>" + ReferenceLongTag + "</tag>" + "<key> /PIXEL/NoiseMapLongRef_oracle </key>" ] if os.path.isfile("noisemap.db"): SpecialPixelMapSvc.OverlayFolder = '/PIXEL/NoiseMapShortRef_sqlite' SpecialPixelMapSvc.OverlayLongFolder = '/PIXEL/NoiseMapLongRef_sqlite' SpecialPixelMapSvc.OverlayKey = 'NoiseMapShort_sqlite' SpecialPixelMapSvc.OverlayLongKey = 'NoiseMapLong_sqlite' SpecialPixelMapSvc.ModuleLevelOverlay = True conddb.iovdbsvc.Folders += [ "<dbConnection> sqlite://;schema=noisemap.db;dbname=COMP200 </dbConnection> /PIXEL/NoiseMapShort <tag>" + ReferenceTag + "</tag>" + "<key> /PIXEL/NoiseMapShortRef_sqlite </key>" ] conddb.iovdbsvc.Folders += [ "<dbConnection> sqlite://;schema=noisemap.db;dbname=COMP200 </dbConnection> /PIXEL/NoiseMapLong <tag>" + ReferenceLongTag + "</tag>" + "<key> /PIXEL/NoiseMapLongRef_sqlite </key>" ] ## configure the PixMapDBWriter algorithm: