ATLAS Offline Software
Loading...
Searching...
No Matches
python.CommonRunArgsToFlags Namespace Reference

Functions

 commonRunArgsToFlags (runArgs, configFlags)

Function Documentation

◆ commonRunArgsToFlags()

python.CommonRunArgsToFlags.commonRunArgsToFlags ( runArgs,
configFlags )

Definition at line 12 of file CommonRunArgsToFlags.py.

12def commonRunArgsToFlags(runArgs,configFlags):
13
14 if hasattr(runArgs,"skipEvents"):
15 configFlags.Exec.SkipEvents=runArgs.skipEvents
16
17 if hasattr(runArgs,"maxEvents"):
18 configFlags.Exec.MaxEvents=runArgs.maxEvents
19
20 if hasattr(runArgs,"conditionsTag"):
21 configFlags.IOVDb.GlobalTag=runArgs.conditionsTag
22
23 if hasattr(runArgs,"geometryVersion"):
24 configFlags.GeoModel.AtlasVersion=runArgs.geometryVersion
25
26 if hasattr(runArgs,"geometrySQLite"):
27 configFlags.GeoModel.SQLiteDB=runArgs.geometrySQLite
28
29 if hasattr(runArgs,"geometrySQLiteFullPath"):
30 if not hasattr(runArgs,"geometrySQLite") or not runArgs.geometrySQLite:
31 from AthenaCommon.Logging import logging
32 logger = logging.getLogger('CommonRunArgsToFlags')
33 logger.warning('geometrySQLiteFullPath flag ignored because the reading from SQLite GometryDB was not activated')
34 logger.warning('To activate the reading from SQLite GeometryDB use --geometrySQLite=True')
35 else:
36 configFlags.GeoModel.SQLiteDBFullPath=runArgs.geometrySQLiteFullPath
37
38 if hasattr(runArgs,"triggerConfig"):
39 configFlags.Trigger.triggerConfig=runArgs.triggerConfig
40
41 if hasattr(runArgs,"beamType"):
42 from AthenaConfiguration.Enums import BeamType
43 configFlags.Beam.Type=BeamType(runArgs.beamType)
44
45 # Read the input entries for some common types
46 for ftype in ["BS", "EVNT", "HITS", "RDO", "ESD", "AOD"]:
47 if hasattr(runArgs, f"input{ftype}FileNentries"):
48 configFlags.Input.FileNentries = getattr(runArgs, f"input{ftype}FileNentries")
49
50
51 if hasattr(runArgs,"nprocs"):
52 configFlags.Concurrency.NumProcs = runArgs.nprocs
53 # also parse MP stuff in case of nprocs > 0
54 if runArgs.nprocs > 0:
55 from AthenaMP.AthenaMPConfig import athenaMPRunArgsToFlags
56 athenaMPRunArgsToFlags(runArgs, configFlags)
57
58 if hasattr(runArgs,"threads"):
59 configFlags.Concurrency.NumThreads = runArgs.threads
60 if hasattr(runArgs, "eventService"):
61 configFlags.Exec.MTEventService=True
62
63 if hasattr(runArgs,"concurrentEvents"):
64 configFlags.Concurrency.NumConcurrentEvents = runArgs.concurrentEvents
65
66
67 if hasattr(runArgs,"totalExecutorSteps"):
68 configFlags.ExecutorSplitting.TotalSteps = runArgs.totalExecutorSteps
69
70 if hasattr(runArgs,"executorStep"):
71 configFlags.ExecutorSplitting.Step = runArgs.executorStep
72
73 if hasattr(runArgs,"executorEventCounts"):
74 configFlags.ExecutorSplitting.TotalEvents = configFlags.Exec.MaxEvents
75 configFlags.Exec.MaxEvents = runArgs.executorEventCounts[configFlags.ExecutorSplitting.Step]
76
77 if hasattr(runArgs,"executorEventSkips"):
78 configFlags.Exec.SkipEvents = runArgs.executorEventSkips[configFlags.ExecutorSplitting.Step]
79
80 if hasattr(runArgs,"mpi"):
81 configFlags.Exec.MPI = runArgs.mpi
82
83 if hasattr(runArgs,"stopOnSignal"):
84 configFlags.Exec.StopOnSignal = runArgs.stopOnSignal