diff --git a/Event/xAOD/xAODCore/Root/PerfStats.cxx b/Event/xAOD/xAODCore/Root/PerfStats.cxx index 2328445deef795738f41f79f0088466ec973c5bd..252a629929db1597dd3be48a1a9e2e1d0c256477 100644 --- a/Event/xAOD/xAODCore/Root/PerfStats.cxx +++ b/Event/xAOD/xAODCore/Root/PerfStats.cxx @@ -310,6 +310,35 @@ namespace xAOD { return 0; } +#if ROOT_VERSION_CODE >= ROOT_VERSION( 6, 14, 0 ) + /* Some methods that are pure virtual in the basaclass and need + a definition - forwarding them to the actuall ROOT TPerfStats + new in ROOT 6.14 + */ + void PerfStats::PrintBasketInfo( Option_t *option ) const { + if( m_otherPerfStats ) m_otherPerfStats->PrintBasketInfo( option ); + } + + void PerfStats::UpdateBranchIndices( TObjArray *branches ) { + if( m_otherPerfStats ) m_otherPerfStats->UpdateBranchIndices( branches ); + } + + #define FWD_CALL(CALL) \ + void PerfStats::CALL( TBranch *b, size_t basketNumber ) { \ + if( m_otherPerfStats ) m_otherPerfStats->CALL( b, basketNumber ); \ + } \ + void PerfStats::CALL( size_t bi, size_t basketNumber ) { \ + if( m_otherPerfStats ) m_otherPerfStats->CALL( bi, basketNumber ); \ + } struct dummyforsemi + + FWD_CALL(SetLoaded); + FWD_CALL(SetLoadedMiss); + FWD_CALL(SetMissed); + FWD_CALL(SetUsed); + #undef FWD_CALL + +#endif //ROOT_VERSION + /// The constructor needs to do a few things. If there is already /// another TVirtualPerfStats object defined under gPerfStats, then /// it stores that pointer in order to be able to forward monitoring diff --git a/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h b/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h index 7bb05aff85ad3da8a5bd1e3f18d7eb100997901b..2aee4a340abe1db635105dcb317484ef091b47f0 100644 --- a/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h +++ b/Event/xAOD/xAODCore/xAODCore/tools/PerfStats.h @@ -90,6 +90,33 @@ namespace xAOD { /// Function used by PROOF to set the number of processed events correctly virtual ::Long64_t GetNumEvents() const; +#if ROOT_VERSION_CODE >= ROOT_VERSION( 6, 14, 0 ) + // new methods (ROOT 6.14) - need forwarding to the original TPerfStats + + /// Print the TTree basket read caching statistics + virtual void PrintBasketInfo(Option_t *option = "") const; + + /// Increase by 1 the counter of how many times a basket was cached + virtual void SetLoaded(TBranch *b, size_t basketNumber); + virtual void SetLoaded(size_t bi, size_t basketNumber); + + /// Increase by 1 the counter of how many times a basket was cached on access + virtual void SetLoadedMiss(TBranch *b, size_t basketNumber); + virtual void SetLoadedMiss(size_t bi, size_t basketNumber); + + /// Increase count (by 1) of not cached basket reads + virtual void SetMissed(TBranch *b, size_t basketNumber); + virtual void SetMissed(size_t bi, size_t basketNumber); + + /// Mark a basket as accessed + virtual void SetUsed(TBranch *b, size_t basketNumber); + virtual void SetUsed(size_t bi, size_t basketNumber); + + /// Update the fBranchIndexCache collection to match the current TTree given + /// the ordered list of branch names. + virtual void UpdateBranchIndices(TObjArray *branches); +#endif + /// @} protected: