I'm trying to prevent the bug we had in AFT-646 from happening again. In that bug, we were overwriting a decoration we saved on the
BTagging object in a subsequent algorithm. This was allowed because the algorithm itself called another tool that added decorations, but those decorations were never locked.
This MR copies some code out of the
WriteDecorHandle destructor to try to lock the derivations at the end of the algorithm.
I've marked this MR as ready because it doesn't seem to break anything.
The only problem is that it doesn't work: I verified the
auxid of the decorations that I'm adding, and verified that those
auxid correspond to the ones I'm calling
lockDecoration on. But I'm still allowed to overwrite the same decorations by calling two different versions of the same algorithm. I'm not sure if this is supposed to work, maybe @ssnyder can verify that this should make altering the decoration further impossible.