From ac076821253b9060bdd61706957d813af41e308e Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 21 Mar 2018 23:21:21 +0100 Subject: [PATCH] LArRawConditions: Fix off-by-one error in assertion. nGains can be (at most) 3. Former-commit-id: 05080fdffa18aab93e7915ee38c5038d7c407589 --- LArCalorimeter/LArRawConditions/src/LArADC2MeV.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LArCalorimeter/LArRawConditions/src/LArADC2MeV.cxx b/LArCalorimeter/LArRawConditions/src/LArADC2MeV.cxx index 2789e96654d..131063b2d81 100644 --- a/LArCalorimeter/LArRawConditions/src/LArADC2MeV.cxx +++ b/LArCalorimeter/LArRawConditions/src/LArADC2MeV.cxx @@ -9,7 +9,7 @@ LArADC2MeV::LArADC2MeV(const LArOnlineID_Base* onlineID, const LArOnOffIdMapping m_nGains(nGains) { assert(m_onlineID); - assert(nGains<3 && nGains>0); + assert(nGains<=CaloGain::LARNGAIN && nGains>0); for (size_t i=0;i<nGains;++i) { m_adc2MeV[i].resize(onlineID->channelHashMax()); -- GitLab