Skip to content
Snippets Groups Projects

xAODRootAccess: make TStore const-aware

Merged Frank Winklmeier requested to merge fwinkl/athena:xaodroot_const into master
All threads resolved!

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:

  1. Add THolder( const void*, ...) constructors in addition to the non-const versions. If the const version is used we cast it away but remember that it was const in a new boolean m_const flag.
  2. Similarly we add TStore::record methods that take const 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.

Edited by Frank Winklmeier

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Attila Krasznahorkay
  • Attila Krasznahorkay
  • Apart from some minor technical comments, I give my blessing. It looks reasonable as much as I can tell.

  • Attila Krasznahorkay resolved all threads

    resolved all threads

  • Frank Winklmeier resolved all threads

    resolved all threads

  • Frank Winklmeier added 58 commits

    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

    Compare with previous version

  • :pencil: Build area was cleaned as per request posted in the DB. The full software build will be performed

  • 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

    Adding @akraszna ,@ssnyder as watchers

  • :warning: WARNING: big files (>100K) are found in the changeset

    :pencil: 140K in file Control/xAODRootAccess/Root/TEvent.cxx

  • :x: CI Result FAILURE (hash 7695b085)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    tests :o: :white_check_mark: :white_check_mark: :white_check_mark: :o:

    Full details available on this CI monitor view. Check the JIRA CI status board for known problems
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 64886]

  • Author Maintainer

    Failures are unrelated and the same as in the full nightly build.

  • The changes look fine and the CI issues are unrelated. Approving.

    Jason (L1)

  • mentioned in commit bfde3e12

  • Please register or sign in to reply
    Loading