Config enhancement
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)