Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mehulkumar Shiroya
cbmroot
Commits
bdf67354
Commit
bdf67354
authored
Jul 23, 2021
by
Pierre-Alain Loizeau
Browse files
Fix some sign warnings
parent
d2bd6210
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
86 deletions
+86
-86
MQ/histoServer/CbmMqHistoServer.cxx
MQ/histoServer/CbmMqHistoServer.cxx
+1
-1
fles/mcbm2018/CbmMcbm2018Source.cxx
fles/mcbm2018/CbmMcbm2018Source.cxx
+12
-12
fles/mcbm2018/CbmMcbm2018Source.h
fles/mcbm2018/CbmMcbm2018Source.h
+6
-6
fles/mcbm2018/unpacker/CbmCriGet4RawPrint.cxx
fles/mcbm2018/unpacker/CbmCriGet4RawPrint.cxx
+65
-65
reco/steer/CbmRecoUnpack.h
reco/steer/CbmRecoUnpack.h
+2
-2
No files found.
MQ/histoServer/CbmMqHistoServer.cxx
View file @
bdf67354
...
...
@@ -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 )
...
...
fles/mcbm2018/CbmMcbm2018Source.cxx
View file @
bdf67354
...
...
@@ -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
];
//!
...
...
fles/mcbm2018/CbmMcbm2018Source.h
View file @
bdf67354
...
...
@@ -80,17 +80,17 @@ public:
void
SetDataReductionMuch
(
UInt_t
uTsReduction
=
15
)
{
fuTsReduction
=
uTsReduction
;
}
void
UnpackSingleSpill
(
Int_t
u
SpillIdx
,
UInt_t
uSpillStart
=
1
)
void
UnpackSingleSpill
(
Int_t
i
SpillIdx
,
UInt_t
uSpillStart
=
1
)
{
fiUnpSpillIdxStart
=
u
SpillIdx
;
fiUnpSpillIdxStop
=
u
SpillIdx
;
fiUnpSpillIdxStart
=
i
SpillIdx
;
fiUnpSpillIdxStop
=
i
SpillIdx
;
fuFlagSpillStart
=
uSpillStart
;
}
void
UnpackSelectSpills
(
Int_t
u
SpillIdxStart
,
Int_t
u
SpillIdxStop
,
UInt_t
uSpillStart
=
1
)
void
UnpackSelectSpills
(
Int_t
i
SpillIdxStart
,
Int_t
i
SpillIdxStop
,
UInt_t
uSpillStart
=
1
)
{
fiUnpSpillIdxStart
=
u
SpillIdxStart
;
fiUnpSpillIdxStop
=
u
SpillIdxStop
;
fiUnpSpillIdxStart
=
i
SpillIdxStart
;
fiUnpSpillIdxStop
=
i
SpillIdxStop
;
fuFlagSpillStart
=
uSpillStart
;
}
...
...
fles/mcbm2018/unpacker/CbmCriGet4RawPrint.cxx
View file @
bdf67354
...
...
@@ -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,13 +162,12 @@ 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);
std::cout << buf << std::endl;
*/
std::cout << buf << std::endl;
*/
//if (fuCurrentEquipmentId == 0xabc0)
{
...
...
@@ -221,50 +220,51 @@ Bool_t CbmCriGet4RawPrint::DoUnpack(const fles::Timeslice& ts, size_t /*componen
}
}
/*
//------------------- CTRL ----------------------------//
else if (msgType == 0x02)
{
snprintf(buf, sizeof(buf),
"eTime %d - Ctrl Msg: 0x%016lx, Get4 %3d" ,
lastGlobalEpoch, ulData, nGet4);
std::cout << buf << std::endl;
mess.printDataCout( critof001::msg_print_Hex | critof001::msg_print_Prefix | critof001::msg_print_Data );
}
//------------------- ERROR ----------------------------//
else if (msgType == 0x03)
{
snprintf(buf, sizeof(buf),
"eTime %d - Error Msg: 0x%016lx, Get4 %3d, Error code 0x%02x",
lastGlobalEpoch, ulData, nGet4, errorCode);
std::cout << buf << std::endl;
mess.printDataCout( critof001::msg_print_Hex | critof001::msg_print_Prefix | critof001::msg_print_Data );
if (nGet4 < NGET4)
pErrorCnt[nGet4] = pErrorCnt[nGet4] +1;
if (errorCode == 0x12)
if (nGet4 < NGET4)
pTotCnt[nGet4]=pTotCnt[nGet4]+1;
if ( (nGet4 < NGET4) && (errorCode<NERROR) )
pErrorCntMatrix[nGet4][errorCode]=pErrorCntMatrix[nGet4][errorCode]+1;
}
//------------------- HITS ----------------------------//
else if (msgType == 0x0)
{
snprintf(buf, sizeof(buf),
"eTime %d - Hit Msg: 0x%016lx, Get4 %3d",
lastGlobalEpoch, ulData, nGet4);
std::cout << buf << std::endl;
mess.printDataCout( critof001::msg_print_Hex | critof001::msg_print_Prefix | critof001::msg_print_Data );
if (nGet4 < NGET4)
pHitsCnt[nGet4]=pHitsCnt[nGet4]+1;
}
*/
//------------------- CTRL ----------------------------//
else if (msgType == 0x02)
{
snprintf(buf, sizeof(buf),
"eTime %d - Ctrl Msg: 0x%016lx, Get4 %3d" ,
lastGlobalEpoch, ulData, nGet4);
std::cout << buf << std::endl;
mess.printDataCout( critof001::msg_print_Hex | critof001::msg_print_Prefix | critof001::msg_print_Data );
}
//------------------- 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);
std::cout << buf << std::endl;
mess.printDataCout( critof001::msg_print_Hex | critof001::msg_print_Prefix | critof001::msg_print_Data );
if (nGet4 < NGET4)
pErrorCnt[nGet4] = pErrorCnt[nGet4] +1;
if (errorCode == 0x12)
if (nGet4 < NGET4)
pTotCnt[nGet4]=pTotCnt[nGet4]+1;
if ( (nGet4 < NGET4) && (errorCode<NERROR) )
pErrorCntMatrix[nGet4][errorCode]=pErrorCntMatrix[nGet4][errorCode]+1;
}
//------------------- HITS ----------------------------//
else if (msgType == 0x0)
{
snprintf(buf, sizeof(buf),
"eTime %d - Hit Msg: 0x%016lx, Get4 %3d",
lastGlobalEpoch, ulData, nGet4);
std::cout << buf << std::endl;
mess.printDataCout( critof001::msg_print_Hex | critof001::msg_print_Prefix | critof001::msg_print_Data );
if (nGet4 < NGET4)
pHitsCnt[nGet4]=pHitsCnt[nGet4]+1;
}
*/
/*snprintf(buf, sizeof(buf),
"Data: 0x%016lx",
ulData);
"Data: 0x%016lx",
ulData);
std::cout << buf << std::endl;*/
std::cout << buf << std::endl;*/
}
}
// for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx ++)
...
...
@@ -274,25 +274,25 @@ Bool_t CbmCriGet4RawPrint::DoUnpack(const fles::Timeslice& ts, size_t /*componen
if
(
0
==
fulCurrentTsIdx
%
10000
)
LOG
(
info
)
<<
"Processed TS "
<<
fulCurrentTsIdx
;
/*
uint32_t nPulses = 4*10000;
float effi;
for(uint32_t i =0; i < NGET4 ; i++)
{
effi = float(pHitsCnt[i])/float(nPulses) * 100.0;
snprintf(buf, sizeof(buf),
"Hit counter %d: Hits: %d Errors: %d ErrTot: %d Effi: %f",
i, pHitsCnt[i], pErrorCnt[i], pTotCnt[i], effi);
std::cout << buf << std::endl;
for(uint32_t j = 0; j<NERROR ; j++){
if (pErrorCntMatrix[i][j] != 0){
snprintf(buf, sizeof(buf),
"Error counter %d: error code: 0x%02x, times: %d",
i, j, pErrorCntMatrix[i][j]);
std::cout << buf << std::endl;
}
}
}
*/
uint32_t nPulses = 4*10000;
float effi;
for(uint32_t i =0; i < NGET4 ; i++)
{
effi = float(pHitsCnt[i])/float(nPulses) * 100.0;
snprintf(buf, sizeof(buf),
"Hit counter %d: Hits: %d Errors: %d ErrTot: %d Effi: %f",
i, pHitsCnt[i], pErrorCnt[i], pTotCnt[i], effi);
std::cout << buf << std::endl;
for(uint32_t j = 0; j<NERROR ; j++){
if (pErrorCntMatrix[i][j] != 0){
snprintf(buf, sizeof(buf),
"Error counter %d: error code: 0x%02x, times: %d",
i, j, pErrorCntMatrix[i][j]);
std::cout << buf << std::endl;
}
}
}
*/
return
kTRUE
;
...
...
reco/steer/CbmRecoUnpack.h
View file @
bdf67354
...
...
@@ -39,7 +39,7 @@ class CbmRecoUnpack : public TObject {
public:
/** @brief Constructor
**
**
*/
CbmRecoUnpack
();
...
...
@@ -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
;
}
// ----------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment