Skip to content
Snippets Groups Projects
Commit 1938c339 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'master-tile-sfr-tags-remove' into 'master'

TileConditions+TileSimAlgs: Remove Tile hardcoded tags for sampling fraction

See merge request atlas/athena!52932
parents 739df949 88d0cbac
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,8 @@ def getTileCondProxy(technology, type, source, name, **kwargs): ...@@ -54,6 +54,8 @@ def getTileCondProxy(technology, type, source, name, **kwargs):
conddb.addFolderSplitMC(conn, folderstr, folderstr2, className = 'CondAttrListCollection') conddb.addFolderSplitMC(conn, folderstr, folderstr2, className = 'CondAttrListCollection')
if tileCoolMgr.isOfflineOnly(source): if tileCoolMgr.isOfflineOnly(source):
conddb.addFolder(conn, folderstr, className = 'CondAttrListCollection') conddb.addFolder(conn, folderstr, className = 'CondAttrListCollection')
if tileCoolMgr.isForceMC(source):
conddb.addFolder(conn, folderstr, className = 'CondAttrListCollection', forceMC=True)
if tileCoolMgr.isSplitOnline(source): if tileCoolMgr.isSplitOnline(source):
conddb.addFolderSplitOnline(conn, folderstr, folderstr2, className = 'CondAttrListCollection') conddb.addFolderSplitOnline(conn, folderstr, folderstr2, className = 'CondAttrListCollection')
if tileCoolMgr.isSqlite(source): if tileCoolMgr.isSqlite(source):
......
...@@ -18,7 +18,7 @@ class TileCoolMgr(object): ...@@ -18,7 +18,7 @@ class TileCoolMgr(object):
self.__idDict = {} self.__idDict = {}
#=== Available folder types #=== Available folder types
self.__validTypes = ["SplitMC", "SplitOnline", "OfflineOnly", "Sqlite"] self.__validTypes = ["SplitMC", "SplitOnline", "OfflineOnly", "Sqlite", "ForceMC"]
#=== do we run on real data (not MC)? #=== do we run on real data (not MC)?
self._isMC=isMC self._isMC=isMC
...@@ -39,7 +39,7 @@ class TileCoolMgr(object): ...@@ -39,7 +39,7 @@ class TileCoolMgr(object):
def addSource(self, condId, folder, connStr, tag, folder2, type, key = ""): def addSource(self, condId, folder, connStr, tag, folder2, type, key = ""):
if type not in self.__validTypes: if type not in self.__validTypes:
self.__log.error("Folder type \'%s\' not recognized!", type) self.__log.error("Folder type \'%s\' not recognized!", type)
if (type != "OfflineOnly") and (folder2 == ""): if (type not in ["OfflineOnly", "ForceMC"]) and (folder2 == ""):
self.__log.error("For folder type \'%s\' second folder name required!", type) self.__log.error("For folder type \'%s\' second folder name required!", type)
self.__idDict[condId] = [folder, connStr, tag, folder2, type, key] self.__idDict[condId] = [folder, connStr, tag, folder2, type, key]
...@@ -115,6 +115,17 @@ class TileCoolMgr(object): ...@@ -115,6 +115,17 @@ class TileCoolMgr(object):
return False return False
#_______________________________________________________________ #_______________________________________________________________
def isForceMC(self, condId):
idInfo = self.__idDict.get(condId)
if not idInfo:
self.__log.error("CondId \'%s\' not recognized!", condId)
return None
else:
if idInfo[4]=="ForceMC":
return True
else:
return False
#_______________________________________________________________
def isSqlite(self, condId): def isSqlite(self, condId):
idInfo = self.__idDict.get(condId) idInfo = self.__idDict.get(condId)
if not idInfo: if not idInfo:
...@@ -270,7 +281,7 @@ class TileCoolMgr(object): ...@@ -270,7 +281,7 @@ class TileCoolMgr(object):
self.addSource('OfcOf1Las', '/TILE/ONL01/FILTER/OF1/LAS', defConnStr, "", '/TILE/ONL01/FILTER/OF1/LAS', 'SplitMC') self.addSource('OfcOf1Las', '/TILE/ONL01/FILTER/OF1/LAS', defConnStr, "", '/TILE/ONL01/FILTER/OF1/LAS', 'SplitMC')
#--- sampling fraction #--- sampling fraction
self.addSource('oflSampFrac', '/TILE/OFL02/CALIB/SFR', oflConnStr, "TileOfl02CalibSfr-SIM-00", "", 'OfflineOnly', '/TILE/OFL02/CALIB/SFR') self.addSource('oflSampFrac', '/TILE/OFL02/CALIB/SFR', oflConnStr, "", "", 'ForceMC', '/TILE/OFL02/CALIB/SFR')
if (self._dbInstance == 'CONDBR2'): if (self._dbInstance == 'CONDBR2'):
#--- OFCs #--- OFCs
......
...@@ -31,9 +31,9 @@ def TileSamplingFractionCondAlgCfg(flags, **kwargs): ...@@ -31,9 +31,9 @@ def TileSamplingFractionCondAlgCfg(flags, **kwargs):
TileCondProxyCoolFlt = CompFactory.getComp("TileCondProxyCool<TileCalibDrawerFlt>") TileCondProxyCoolFlt = CompFactory.getComp("TileCondProxyCool<TileCalibDrawerFlt>")
samplingFractionProxy = TileCondProxyCoolFlt('TileCondProxyCool_SamplingFraction', Source = samplingFractionFolder) samplingFractionProxy = TileCondProxyCoolFlt('TileCondProxyCool_SamplingFraction', Source = samplingFractionFolder)
samplingFractionTag = 'TileOfl02CalibSfr-SIM-02' samplingFractionTag = None # Tag connected to global conditions tag is used by default
if flags.GeoModel.Run >= LHCPeriod.Run4 or flags.Overlay.DataOverlay: if flags.GeoModel.Run >= LHCPeriod.Run4 or flags.Overlay.DataOverlay:
samplingFractionTag = 'TileOfl02CalibSfr-SIM-05' samplingFractionTag = 'TileOfl02CalibSfr-SIM-07'
from IOVDbSvc.IOVDbSvcConfig import addFolders from IOVDbSvc.IOVDbSvcConfig import addFolders
acc.merge( addFolders(flags, samplingFractionFolder + f'<key>{samplingFractionFolder}</key>', acc.merge( addFolders(flags, samplingFractionFolder + f'<key>{samplingFractionFolder}</key>',
......
...@@ -11,9 +11,6 @@ msg = logging.getLogger( 'TileSamplingFraction_jobOptions.py' ) ...@@ -11,9 +11,6 @@ msg = logging.getLogger( 'TileSamplingFraction_jobOptions.py' )
from TileConditions.TileInfoConfigurator import TileInfoConfigurator from TileConditions.TileInfoConfigurator import TileInfoConfigurator
tileInfoConfigurator = TileInfoConfigurator() tileInfoConfigurator = TileInfoConfigurator()
tileInfoConfigurator.setupCOOLSFR() tileInfoConfigurator.setupCOOLSFR()
# Temporary solution (this folder is only here)
conddb.blockFolder('/TILE/OFL02/CALIB/SFR')
conddb.addFolderWithTag('TILE_OFL','/TILE/OFL02/CALIB/SFR','TileOfl02CalibSfr-SIM-02',force=True,forceMC=True,className='CondAttrListCollection')
try: try:
from Digitization.DigitizationFlags import jobproperties from Digitization.DigitizationFlags import jobproperties
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment