Commit 9ee0add9 authored by Susumu Oda's avatar Susumu Oda
Browse files

Fix a wrong default key in SCT_ConfigurationCondAlg. Update testConfig.py to...

Fix a wrong default key in SCT_ConfigurationCondAlg. Update testConfig.py to run both run2MC and run2Data.
parent dcf14011
test="run2Data"
import AthenaCommon.AtlasUnixStandardJob
# Setup logger
......@@ -30,10 +32,18 @@ theApp.AuditAlgorithms=True
# Load Geometry
#--------------------------------------------------------------
from AthenaCommon.GlobalFlags import globalflags
globalflags.DetDescrVersion = "ATLAS-R2-2015-03-01-00"
if test=="run1MC":
globalflags.DetDescrVersion = "ATLAS-R1-2012-03-00-00"
globalflags.DataSource="geant4"
elif test=="run2MC":
globalflags.DetDescrVersion = "ATLAS-R2-2016-01-00-01"
globalflags.DataSource="geant4"
elif test=="run2Data":
globalflags.DetDescrVersion = "ATLAS-R2-2016-01-00-01"
globalflags.DataSource="data"
globalflags.DetGeo="atlas"
globalflags.InputFormat="pool"
globalflags.DataSource="geant4"
msg.info(globalflags)
#--------------------------------------------------------------
......@@ -75,15 +85,20 @@ include('InDetRecExample/InDetRecCabling.py')
#--------------------------------------------------------------
IOVDbSvc = Service("IOVDbSvc")
from IOVDbSvc.CondDB import conddb
IOVDbSvc.GlobalTag='OFLCOND-RUN12-SDR-25'
if (test=='run1MC'):
IOVDbSvc.GlobalTag='OFLCOND-RUN12-SDR-25'
elif (test=='run2MC'):
IOVDbSvc.GlobalTag='OFLCOND-RUN12-SDR-25'
elif (test=='run2Data'):
IOVDbSvc.GlobalTag='CONDBR2-BLKPA-2018-14'
IOVDbSvc.OutputLevel = DEBUG
test='MC'
#
#NOTE: Testing with run2 requires presence of local sqlite file 'configTest.db'
# available from http://sroe.web.cern.ch/sroe/configTest.db
#
if (test=='run1'):
if (test=='run1MC'):
#ToolSvc = ServiceMgr.ToolSvc
conddb.addFolder("","<db>sqlite://none;schema=/tmp/sroe/mycool.db;dbname=LOCAL</db> /SCT/DAQ/Configuration/ROD <tag>SctDaqConfigurationRod-MC-06</tag><forceTimestamp>1333597198</forceTimestamp>")
conddb.addFolder("","<db>sqlite://none;schema=/tmp/sroe/mycool.db;dbname=LOCAL</db> /SCT/DAQ/Configuration/MUR <tag>SctDaqConfigurationMur-MC-06</tag><forceTimestamp>1333597198</forceTimestamp>")
......@@ -99,7 +114,7 @@ if (test=='run1'):
conddb.addFolder("","<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Configuration/Geog <tag>SctDaqConfigurationGeog-MC-06</tag> <forceTimestamp>1333597198</forceTimestamp>")
conddb.addFolder("","<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Configuration/RODMUR <tag>SctDaqConfigurationRodmur-MC-06</tag> <forceTimestamp>1333597198</forceTimestamp>")
'''
else:
elif (test=='run2MC'):
'''
conddb.addFolder("","<db>sqlite://none;schema=/tmp/sroe/mycool.db;dbname=OFLP200</db> /SCT/DAQ/Config/ROD <tag>SctDaqConfigRod-MC-06</tag><forceRunNumber>20</forceRunNumber>")
conddb.addFolder("","<db>sqlite://none;schema=/tmp/sroe/mycool.db;dbname=OFLP200</db> /SCT/DAQ/Config/MUR <tag>SctDaqConfigMur-MC-06</tag><forceRunNumber>20</forceRunNumber>")
......@@ -141,13 +156,26 @@ else:
conddb.addFolder("","<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Config/Geog <tag>SctDaqConfigGeog-PERFECT-Oct2016_00</tag><forceRunNumber>200805</forceRunNumber>")
if not conddb.folderRequested("/SCT/DAQ/Config/RODMUR"):
conddb.addFolder("","<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Config/RODMUR <tag>SctDaqConfigRodmur-PERFECT-Oct2016_00</tag><forceRunNumber>200805</forceRunNumber>")
from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup
sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup()
sct_ConfigurationConditionsToolSetup.setChannelFolderDb("<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Config/Chip <tag>SctDaqConfigChip-PERFECT-Oct2016_00</tag><forceRunNumber>200805</forceRunNumber>")
sct_ConfigurationConditionsToolSetup.setModuleFolderDb("<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Config/Module <tag>SctDaqConfigModule-PERFECT-Oct2016_00</tag><forceRunNumber>200805</forceRunNumber>")
sct_ConfigurationConditionsToolSetup.setMurFolderDb("<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Config/MUR <tag>SctDaqConfigMur-PERFECT-Oct2016_00</tag><forceRunNumber>200805</forceRunNumber>")
sct_ConfigurationConditionsToolSetup.setDbInstance("")
if (test=='run1MC'):
sct_ConfigurationConditionsToolSetup.setChannelFolderDb("<db>sqlite://none;schema=/tmp/sroe/mycool.db;dbname=LOCAL</db> /SCT/DAQ/Configuration/Chip <tag>SctDaqConfigurationChip-MC-06</tag><forceTimestamp>1333597198</forceTimestamp>")
sct_ConfigurationConditionsToolSetup.setModuleFolderDb("<db>sqlite://none;schema=/tmp/sroe/mycool.db;dbname=LOCAL</db> /SCT/DAQ/Configuration/Module <tag>SctDaqConfigurationModule-MC-06</tag><forceTimestamp>1333597198</forceTimestamp>")
sct_ConfigurationConditionsToolSetup.setMurFolderDb("<db>sqlite://none;schema=/tmp/sroe/mycool.db;dbname=LOCAL</db> /SCT/DAQ/Configuration/MUR <tag>SctDaqConfigurationMur-MC-06</tag><forceTimestamp>1333597198</forceTimestamp>")
sct_ConfigurationConditionsToolSetup.setDbInstance("")
elif (test=='run2MC'):
sct_ConfigurationConditionsToolSetup.setChannelFolderDb("<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Config/Chip <tag>SctDaqConfigChip-PERFECT-Oct2016_00</tag><forceRunNumber>200805</forceRunNumber>")
sct_ConfigurationConditionsToolSetup.setModuleFolderDb("<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Config/Module <tag>SctDaqConfigModule-PERFECT-Oct2016_00</tag><forceRunNumber>200805</forceRunNumber>")
sct_ConfigurationConditionsToolSetup.setMurFolderDb("<db>COOLOFL_SCT/OFLP200</db> /SCT/DAQ/Config/MUR <tag>SctDaqConfigMur-PERFECT-Oct2016_00</tag><forceRunNumber>200805</forceRunNumber>")
sct_ConfigurationConditionsToolSetup.setDbInstance("")
elif (test=='run2Data'):
sct_ConfigurationConditionsToolSetup.setChannelFolderDb("/SCT/DAQ/Config/Chip")
sct_ConfigurationConditionsToolSetup.setModuleFolderDb("/SCT/DAQ/Config/Module")
sct_ConfigurationConditionsToolSetup.setMurFolderDb("/SCT/DAQ/Config/MUR")
sct_ConfigurationConditionsToolSetup.setup()
from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_ConfigurationConditionsTestAlg
......@@ -161,8 +189,12 @@ if numThreads >= 2:
MyConfigTestAlg.Cardinality = numThreads
import AthenaCommon.AtlasUnixGeneratorJob
ServiceMgr.EventSelector.RunNumber =200805
ServiceMgr.EventSelector.InitialTimeStamp=1333597198
if (test=='run1MC') or (test=='run2MC'):
ServiceMgr.EventSelector.RunNumber=200805
ServiceMgr.EventSelector.InitialTimeStamp=1333597198
elif (test=='run2Data'):
ServiceMgr.EventSelector.RunNumber=364214
ServiceMgr.EventSelector.InitialTimeStamp=1540243090 # 2018-10-22T23:18:10+02:00, Run 364214, LB 51
theApp.EvtMax = 20
ServiceMgr.MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M"
......
......@@ -55,7 +55,7 @@ class SCT_ConfigurationCondAlg : public AthReentrantAlgorithm
static const std::string s_coolMurFolderName;
static const std::string s_coolMurFolderName2;
SG::ReadCondHandleKey<CondAttrListVec> m_readKeyChannel{this, "ReadKeyChannel", "/SCT/DAQ/Configuration/Chip", "Key of input (raw) conditions folder of chips"};
SG::ReadCondHandleKey<CondAttrListVec> m_readKeyChannel{this, "ReadKeyChannel", "/SCT/DAQ/Config/Chip", "Key of input (raw) conditions folder of chips"};
SG::ReadCondHandleKey<CondAttrListVec> m_readKeyModule{this, "ReadKeyModule", "/SCT/DAQ/Config/Module", "Key of input (raw) conditions folder of modules"};
SG::ReadCondHandleKey<CondAttrListVec> m_readKeyMur{this, "ReadKeyMur", "/SCT/DAQ/Config/MUR", "Key of input (raw) conditions folder of Murs"};
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment