Skip to content

Add ability to save CA sequence configuration of all algorithms and nested tools as a dict

Heather Russell requested to merge hrussell/athena:PHYSLITE_24.0.2 into main

This saves all algorithm and nested tool properties, default or not, to a dictionary saved as a property of the CA. If the CA is saved to a pkl file (not new functionality) the sequence dict is now included, if withAllProperties=True.

The ComponentAccumulator.store() function is called inside PHYSLITE.py if a newly-added flag SavePHYSLITECAConfig (default False) is called.

The idea is to then create this file for each AMI tag and have the output visible in a web interface. A prototype of a single-config viewer is here: https://hrussell.web.cern.ch/hrussell/test_dict_3.html

For reference, it's just a few lines in athena to extract the dictionary from the CA config file:

import pickle
import pprint
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator

with open("CA_config.pkl", 'rb') as infile:
    component_accumulator_obj = pickle.load(infile)
    pp = pprint.PrettyPrinter(width=20, compact=True)
    pp.pprint(component_accumulator_obj._sequenceProperties)
Edited by Heather Russell

Merge request reports

Loading