Status quo for running CA modules
- directly as executable:
- via athena:
athena --CA AthExHelloWorld/HelloWorldConfig.py [MyFlag.Value=42], which essentially does the above via ThinCAWrapper.sh (can also run
Typical driver scripts:
- can implement their own CLI, e.g. Run3DQTestingDriver
- that's useful in order to give the user all relevant command line options; we couldn't do that in plain athena so far; but its command line parser has recently been re-implemented in argparse: !59440 (merged)
- but a lot of code duplication and minimal feature set is not guaranteed
Teach athena how to run CA modules. The main difference to the already existing
--CA option is that the user does not have to write the
__main__ "function" as athena takes care of setting up the initial set of flags and
MainServicesCfg. It then merges the user-given CA and runs it.
Best explained via HelloWorldConfig:
athena.py AthExHelloWorld.HelloWorldConfig.HelloWorldCfg athena.py --evtMax=30 AthExHelloWorld.HelloWorldConfig.HelloWorldCfg athena.py -c 'flags.MyFlag.Value=42' AthExHelloWorld.HelloWorldConfig.HelloWorldCfg athena.py HelloWorldConfig.HelloWorldCfg # search in local run directory
If only a module name is given, athena will try to "guess" the Cfg function by using the first function in the module that ends with "Cfg":
(It might be better to have an explicit convention though. E.g. only look for
mainCfg or similar).
- all framework details hidden from user
- reduces unnecessary
__main__boilerplate for simple CAs and their testing
- similar CLI and "feel" for legacy and CA with same feature sets across all jobs
- do not rely on driver scripts to implement necessary features (e.g.
- other driver scripts (e.g.
athenaHLT) can implement a different
MainServicesCfgwithout impacting the user job options
- fully-fledged standalone CA drivers are of course still possible (e.g. I am not suggesting to replace Run3DQTestingDriver, etc.)
- yet another way on how to run a CA (we may want to get rid of the
athena --CAmode as it's almost nowhere used)
- if the user-CA needs to modify the flags, it has to
- some of the athena command line arguments don't make sense for CA modules