diff --git a/Tools/LWHists/src/Flex1DHisto.icc b/Tools/LWHists/src/Flex1DHisto.icc index 53bf0778b3adde735af3ad50370296f68e7a7213..95e25d97e35b5cbf44dc73b12a29889af5e7c506 100644 --- a/Tools/LWHists/src/Flex1DHisto.icc +++ b/Tools/LWHists/src/Flex1DHisto.icc @@ -1,7 +1,8 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ +#include "RVersion.h" //____________________________________________________________________ template <class T> @@ -306,7 +307,7 @@ template <class T> inline void Flex1DHisto<T>::setBinError(unsigned bin, const double& e) { if (bin>m_nbinsPlus1) {//as in root -#ifdef LW_STRICT_ROOT_BEHAVIOUR +#if defined(LW_STRICT_ROOT_BEHAVIOUR) && ROOT_VERSION_CODE < ROOT_VERSION(6,18,0) m_flexArray.forcePretendSumWMode(); #endif return; @@ -320,7 +321,7 @@ template <class T> inline void Flex1DHisto<T>::setBinContentAndError(unsigned bin, const double& cont, const double& err ) { if (bin>m_nbinsPlus1) {//as in root -#ifdef LW_STRICT_ROOT_BEHAVIOUR +#if defined(LW_STRICT_ROOT_BEHAVIOUR) && ROOT_VERSION_CODE < ROOT_VERSION(6,18,0) m_flexArray.forcePretendSumWMode(); #endif return; diff --git a/Tools/LWHists/src/Flex2DHisto.icc b/Tools/LWHists/src/Flex2DHisto.icc index 63a4b97deb485f5a4c8e48e9c5fad4b96dbf4443..604e7f9a5f8a0fc14e7fa3e9da9d16d0ec00ddf2 100644 --- a/Tools/LWHists/src/Flex2DHisto.icc +++ b/Tools/LWHists/src/Flex2DHisto.icc @@ -1,7 +1,8 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ +#include "RVersion.h" //____________________________________________________________________ template <class T> @@ -505,7 +506,7 @@ inline void Flex2DHisto<T>::setBinError(unsigned binx, unsigned biny, const doub { //Weird root behaviour: For 2D version of setBinError we ignore rather than wrap: if (binx>m_nbinsxPlus1||biny>m_nbinsyPlus1) {//as in root -#ifdef LW_STRICT_ROOT_BEHAVIOUR +#if defined(LW_STRICT_ROOT_BEHAVIOUR) && ROOT_VERSION_CODE < ROOT_VERSION(6,18,0) m_flexArray.forcePretendSumWMode(); #endif return; @@ -523,10 +524,12 @@ inline void Flex2DHisto<T>::setBinContentAndError(unsigned binx, unsigned biny, { if (binx>m_nbinsxPlus1||biny>m_nbinsyPlus1) { #ifdef LW_STRICT_ROOT_BEHAVIOUR - //Annoyingly enough, root has differnt behaviour for SetBinContent + //Annoyingly enough, root has different behaviour for SetBinContent //(wrap) and SetBinError (ignore) in this case: setBinContent(binx,biny,cont); +#if ROOT_VERSION_CODE < ROOT_VERSION(6,18,0) m_flexArray.forcePretendSumWMode(); +#endif #endif return; }