Project

General

Profile

Actions

Development #1375

closed

Development #1353: Code cleanup for OCT19

Code cleanup: trd/testbeam/lib

Added by Volker Friese almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
09/16/2019
Due date:
09/27/2019
% Done:

100%

Estimated time:
2.00 h
Spent time:

Description

Compiler warnings:

/home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis.cxx: In member function 'virtual void CbmTrdTestBeamAnalysis::Exec(Option_t*)':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis.cxx:259:13: warning: variable 'clsTriggerInfo' set but not used [-Wunused-but-set-variable]
       Int_t clsTriggerInfo[15]; // trigger info
             ^
/home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx: In member function 'virtual void CbmTrdTestBeamAnalysis2015SPS::Exec(Option_t*)':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:647:34: warning: variable 'd' set but not used [-Wunused-but-set-variable]
                         Double_t d = (w/2) * (TMath::Log(clsAdcInt[2]/clsAdcInt[0]) / TMath::Log(clsAdcInt[1]*clsAdcInt[1] / (clsAdcInt[2]*clsAdcInt[0])) ) - (w*(i-1));
                                  ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:648:34: warning: variable 'q' set but not used [-Wunused-but-set-variable]
                         Double_t q = clsAdcInt[i] / clsAdcInt_sum;
                                  ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:346:13: warning: variable 'clsTriggerInfo' set but not used [-Wunused-but-set-variable]
       Int_t clsTriggerInfo[15]; // trigger info
             ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:91:10: warning: variable 'isInfo' set but not used [-Wunused-but-set-variable]
   Bool_t isInfo = false;
          ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:93:10: warning: variable 'isEpoch' set but not used [-Wunused-but-set-variable]
   Bool_t isEpoch = false;
          ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:95:86: warning: variable 'groupId' set but not used [-Wunused-but-set-variable]
   Int_t eqID(-1), sourceA(-1), chID(0), triggerType(-1), stopType(-1), infoType(-1), groupId(-1), sysID(-1), spaID(-1);
                                                                                      ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:97:9: warning: variable 'timeStamp' set but not used [-Wunused-but-set-variable]
   Int_t timeStamp(0), epoch(0), superEpoch(0);
         ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:97:23: warning: variable 'epoch' set but not used [-Wunused-but-set-variable]
   Int_t timeStamp(0), epoch(0), superEpoch(0);
                       ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTestBeamAnalysis2015SPS.cxx:97:33: warning: variable 'superEpoch' set but not used [-Wunused-but-set-variable]
   Int_t timeStamp(0), epoch(0), superEpoch(0);
                                 ^
/home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx: In member function 'virtual void CbmTrdTimeCorrel::Exec(Option_t*)':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx:213:9: warning: variable 'timeStamp' set but not used [-Wunused-but-set-variable]
   Int_t timeStamp(0), epoch(0), superEpoch(0);
         ^
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx:213:33: warning: variable 'superEpoch' set but not used [-Wunused-but-set-variable]
   Int_t timeStamp(0), epoch(0), superEpoch(0);
                                 ^
/home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx: In member function 'void CbmTrdTimeCorrel::ClusterizerSpace()':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx:1245:11: warning: variable 'lastClusterTime' set but not used [-Wunused-but-set-variable]
   ULong_t lastClusterTime = 0;
           ^
/home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx: In static member function 'static Int_t CbmTrdTimeCorrel::GetMaxADC(CbmSpadicRawMessage&, Bool_t, std::vector<int>*)':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx:2405:10: warning: variable 'validHit' set but not used [-Wunused-but-set-variable]
   Bool_t validHit=(NrSamples==32);
          ^
/home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx: In member function 'Int_t CbmTrdTimeCorrel::Cluster::GetMessageChargeIntegral(CbmSpadicRawMessage&)':
[CTest: warning matched] /home/uhlig/cbm/release/oct19/trd/beamtime/lib/CbmTrdTimeCorrel.cxx:2423:10: warning: variable 'validHit' set but not used [-Wunused-but-set-variable]
   Bool_t validHit=false;
          ^

Please fix (or remove if the software is obsolete).

Actions #1

Updated by Philipp Munkes almost 3 years ago

  • Status changed from Assigned to Resolved

I have fixed the highlighted warnings, as well as a few additional warnings visible with -pedantic in revision 15016.
CbmTrdTimeCorrel and CbmTrdTestBeamAnalysis2015SPS are, to the best of my knowledge, not currently in use, so I have disabled building them by default.

Actions #2

Updated by Philipp Munkes almost 3 years ago

  • % Done changed from 0 to 100
Actions #3

Updated by Volker Friese almost 3 years ago

  • Status changed from Resolved to Closed

Warnings disappeared.

Actions

Also available in: Atom PDF