Skip to content
Snippets Groups Projects
Commit bdf67354 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

Fix some sign warnings

parent d2bd6210
Branches
Tags dev_2021_30
No related merge requests found
......@@ -241,7 +241,7 @@ bool CbmMqHistoServer::ReceiveConfigAndData(FairMQParts& parts, int /*index*/)
LOG(info) << "CbmMqHistoServer::ReceiveConfigAndData => Received configuration for " << pairHeader.first
<< " histos and " << pairHeader.second << " canvases";
if (parts.Size() != 1 + pairHeader.first + pairHeader.second + 1) {
if (static_cast<size_t>(parts.Size()) != 1 + pairHeader.first + pairHeader.second + 1) {
LOG(fatal) << "CbmMqHistoServer::ReceiveConfigAndData => Number of parts not matching header: " << parts.Size()
<< " instead of " << 1 + pairHeader.first + pairHeader.second + 1;
} // if( parts.Size() != 1 + pairHeader.first + pairHeader.second )
......
......@@ -130,16 +130,16 @@ Bool_t CbmMcbm2018Source::Init()
switch (fuFlagSpillStart) {
case 0: {
/// 0 = Break begin
if (fvuSpillBreakBegTs.size() - 1 <= fiUnpSpillIdxStop) {
if (fvuSpillBreakBegTs.size() - 1 <= static_cast<UInt_t>(fiUnpSpillIdxStop)) {
LOG(warning) << "Chosen last spill index larger than spills contained in chosen spill start vector: "
<< fiUnpSpillIdxStop << " VS " << fvuSpillBreakBegTs.size() - 1;
if (fiUnpSpillIdxStart < fvuSpillBreakBegTs.size() - 1) {
if (static_cast<UInt_t>(fiUnpSpillIdxStart) < fvuSpillBreakBegTs.size() - 1) {
fiUnpSpillIdxStop = fvuSpillBreakBegTs.size() - 2;
LOG(warning) << "Using last possible spill instead as final one";
} // if( fiUnpSpillIdxStart < fvuSpillBreakBegTs.size() - 1 )
} // if( static_cast< UInt_t >(fiUnpSpillIdxStart) < fvuSpillBreakBegTs.size() - 1 )
else
LOG(fatal) << "Start index also too large, exiting";
} // if( fvuSpillBreakBegTs.size() - 1 <= fiUnpSpillIdxStop )
} // if( fvuSpillBreakBegTs.size() - 1 <= static_cast< UInt_t >(fiUnpSpillIdxStop) )
fuSpillBegTs = fvuSpillBreakBegTs[fiUnpSpillIdxStart]; //!
fuSpillEndTs = fvuSpillBreakBegTs[fiUnpSpillIdxStop + 1]; //!
......@@ -147,16 +147,16 @@ Bool_t CbmMcbm2018Source::Init()
}
case 1: {
/// 1 = Break middle
if (fvuSpillBreakMidTs.size() - 1 <= fiUnpSpillIdxStop) {
if (fvuSpillBreakMidTs.size() - 1 <= static_cast<UInt_t>(fiUnpSpillIdxStop)) {
LOG(warning) << "Chosen last spill index larger than spills contained in chosen spill start vector: "
<< fiUnpSpillIdxStop << " VS " << fvuSpillBreakMidTs.size() - 1;
if (fiUnpSpillIdxStart < fvuSpillBreakMidTs.size() - 1) {
if (static_cast<UInt_t>(fiUnpSpillIdxStart) < fvuSpillBreakMidTs.size() - 1) {
fiUnpSpillIdxStop = fvuSpillBreakMidTs.size() - 2;
LOG(warning) << "Using last possible spill instead as final one";
} // if( fiUnpSpillIdxStart < fvuSpillBreakMidTs.size() - 1 )
} // if( static_cast< UInt_t >(fiUnpSpillIdxStart) < fvuSpillBreakMidTs.size() - 1 )
else
LOG(fatal) << "Start index also too large, exiting";
} // if( fvuSpillBreakMidTs.size() - 1 <= fiUnpSpillIdxStop )
} // if( fvuSpillBreakMidTs.size() - 1 <= static_cast< UInt_t >(fiUnpSpillIdxStop) )
fuSpillBegTs = fvuSpillBreakMidTs[fiUnpSpillIdxStart]; //!
fuSpillEndTs = fvuSpillBreakMidTs[fiUnpSpillIdxStop + 1]; //!
......@@ -164,16 +164,16 @@ Bool_t CbmMcbm2018Source::Init()
}
case 2: {
/// 2 = Break end
if (fvuSpillBreakEndTs.size() - 1 <= fiUnpSpillIdxStop) {
if (fvuSpillBreakEndTs.size() - 1 <= static_cast<UInt_t>(fiUnpSpillIdxStop)) {
LOG(warning) << "Chosen last spill index larger than spills contained in chosen spill start vector: "
<< fiUnpSpillIdxStop << " VS " << fvuSpillBreakEndTs.size() - 1;
if (fiUnpSpillIdxStart < fvuSpillBreakEndTs.size() - 1) {
if (static_cast<UInt_t>(fiUnpSpillIdxStart) < fvuSpillBreakEndTs.size() - 1) {
fiUnpSpillIdxStop = fvuSpillBreakEndTs.size() - 2;
LOG(warning) << "Using last possible spill instead as final one";
} // if( fiUnpSpillIdxStart < fvuSpillBreakEndTs.size() - 1 )
} // if( static_cast< UInt_t >(fiUnpSpillIdxStart) < fvuSpillBreakEndTs.size() - 1 )
else
LOG(fatal) << "Start index also too large, exiting";
} // if( fvuSpillBreakEndTs.size() - 1 <= fiUnpSpillIdxStop )
} // if( fvuSpillBreakEndTs.size() - 1 <= static_cast< UInt_t >(fiUnpSpillIdxStop) )
fuSpillBegTs = fvuSpillBreakEndTs[fiUnpSpillIdxStart]; //!
fuSpillEndTs = fvuSpillBreakEndTs[fiUnpSpillIdxStop + 1]; //!
......
......@@ -80,17 +80,17 @@ public:
void SetDataReductionMuch(UInt_t uTsReduction = 15) { fuTsReduction = uTsReduction; }
void UnpackSingleSpill(Int_t uSpillIdx, UInt_t uSpillStart = 1)
void UnpackSingleSpill(Int_t iSpillIdx, UInt_t uSpillStart = 1)
{
fiUnpSpillIdxStart = uSpillIdx;
fiUnpSpillIdxStop = uSpillIdx;
fiUnpSpillIdxStart = iSpillIdx;
fiUnpSpillIdxStop = iSpillIdx;
fuFlagSpillStart = uSpillStart;
}
void UnpackSelectSpills(Int_t uSpillIdxStart, Int_t uSpillIdxStop, UInt_t uSpillStart = 1)
void UnpackSelectSpills(Int_t iSpillIdxStart, Int_t iSpillIdxStop, UInt_t uSpillStart = 1)
{
fiUnpSpillIdxStart = uSpillIdxStart;
fiUnpSpillIdxStop = uSpillIdxStop;
fiUnpSpillIdxStart = iSpillIdxStart;
fiUnpSpillIdxStop = iSpillIdxStop;
fuFlagSpillStart = uSpillStart;
}
......
......@@ -82,7 +82,7 @@ Bool_t CbmCriGet4RawPrint::DoUnpack(const fles::Timeslice& ts, size_t /*componen
char buf[256];
static uint32_t lastGlobalEpoch = 0;
uint32_t nGet4, epoch, msgType, errorCode;
uint32_t nGet4, epoch, msgType;
static int32_t pEpochDiff[NGET4];
int32_t epochDiff;
// static uint32_t pErrorCnt[NGET4] = {0};
......@@ -162,7 +162,6 @@ Bool_t CbmCriGet4RawPrint::DoUnpack(const fles::Timeslice& ts, size_t /*componen
nGet4 = (ulData >> 40) & 0xFF;
epoch = (ulData >> 8) & 0xFFFFFF;
epoch &= 0xFFFFFF;
errorCode = (ulData >> 4) & 0x7F;
/*snprintf(buf, sizeof(buf),
"Data: 0x%016lx - %d - 0x06%X ",
ulData, nGet4, epoch);
......@@ -233,6 +232,7 @@ Bool_t CbmCriGet4RawPrint::DoUnpack(const fles::Timeslice& ts, size_t /*componen
//------------------- ERROR ----------------------------//
else if (msgType == 0x03)
{
uint32_t errorCode = (ulData >> 4) & 0x7F;
snprintf(buf, sizeof(buf),
"eTime %d - Error Msg: 0x%016lx, Get4 %3d, Error code 0x%02x",
lastGlobalEpoch, ulData, nGet4, errorCode);
......
......@@ -191,9 +191,9 @@ private:
// Check some numbers from this timeslice
size_t nDigis = digivec.size();
return nDigis;
LOG(debug) << "Component " << icomp << " connected to config " << config->GetName() << " n-Digis " << nDigis
<< " processed in this timeslice.";
return nDigis;
}
// ----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment