Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • athena athena
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Jira
    • Jira
  • Merge requests 154
    • Merge requests 154
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • atlasatlas
  • athenaathena
  • Merge requests
  • !61413

Config enhancement

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Will Buttinger requested to merge will/athena:configEnhancement into master Mar 09, 2023
  • Overview 108
  • Commits 14
  • Pipelines 10
  • Changes 4

This WIP includes the enhancements described towards the end of the presentation https://indico.cern.ch/event/1263378/contributions/5305576/attachments/2607479/4505247/userAthApps.pdf

Comments are intended at this stage. Some bits I personally feel are more set in stone than others, if anyone raises concern about them I'll try to offer my reasoning/justification for what I did.

The list of new features are:

  • Optional help strings for flags, which can help emphasise the purpose of the flag
  • flags explorable through the command line help:
    • displays help if given, as well as the value of the flag at whatever time the parsing is triggered
    • This latter feature allows user to see how certain other options might alter/change flags (e.g. setting --filesInput and following that with --help Input will show the input files lists as updated.
  • A draft for an AnalysisApp boilerplate module designed for use in the following way:
if __name__=="__main__":
    from AthenaConfiguration import AnalysisApp
    from AthenaConfiguration.ComponentFactory import CompFactory
    # ---- obtain flags and do Flagging methods/manipulations
    flags = AnalysisApp.initFlags()
    flags.addFlag("MyPackage.myArg", "whatever", help="A demo flag") # user flag
    flags.parser().add_argument('--someArg',default="whatever") # user arg
    # ---- end of flag extensions/manipulations. Now do configuring ----
    ca = AnalysisApp.initCfg(flags) # locks the flags, which triggers arg parsing
    ca.addEventAlgo( CompFactory.MyPackageAlg(MyProperty = flags.MyPackage.myArg), sequenceName="AthAlgSeq" )
    # ----- end of configuring, now launch -----
    AnalysisApp.launch(flags,ca)
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: configEnhancement