Make DualUseConfig/ConfigAccumulator CA-compatible and create CA FullAlgorithmTest instances
Due to some details of how DualUseConfig
generates tools and services, it was not possible to run the CP alg config functions in a ComponentAccumulator
athena job natively. This MR fixes that by:
- Using the
CompFactory
for all Athena component generation inDualUseConfig
. This is already compatible with both legacy and CA. - Avoiding any
AppMgr
imports if we are in aComponentAccumulator
environment. TheToolSvc
andSvcMgr
appends are left to theComponentAccumulator
infrastructure instead. - To make the
ConfigAccumulator
ComponentAccumulator
-friendly, we also have to avoid+=
for appending algs to sequences. So in aComponentAccumulator
environment, we now create aComponentAccumulator
object and use this for all appends. Integrating the full sequence configuration into a job then simply involves merging theComponentAccumulator
from theConfigAccumulator
into the job-levelComponentAccumulator
.
To make this neater, there are now two bool
variables defined in DualUseConfig
to avoid having to have try/except
blocks everywhere.
Three test cases are added to check the ConfigBlock
execution, via a python FullConfigTest_CA.py
executable. I opted not to make the makeBlahSequence
setup actually run, because makeSequenceOld
is littered with algSeq += sequence
operations that are incompatible with the ComponentAccumulator
environment.
I did make AnaAlgSequence
possible to create in a ComponentAccumulator
environment job, which required adding __slots__
otherwise the parent class __slots__
block adding attributes to the subclass, but given the above, this is a bit irrelevant.