Skip to content
Snippets Groups Projects
Commit 1aa80651 authored by John Chapman's avatar John Chapman
Browse files

Add a new Common.Project ConfigFlag

parent f7b3f40a
No related merge requests found
......@@ -25,6 +25,14 @@ def _createCfgFlags():
acf.addFlag('Common.isOnline', False ) # Job runs in an online environment (access only to resources available at P1) # former global.isOnline
def _checkProject():
import os
if "AthSimulation_DIR" in os.environ:
return "AthSimulation"
#TODO expand this method.
return "Athena"
acf.addFlag('Common.Project', _checkProject())
# replace global.Beam*
acf.addFlag('Beam.BunchSpacing', 25) # former global.BunchSpacing
acf.addFlag("Beam.NumberOfCollisions",0) # former global.NumberOfCollisions
......
......@@ -49,8 +49,7 @@ def SCT_GeometryCfg( flags ):
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
else:
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align"))
import os
if "AthSimulation_DIR" not in os.environ: # Protection for AthSimulation builds
if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds
if (not flags.Detector.SimulateSCT) or flags.Detector.OverlaySCT:
from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_AlignCondAlg
sctAlignCondAlg = SCT_AlignCondAlg(name = "SCT_AlignCondAlg",
......
......@@ -46,8 +46,7 @@ def TRT_GeometryCfg( flags ):
acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Align","/TRT/Align",className="AlignableTransformContainer"))
else:
acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Align","/TRT/Align"))
import os
if "AthSimulation_DIR" not in os.environ: # Protection for AthSimulation builds
if flags.Common.Project is not "AthSimulation": # Protection for AthSimulation builds
if (not flags.Detector.SimulateTRT) or flags.Detector.OverlayTRT:
acc.addCondAlgo(TRTAlignCondAlg)
......
......@@ -7,7 +7,6 @@ from MuonIdHelpers.MuonIdHelpersConf import Muon__MuonIdHelperTool
from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc
from MuonAGDD.MuonAGDDConf import MuonAGDDTool, NSWAGDDTool
from StoreGate.StoreGateConf import StoreGateSvc
import os
def MuonGeoModelCfg(flags):
acc = ComponentAccumulator()
......@@ -19,7 +18,7 @@ def MuonGeoModelCfg(flags):
detTool = MuonDetectorTool()
detTool.UseConditionDb = 1
detTool.UseIlinesFromGM = 1
if ( ( not flags.Detector.SimulateMuon or flags.Detector.OverlayMuon ) and "AthSimulation_DIR" not in os.environ ):
if ( ( not flags.Detector.SimulateMuon or flags.Detector.OverlayMuon ) and flags.Common.Project is not "AthSimulation" ):
# Needs configuration from MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py to be migrated
#detTool.TheMuonAlignmentTool = "MuonAlignmentDbTool/MGM_AlignmentDbTool"
pass
......
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