Skip to content
Snippets Groups Projects
Commit f8e9d82b authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Use Git version of STCOND if possible

parent 094a1c1c
No related branches found
No related tags found
3 merge requests!206Rebase RichTTFUStudies to current master,!178Master 2 future,!170GitCondDB support for STMonitor
......@@ -18,7 +18,7 @@ def patchMessages():
msg=Configs.LHCb__FmcMessageSvc('MessageSvc')
msg.LoggerOnly = True
msg.fifoPath = os.environ['LOGFIFO']
msg.OutputLevel = 3
msg.OutputLevel = 3
msg.doPrintAlways = True #False
def SetupApplicationMgr(task):
......@@ -42,7 +42,7 @@ def SetupApplicationMgr(task):
for i in [ 'ToolSvc' , 'AuditorSvc' ] :
ApplicationMgr().ExtSvc.append( i )
#importOptions("/group/st/sw/OnlineMonitoring/scripts/Online.opts")
mepMgr = OnlineEnv.mepManager(OnlineEnv.PartitionID,OnlineEnv.PartitionName,['Events'],True)
......@@ -96,6 +96,29 @@ def DatabaseTags(task):
CondDB().EnableRunStampCheck = False
if task in [ 'STCalibMon', 'ITNZSMon', 'TTNZSMon' ]:
try:
from DDDB.Configuration import GIT_CONDDBS
except ImportError:
GIT_CONDDBS = {}
if 'STCOND' in GIT_CONDDBS:
# get Git CondDB access component
from Configurables import GitEntityResolver, XmlParserSvc
from Gaudi.Configuration import appendPostConfigAction
GitSTCOND = GitEntityResolver('GitSTCOND',
PathToRepository=GIT_CONDDBS['STCOND'])
GitSTCOND.Ignore = r'^(?!(lhcb\.xml$|[IT]TCondDB)).*$'
# FIXME: this is ugly but it's unavoidable until we get
# https://its.cern.ch/jira/browse/LHCBPS-1738 fixed
def inject_git_stcond():
try:
xps = XmlParserSvc()
xps.EntityResolver.EntityResolvers.insert(0, GitSTCOND)
except AttributeError:
# ignore non git-based configuration
pass
appendPostConfigAction(inject_git_stcond)
# it's fine to set the SQLite access when using Git because it's ignored
# in that case
from Configurables import CondDB, CondDBAccessSvc
connection="sqlite_file:$STSQLDDDBROOT/db/STCOND.db/COND"
CondDB().addLayer(CondDBAccessSvc("COND",ConnectionString=connection))
......
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