Skip to content

AthContainers: Fix variable selection.

In copyAuxStoreThinned, we can veto variables copied to the output based in ThinningInfo. But this should only be done for dynamic variables, as we always want the full static store to be written.

We were doing this by testing whether a variable was dynamic in the source store. However, this fails in the case where the source store is a static store object and the destination store is a generic AuxContainerBase object. (This typically happens during derivation when we want to write all variables as dynamic.)

Fix by also considering a variable to be dynamic if it doesn't exist in the destination store before we do the copy.

AthenaOutputStream writes into ThinningInfo the set of variables to be vetoed on output. Only dynamic variables should be selected/vetoed this way, so we were only actually selecting dynamic variables, marking the rest as vetoed. The code in copyAuxStoreThinned would then see that variables were not dynamic and ignore the veto information for them.

However, that turns out to be incorrect for the case where we write all variables as dynamic (as used during derivation). So here properly apply the selection rules for all variables, even static ones.

See https://its.cern.ch/jira/browse/ATEAM-670.

Merge request reports