Skip to content

fix initialisation in RunMaterialValidationITk.py

RunMaterialValidationITk.py was not working properly, the initialization was failing:

Material validation
----MaterialValidation for ITk geometry----

Using Geometry Tag: ATLAS-P2-RUN4-04-00-00

Py:AutoConfigFlags    INFO Running an input-less job. Will have empty metadata.
Traceback (most recent call last):
  File "/afs/cern.ch/user/a/avallier/itk/material_map/build/x86_64-el9-gcc13-opt/bin/RunMaterialValidationITk.py", line 50, in <module>
    setupDetectorFlags(flags, detectors, toggle_geometry=True)
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/DetectorConfigFlags.py", line 296, in setupDetectorFlags
    initial_set = set(getEnabledDetectors(flags))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/DetectorConfigFlags.py", line 155, in getEnabledDetectors
    if flags[name] is not False:
       ~~~~~^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AthConfigFlags.py", line 293, in __getitem__
    return getattr(self, name)
           ^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AthConfigFlags.py", line 263, in __getattr__
    return self._get(name)
           ^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AthConfigFlags.py", line 471, in _get
    return self._flagdict[name].get(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AthConfigFlags.py", line 84, in get
    value = self._setDef(flagdict)
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/DetectorConfigFlags.py", line 88, in <lambda>
    dcf.addFlag('Detector.EnableBCM',   lambda prevFlags : prevFlags.Detector.GeometryBCM)
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AthConfigFlags.py", line 135, in __getattr__
    return getattr(self._flags, self._name + "." + name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AthConfigFlags.py", line 263, in __getattr__
    return self._get(name)
           ^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AthConfigFlags.py", line 471, in _get
    return self._flagdict[name].get(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AthConfigFlags.py", line 84, in get
    value = self._setDef(flagdict)
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/DetectorConfigFlags.py", line 34, in <lambda>
    dcf.addFlag('Detector.GeometryBCM',   lambda prevFlags : 'BCM' in getDefaultDetectors(prevFlags.GeoModel.AtlasVersion,prevFlags.GeoModel.SQLiteDB,prevFlags.GeoModel.SQLiteDBFullPath))
                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AutoConfigFlags.py", line 154, in getDefaultDetectors
    detectors = DetDescrInfo(geoTag,sqliteDB,sqliteDBFullPath)['Common']['Detectors']
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-12-01T2101/Athena/25.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/AutoConfigFlags.py", line 140, in DetDescrInfo
    raise ValueError("No geometry tag specified")
ValueError: No geometry tag specified

While the geo tag was indeed properly specified. Changing the position of the detector flag setup in the script solved the issue

Merge request reports

Loading