Skip to content
Snippets Groups Projects
Commit a9c82db3 authored by Sergey Gorbunov's avatar Sergey Gorbunov Committed by Sergey Gorbunov
Browse files

compiler warning fixes in unpackers

parent 66114b02
No related branches found
No related tags found
1 merge request!1422compiler warning fixes in unpackers & hitfinders
Pipeline #24931 passed
...@@ -39,8 +39,8 @@ namespace cbm::algo::rich ...@@ -39,8 +39,8 @@ namespace cbm::algo::rich
// -4*3 for 0xffffffff padding and 2 last words which contain microslice index // -4*3 for 0xffffffff padding and 2 last words which contain microslice index
if (reader.IsNextPadding() && reader.GetOffset() >= reader.GetSize() - 12) break; if (reader.IsNextPadding() && reader.GetOffset() >= reader.GetSize() - 12) break;
} }
uint32_t msIndexWord1 = reader.NextWord(); [[maybe_unused]] uint32_t msIndexWord1 = reader.NextWord();
uint32_t msIndexWord2 = reader.NextWord(); [[maybe_unused]] uint32_t msIndexWord2 = reader.NextWord();
return std::make_pair(std::move(ctx.digis), std::move(ctx.monitor)); return std::make_pair(std::move(ctx.digis), std::move(ctx.monitor));
} }
...@@ -72,19 +72,20 @@ namespace cbm::algo::rich ...@@ -72,19 +72,20 @@ namespace cbm::algo::rich
if (l > 1) ctx.prevLastCh0ReTime[l - 2] = fullTime; if (l > 1) ctx.prevLastCh0ReTime[l - 2] = fullTime;
} }
const uint32_t trbNum = reader.NextWord(); // TRB trigger number [[maybe_unused]] const uint32_t trbNum = reader.NextWord(); // TRB trigger number
//if (isLog()) L_(debug4) << getLogHeader(reader) << "TRB Num:" << reader.GetWordAsHexString(trbNum); //if (isLog()) L_(debug4) << getLogHeader(reader) << "TRB Num:" << reader.GetWordAsHexString(trbNum);
} }
void Unpack::ProcessHubBlock(rich::MicrosliceReader& reader, MSContext& ctx) const void Unpack::ProcessHubBlock(rich::MicrosliceReader& reader, MSContext& ctx) const
{ {
uint32_t word = reader.NextWord(); uint32_t word = reader.NextWord();
const uint32_t hubId = word & 0xffff; // 16 bits
const uint32_t hubSize = (word >> 16) & 0xffff; // 16 bits [[maybe_unused]] const uint32_t hubId = word & 0xffff; // 16 bits
const uint32_t hubSize = (word >> 16) & 0xffff; // 16 bits
bool isLast = false; // if true then it is CTS sub-sub-event bool isLast = false; // if true then it is CTS sub-sub-event
size_t totalSize = 0; size_t totalSize = 0;
ctx.currentSubSubEvent = 0; ctx.currentSubSubEvent = 0;
uint32_t subSubEventId, subSubEventSize; uint32_t subSubEventId, subSubEventSize;
...@@ -125,16 +126,20 @@ namespace cbm::algo::rich ...@@ -125,16 +126,20 @@ namespace cbm::algo::rich
} }
} }
int Unpack::ProcessCtsHeader(rich::MicrosliceReader& reader, uint32_t subSubEventSize, uint32_t subSubEventId) const int Unpack::ProcessCtsHeader(rich::MicrosliceReader& reader, uint32_t subSubEventSize,
uint32_t /*subSubEventId*/) const
{ {
const uint32_t word = reader.NextWord(); const uint32_t word = reader.NextWord();
const uint32_t ctsState = word & 0xffff; // 16 bits
const uint32_t nofInputs = (word >> 16) & 0xf; // 4 bits [[maybe_unused]] const uint32_t ctsState = word & 0xffff; // 16 bits
const uint32_t nofTrigCh = (word >> 20) & 0x1f; // 5 bits
const uint32_t inclLastIdle = (word >> 25) & 0x1; // 1 bit const uint32_t nofInputs = (word >> 16) & 0xf; // 4 bits
const uint32_t inclTrigInfo = (word >> 26) & 0x1; // 1 bit const uint32_t nofTrigCh = (word >> 20) & 0x1f; // 5 bits
const uint32_t inclTime = (word >> 27) & 0x1; // 1 bit const uint32_t inclLastIdle = (word >> 25) & 0x1; // 1 bit
const uint32_t ETM = (word >> 28) & 0x3; // 2 bits const uint32_t inclTrigInfo = (word >> 26) & 0x1; // 1 bit
const uint32_t inclTime = (word >> 27) & 0x1; // 1 bit
const uint32_t ETM = (word >> 28) & 0x3; // 2 bits
uint32_t ctsInfoSize = 2 * nofInputs + 2 * nofTrigCh + 2 * inclLastIdle + 3 * inclTrigInfo + inclTime; // in words uint32_t ctsInfoSize = 2 * nofInputs + 2 * nofTrigCh + 2 * inclLastIdle + 3 * inclTrigInfo + inclTime; // in words
switch (ETM) { switch (ETM) {
case 0: break; case 0: break;
......
...@@ -41,7 +41,7 @@ namespace cbm::algo::tof ...@@ -41,7 +41,7 @@ namespace cbm::algo::tof
//reset counter //reset counter
numSameSide = 0; numSameSide = 0;
for (int32_t chan = 0; chan < fParams.fChanPar.size(); chan++) { for (int32_t chan = 0; chan < (int32_t) fParams.fChanPar.size(); chan++) {
std::vector<CbmTofDigi*>& storDigiExp = digisExp[chan]; std::vector<CbmTofDigi*>& storDigiExp = digisExp[chan];
std::vector<int32_t>& storDigiInd = digisInd[chan]; std::vector<int32_t>& storDigiInd = digisInd[chan];
......
...@@ -412,6 +412,7 @@ namespace cbm::algo::tof ...@@ -412,6 +412,7 @@ namespace cbm::algo::tof
} }
} }
} }
[[fallthrough]]; // fall through is intended
case 7: { case 7: {
// clang-format off // clang-format off
const int32_t iChMap[160]={ const int32_t iChMap[160]={
......
...@@ -226,7 +226,7 @@ namespace cbm::algo::trd ...@@ -226,7 +226,7 @@ namespace cbm::algo::trd
{ {
/// Save info message if needed. /// Save info message if needed.
//if (fOptOutBVec) { fOptOutBVec->emplace_back(std::make_pair(ctx.fLastFulltime, frame)); } //if (fOptOutBVec) { fOptOutBVec->emplace_back(std::make_pair(ctx.fLastFulltime, frame)); }
Spadic::MsInfoType infotype = getInfoType(frame); [[maybe_unused]] Spadic::MsInfoType infotype = getInfoType(frame);
// "Spadic_Info_Types"; // "Spadic_Info_Types";
} }
......
...@@ -50,7 +50,7 @@ using cbm::algo::tof::Cluster; ...@@ -50,7 +50,7 @@ using cbm::algo::tof::Cluster;
using cbm::algo::tof::HitFinderRpcPar; using cbm::algo::tof::HitFinderRpcPar;
const int32_t numClWalkBinX = 20; const int32_t numClWalkBinX = 20;
const double TTotMean = 2.E4; // const double TTotMean = 2.E4;
/************************************************************************************/ /************************************************************************************/
CbmTaskTofHitFinder::CbmTaskTofHitFinder() : FairTask("CbmTaskTofHitFinder"), fGeoHandler(new CbmTofGeoHandler()) {} CbmTaskTofHitFinder::CbmTaskTofHitFinder() : FairTask("CbmTaskTofHitFinder"), fGeoHandler(new CbmTofGeoHandler()) {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment