xAODRootAccess: make TStore const-aware
In order to avoid the many const_cast
in xAODRootAccess
we make the TStore
and 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:
- Add
THolder( const void*, ...)
constructors in addition to the non-const versions. If theconst
version is used we cast it away but remember that it was const in a new booleanm_const
flag. - Similarly we add
TStore::record
methods that takeconst
pointers.
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.
Merge request reports
Activity
added full-unit-tests label
This merge request affects 1 package:
- Control/xAODRootAccess
This merge request affects 22 files:
- Control/xAODRootAccess/Root/TAuxBranchManager.cxx
- Control/xAODRootAccess/Root/TAuxManager.cxx
- Control/xAODRootAccess/Root/TEvent.cxx
- Control/xAODRootAccess/Root/THolder.cxx
- Control/xAODRootAccess/Root/TObjectManager.cxx
- Control/xAODRootAccess/Root/TPrimitiveAuxBranchManager.cxx
- Control/xAODRootAccess/Root/TPyStore.cxx
- Control/xAODRootAccess/Root/TStore.cxx
- Control/xAODRootAccess/Root/xAODTEventBranch.cxx
- Control/xAODRootAccess/Root/xAODTMetaBranch.cxx
- Control/xAODRootAccess/test/ut_xaodrootaccess_tstore_test.cxx
- Control/xAODRootAccess/xAODRootAccess/TStore.h
- Control/xAODRootAccess/xAODRootAccess/TStore.icc
- Control/xAODRootAccess/xAODRootAccess/tools/TAuxBranchManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/TAuxManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.icc
- Control/xAODRootAccess/xAODRootAccess/tools/THolder.h
- Control/xAODRootAccess/xAODRootAccess/tools/TObjectManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/TPrimitiveAuxBranchManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/TVirtualManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/xAODTEventBranch.h
- Control/xAODRootAccess/xAODRootAccess/tools/xAODTMetaBranch.h
added Core analysis-review-required master review-pending-level-1 labels
- Resolved by Attila Krasznahorkay
- Resolved by Attila Krasznahorkay
- Resolved by Frank Winklmeier
- Resolved by Frank Winklmeier
removed review-pending-level-1 label
added review-user-action-required label
- Resolved by Frank Winklmeier
CI Result FAILURE (hash 25110e9b)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 64808]
added 58 commits
-
25110e9b...c92f8746 - 56 commits from branch
atlas:master
- f4ff7dc9 - xAODRootAccess: keep track of const-ness in TStore
- 7695b085 - xAODRootAccess: minor const fixes to object retrieval
-
25110e9b...c92f8746 - 56 commits from branch
This merge request affects 1 package:
- Control/xAODRootAccess
This merge request affects 23 files:
- Control/xAODRootAccess/Root/TAuxBranchManager.cxx
- Control/xAODRootAccess/Root/TAuxManager.cxx
- Control/xAODRootAccess/Root/TEvent.cxx
- Control/xAODRootAccess/Root/THolder.cxx
- Control/xAODRootAccess/Root/TObjectManager.cxx
- Control/xAODRootAccess/Root/TPrimitiveAuxBranchManager.cxx
- Control/xAODRootAccess/Root/TPyStore.cxx
- Control/xAODRootAccess/Root/TStore.cxx
- Control/xAODRootAccess/Root/xAODTEventBranch.cxx
- Control/xAODRootAccess/Root/xAODTMetaBranch.cxx
- Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_test.cxx
- Control/xAODRootAccess/test/ut_xaodrootaccess_tstore_test.cxx
- Control/xAODRootAccess/xAODRootAccess/TStore.h
- Control/xAODRootAccess/xAODRootAccess/TStore.icc
- Control/xAODRootAccess/xAODRootAccess/tools/TAuxBranchManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/TAuxManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.icc
- Control/xAODRootAccess/xAODRootAccess/tools/THolder.h
- Control/xAODRootAccess/xAODRootAccess/tools/TObjectManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/TPrimitiveAuxBranchManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/TVirtualManager.h
- Control/xAODRootAccess/xAODRootAccess/tools/xAODTEventBranch.h
- Control/xAODRootAccess/xAODRootAccess/tools/xAODTMetaBranch.h
added review-pending-level-1 label and removed review-user-action-required label
CI Result FAILURE (hash 7695b085)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 64886]added review-approved label and removed review-pending-level-1 label
added review-approved-tier0 label
added analysis-review-approved label and removed analysis-review-required label
mentioned in commit bfde3e12
added sweep:ignore label
mentioned in merge request svanstro/training-dataset-dumper!4 (merged)