Commit dfabbee8 authored by Jérémie Dudouet's avatar Jérémie Dudouet
Browse files

Still remove smells and bugs from sonarQube

parent fd96f1b5
......@@ -22,10 +22,11 @@
#include "BashColor.h"
BashColor::BashColor()
BashColor::BashColor() :
fColor(""),
fType("0;3")
{
fColor = "";
fType = "0;3";
}
BashColor::~BashColor()
......
......@@ -392,7 +392,7 @@ UInt_t NOMADBuilder::SetInput()
if ( fListOfFreeEvents.size() ){
#ifdef LOCAL_DEBUG
printf("SETINPUT List of free events %d \n",fListOfFreeEvents.size()); // to be done, expand allocated
printf("SETINPUT List of free events %lu \n",fListOfFreeEvents.size()); // to be done, expand allocated
#endif
UShort_t uid = fMap.toUID[CCrate][CBoard][CCell];
......@@ -636,7 +636,7 @@ UInt_t NOMADBuilder::Process()
if ( !( tot_nb_coinc == nb_to_treat ) ) {
#ifdef LOCAL_DEBUG
printf(" Event re-injected STOP @ %d size %d \n ",stop_jj,fTwiceCoincWindowWidth);
printf(" Event re-injected STOP @ %d size %lu \n ",stop_jj,fTwiceCoincWindowWidth);
#endif
for (size_t jj = stop_jj ; jj < fTwiceCoincWindowWidth; jj++) {
if ( fCoincBuilderEvent[jj].size() == 0 ) {
......@@ -677,7 +677,7 @@ UInt_t NOMADBuilder::Process()
bb += fRoughArrayOfSliding[i_ev]->size();
}
}
printf("BIlan %d %d ",bb,fNbEventsInSlicing);;
printf("BIlan %lu %d ",bb,fNbEventsInSlicing);;
#endif
// move event @ the end to the beginning and in case the pending and redefine sliding window
......
......@@ -59,6 +59,7 @@ ReadMezzAFP::ReadMezzAFP():
fTrigger("data:crystal"),
fdebug(false),
fBashColor(new BashColor()),
fKeyFilterFile(NULL),
fUseKeyFilter(false),
fLastKeyIsRead(false),
fKeyToLink(NULL),
......@@ -75,7 +76,7 @@ ReadMezzAFP::ReadMezzAFP():
TotalEntryFileSize(0),
ReadEntryFileSize(0),
LastReadEntryFileSize(0)
{
{
if(fdebug) std::cout<<"\E[31;1m"<<"Construct in"<<"\E[m"<<std::endl;
Log.GetProcessName() = "ReadMezzAFP"; GetFrameIO().SetName("ReadMezzAFP");
......@@ -89,11 +90,24 @@ ReadMezzAFP::ReadMezzAFP():
GetFrameIO().Attach(&fSourceOfFrames,0x0);
fListOfFile.clear();
for(int nn = 0; nn < kNSG; nn++ ) {
SegmentTraces[nn] = 0x0;
SegE[nn] = 0x0;
SegStatus[nn] = 0x0;
SegID[nn] = 0x0;
}
for(int nn = 0; nn < kNCC; nn++ ) {
CoreTraces[nn] = 0x0;
CoreE[nn] = 0x0;
CoreStatus[nn] = 0x0;
CoreID[nn] = 0x0;
}
if(fdebug) std::cout<<"\E[31;1m"<<"Construct out"<<"\E[m"<<std::endl;
}
ReadMezzAFP::~ReadMezzAFP()
{
{
// in principle not needed ... just in case reset it has not been called by narval
unsigned int error = 0u; process_reset(&error) ;
......@@ -101,10 +115,10 @@ ReadMezzAFP::~ReadMezzAFP()
delete [] SegmentTraces[nn];
for(int nn = 0; nn < kNCC; nn++ )
delete [] CoreTraces[nn];
}
}
bool ReadMezzAFP::NewFile()
{
{
Log.SetProcessMethod("NewFile");
bool ok = false;
NewCrystal = false;
......@@ -193,7 +207,7 @@ bool ReadMezzAFP::NewFile()
}
void ReadMezzAFP::process_config (const char *directory_path, unsigned int *error_code)
{
{
// first init narval and ADF stuff (if required)
NarvalInterface::process_config(directory_path,error_code);
......@@ -202,7 +216,7 @@ void ReadMezzAFP::process_config (const char *directory_path, unsigned int *erro
}
unsigned int ReadMezzAFP::ProcessBlock(ADF::FrameBlock &out)
{
{
if(fdebug) std::cout<<"\E[31;1m"<<"ProcessBlock in"<<"\E[m"<<std::endl;
// attach the input/output buffer to the FrameIO system
......@@ -322,7 +336,7 @@ unsigned int ReadMezzAFP::ProcessBlock(ADF::FrameBlock &out)
if ( GetFrameIO().GetStatus() == BaseFrameIO::kFinished || fLastKeyIsRead)
return 1u;
else return 0u;
}
}
void ReadMezzAFP::process_initialise (unsigned int *error_code)
{
......
......@@ -1570,7 +1570,7 @@ Double_t* CXHistoManipulator::GetLimits(TMultiGraph* mgr)
}
}
delete temp;
delete[] temp;
return limits;
}
......@@ -1635,7 +1635,7 @@ Double_t* CXHistoManipulator::GetLimits(TSeqCollection* mgr)
}
}
delete temp;
delete[] temp;
return limits;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment