From e731225f99ea0e56b398afb9fd43d1a6b9df06a6 Mon Sep 17 00:00:00 2001 From: "P.-A. Loizeau" <p.-a.loizeau@gsi.de> Date: Fri, 22 Jul 2022 15:13:29 +0200 Subject: [PATCH] Fix new sign warnings introduced by mCBM MRs --- MQ/mcbm/CbmDeviceUnpack.cxx | 10 +++++----- macro/run/run_unpack_online.C | 10 +++++----- macro/run/run_unpack_tsa.C | 10 +++++----- reco/detectors/much/unpack/CbmMuchUnpackAlgo.cxx | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/MQ/mcbm/CbmDeviceUnpack.cxx b/MQ/mcbm/CbmDeviceUnpack.cxx index 09123c265f..7af5795bed 100644 --- a/MQ/mcbm/CbmDeviceUnpack.cxx +++ b/MQ/mcbm/CbmDeviceUnpack.cxx @@ -322,15 +322,15 @@ Bool_t CbmDeviceUnpack::InitContainers() //trdfasp2dconfig->SetOutputBranchName("TrdFaspDigi"); uint8_t map[NFASPMOD]; uint16_t crob_map[NCROBMOD]; - for (int i(0); i < NFASPMOD; i++) + for (uint32_t i(0); i < NFASPMOD; i++) map[i] = i; if (fuRunId <= 1588) { const size_t nfasps = 12; uint8_t map21[] = {9, 2, 3, 11, 10, 7, 8, 0, 1, 4, 6, 5}; - for (int i(0); i < nfasps; i++) + for (uint32_t i(0); i < nfasps; i++) map[i] = map21[i]; uint16_t crob_map21[] = {0x00f0, 0, 0, 0, 0}; - for (int i(0); i < NCROBMOD; i++) + for (uint32_t i(0); i < NCROBMOD; i++) crob_map[i] = crob_map21[i]; } else if (fuRunId >= 2335) { @@ -344,10 +344,10 @@ Bool_t CbmDeviceUnpack::InitContainers() 72, 73, 74, 75, 76, 77, // FEB9/0xffc1 78, 79, 80, 81, 82, 83 // FEB8/0xffc1 }; - for (int i(0); i < nfasps; i++) + for (uint32_t i(0); i < nfasps; i++) map[i + nfasp0] = map22[i]; uint16_t crob_map22[] = {0xffc2, 0xffc5, 0xffc1, 0, 0}; - for (int i(0); i < NCROBMOD; i++) + for (uint32_t i(0); i < NCROBMOD; i++) crob_map[i] = crob_map22[i]; } trdfasp2dconfig->SetFaspMapping(5, map); diff --git a/macro/run/run_unpack_online.C b/macro/run/run_unpack_online.C index 5ddcb0235f..30b7132c7e 100644 --- a/macro/run/run_unpack_online.C +++ b/macro/run/run_unpack_online.C @@ -315,15 +315,15 @@ void run_unpack_online(std::vector<std::string> publisher = {"tcp://localhost:55 // trdfasp2dconfig->SetOutputBranchName("TrdFaspDigi"); uint8_t map[NFASPMOD]; uint16_t crob_map[NCROBMOD]; - for (int i(0); i < NFASPMOD; i++) + for (uint32_t i(0); i < NFASPMOD; i++) map[i] = i; if (runid <= 1588) { const size_t nfasps = 12; uint8_t map21[] = {9, 2, 3, 11, 10, 7, 8, 0, 1, 4, 6, 5}; - for (int i(0); i < nfasps; i++) + for (uint32_t i(0); i < nfasps; i++) map[i] = map21[i]; uint16_t crob_map21[] = {0x00f0, 0, 0, 0, 0}; - for (int i(0); i < NCROBMOD; i++) + for (uint32_t i(0); i < NCROBMOD; i++) crob_map[i] = crob_map21[i]; } else if (runid >= 2335) { @@ -337,10 +337,10 @@ void run_unpack_online(std::vector<std::string> publisher = {"tcp://localhost:55 72, 73, 74, 75, 76, 77, // FEB9/0xffc1 78, 79, 80, 81, 82, 83 // FEB8/0xffc1 }; - for (int i(0); i < nfasps; i++) + for (uint32_t i(0); i < nfasps; i++) map[i + nfasp0] = map22[i]; uint16_t crob_map22[] = {0xffc2, 0xffc5, 0xffc1, 0, 0}; - for (int i(0); i < NCROBMOD; i++) + for (uint32_t i(0); i < NCROBMOD; i++) crob_map[i] = crob_map22[i]; } trdfasp2dconfig->SetFaspMapping(5, map); diff --git a/macro/run/run_unpack_tsa.C b/macro/run/run_unpack_tsa.C index 6227f7cc18..e40e54c22d 100644 --- a/macro/run/run_unpack_tsa.C +++ b/macro/run/run_unpack_tsa.C @@ -333,15 +333,15 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid // trdfasp2dconfig->SetOutputBranchName("TrdFaspDigi"); uint8_t map[NFASPMOD]; uint16_t crob_map[NCROBMOD]; - for (int i(0); i < NFASPMOD; i++) + for (uint32_t i(0); i < NFASPMOD; i++) map[i] = i; if (runid <= 1588) { const size_t nfasps = 12; uint8_t map21[] = {9, 2, 3, 11, 10, 7, 8, 0, 1, 4, 6, 5}; - for (int i(0); i < nfasps; i++) + for (uint32_t i(0); i < nfasps; i++) map[i] = map21[i]; uint16_t crob_map21[] = {0x00f0, 0, 0, 0, 0}; - for (int i(0); i < NCROBMOD; i++) + for (uint32_t i(0); i < NCROBMOD; i++) crob_map[i] = crob_map21[i]; } else if (runid >= 2335) { @@ -355,10 +355,10 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid 72, 73, 74, 75, 76, 77, // FEB9/0xffc1 78, 79, 80, 81, 82, 83 // FEB8/0xffc1 }; - for (int i(0); i < nfasps; i++) + for (uint32_t i(0); i < nfasps; i++) map[i + nfasp0] = map22[i]; uint16_t crob_map22[] = {0xffc2, 0xffc5, 0xffc1, 0, 0}; - for (int i(0); i < NCROBMOD; i++) + for (uint32_t i(0); i < NCROBMOD; i++) crob_map[i] = crob_map22[i]; } trdfasp2dconfig->SetFaspMapping(5, map); diff --git a/reco/detectors/much/unpack/CbmMuchUnpackAlgo.cxx b/reco/detectors/much/unpack/CbmMuchUnpackAlgo.cxx index a07e672ea3..c21d67978c 100644 --- a/reco/detectors/much/unpack/CbmMuchUnpackAlgo.cxx +++ b/reco/detectors/much/unpack/CbmMuchUnpackAlgo.cxx @@ -529,7 +529,7 @@ void CbmMuchUnpackAlgo::processHitInfo(const stsxyter::Message& mess) if (fMonitor) fMonitor->CountDigi(uAsicIdx, uChanInFeb); //Checking for Raw channel value - if (usChan > 127 || usChan < 0) LOG(debug) << "ERROR !!! Channel in hit message is out of range " << usChan; + if (usChan > 127) LOG(debug) << "ERROR !!! Channel in hit message is out of range " << usChan; // uFebIdx is FEB position in the GEM and RPC const uint32_t address = CreateMuchAddress(fuCurrDpbIdx, uFebIdx, usChan); //const uint32_t address = CreateMuchAddress(fuCurrDpbIdx, uFebIdx, uChanInFeb); -- GitLab