diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolAverage.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolAverage.cxx index 971cbb62ecf510fcbbb61e7c3249161ba2fc3563..161146b89cca021b06af175210ee1131171d1ece 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolAverage.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolAverage.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -127,11 +127,14 @@ bool LArRawChannelBuilderToolAverage::buildRawChannel(const LArDigit* digit, iprovenance |= m_helper->returnBitPattern(); iprovenance = iprovenance & 0x3FFF; + const float fMAXINT = static_cast<float>(MAXINT); + const float fMAXINT2 = static_cast<float>(MAXINT2); + if (time>MAXINT) time=MAXINT; if (time<MAXINT2) time=MAXINT2; - if (energy>MAXINT) energy=MAXINT; - if (energy<MAXINT2) energy=MAXINT2; + if (energy>fMAXINT) energy=fMAXINT; + if (energy<fMAXINT2) energy=fMAXINT2; (this->*m_buildIt)((int)(floor(energy+0.5)),time,iquality,iprovenance,digit); diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolCubic.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolCubic.cxx index 5f44db36a1357475a84b9751a75ca1630b351241..dc0fac65194d60faf6565a722f28d7f767566378 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolCubic.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolCubic.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -185,11 +185,14 @@ bool LArRawChannelBuilderToolCubic::buildRawChannel(const LArDigit* digit, iprovenance |= m_helper->returnBitPattern(); iprovenance = iprovenance & 0x3FFF; - if (time>MAXINT) time=MAXINT; - if (time<MAXINT2) time=MAXINT2; + const float fMAXINT = static_cast<float>(MAXINT); + const float fMAXINT2 = static_cast<float>(MAXINT2); - if (energy>MAXINT) energy=MAXINT; - if (energy<MAXINT2) energy=MAXINT2; + if (time>fMAXINT) time=fMAXINT; + if (time<fMAXINT2) time=fMAXINT2; + + if (energy>fMAXINT) energy=fMAXINT; + if (energy<fMAXINT2) energy=fMAXINT2; (this->*m_buildIt)((int)(floor(energy+0.5)),(int)floor(time+0.5),iquality,iprovenance,digit); diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFC.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFC.cxx index 88df1aad3f107069b555e16801f828ca2b9c3d2c..57ce92f780cf32d5e184180078be1725d8868f0c 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFC.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFC.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -238,11 +238,14 @@ bool LArRawChannelBuilderToolOFC::buildRawChannel(const LArDigit* digit, time=time*(nanosecond/picosecond); //Convert time to ps - if (time>MAXINT) time=MAXINT; - if (time<MAXINT2) time=MAXINT2; + const float fMAXINT = static_cast<float>(MAXINT); + const float fMAXINT2 = static_cast<float>(MAXINT2); - if (energy>MAXINT) energy=MAXINT; - if (energy<MAXINT2) energy=MAXINT2; + if (time>fMAXINT) time=fMAXINT; + if (time<fMAXINT2) time=fMAXINT2; + + if (energy>fMAXINT) energy=fMAXINT; + if (energy<fMAXINT2) energy=fMAXINT2; (this->*m_buildIt)((int)(floor(energy+0.5)),(int)floor(time+0.5),iquality,iprovenance,digit); m_helper->incrementErrorCount(0); diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFCIter.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFCIter.cxx index c2cdb788aeaf4099a90cd2e97181218ddfa6a5bf..edf31b79f3dbea4f88e223a407be64c88a06ade1 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFCIter.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFCIter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -276,11 +276,14 @@ bool LArRawChannelBuilderToolOFCIter::buildRawChannel(const LArDigit* digit, time=time*(nanosecond/picosecond); //Convert time to ps - if (time>MAXINT) time=MAXINT; - if (time<MAXINT2) time=MAXINT2; + const float fMAXINT = static_cast<float>(MAXINT); + const float fMAXINT2 = static_cast<float>(MAXINT2); - if (energy>MAXINT) energy=MAXINT; - if (energy<MAXINT2) energy=MAXINT2; + if (time>fMAXINT) time=fMAXINT; + if (time<fMAXINT2) time=fMAXINT2; + + if (energy>fMAXINT) energy=fMAXINT; + if (energy<fMAXINT2) energy=fMAXINT2; (this->*m_buildIt)((int)(floor(energy+0.5)),(int)floor(time+0.5),iquality,iprovenance,digit); diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolParabola.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolParabola.cxx index 59b5bdb1604fe42b2ef7a17785c17d2c9fe908b2..dfa62e6148df4598eff03c8dc2df301acae17c80 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolParabola.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolParabola.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -79,11 +79,14 @@ bool LArRawChannelBuilderToolParabola::buildRawChannel(const LArDigit* digit, iprovenance |= m_helper->returnBitPattern(); iprovenance = iprovenance & 0x3FFF; + const float fMAXINT = static_cast<float>(MAXINT); + const float fMAXINT2 = static_cast<float>(MAXINT2); + if (time>MAXINT) time=MAXINT; if (time<MAXINT2) time=MAXINT2; - if (energy>MAXINT) energy=MAXINT; - if (energy<MAXINT2) energy=MAXINT2; + if (energy>fMAXINT) energy=fMAXINT; + if (energy<fMAXINT2) energy=fMAXINT2; diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolTileInfo.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolTileInfo.cxx index 019e023d3f4dc07e02206449a7d2fe60ac8edb91..59c5e77d69aa94a6cf4ef6be9c7fd47d799a5203 100755 --- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolTileInfo.cxx +++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolTileInfo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "LArROD/LArRawChannelBuilderToolTileInfo.h" @@ -252,11 +252,14 @@ bool LArRawChannelBuilderToolTileInfo::buildRawChannel(const LArDigit* digit, time=time*(nanosecond/picosecond); //Convert time to ps - if (time>MAXINT) time=MAXINT; - if (time<MAXINT2) time=MAXINT2; + const float fMAXINT = static_cast<float>(MAXINT); + const float fMAXINT2 = static_cast<float>(MAXINT2); - if (energy>MAXINT) energy=MAXINT; - if (energy<MAXINT2) energy=MAXINT2; + if (time>fMAXINT) time=fMAXINT; + if (time<fMAXINT2) time=fMAXINT2; + + if (energy>fMAXINT) energy=fMAXINT; + if (energy<fMAXINT2) energy=fMAXINT2; //Make LArRawChannel Object with new data LArRawChannel larRawChannel(digit->channelID(),