In order to avoid the many
xAODRootAccess we make the
THolder aware of the const-ness of the recorded object. We still only hold non-const
void* but we check on retrieval for const-violations. This is the same logic as implemented in StoreGate.
This MR consists of two commits. The first one contains the actual functional changes. The second commit is just following through with making the code const-correct.
In a nutshell the changes are:
THolder( const void*, ...)constructors in addition to the non-const versions. If the
constversion is used we cast it away but remember that it was const in a new boolean
- Similarly we add
TStore::recordmethods that take
One of the consequences of enforcing const-correctness is that the retrieval of a non-const
ConstDataVector is no longer allowed (the unit test has been adjusted accordingly). That's the same behavior as in StoreGate.
Relates to ATEAM-863 and @akraszna will certainly want to review this.