Project

General

Profile

Actions

Development #1362

closed

Development #1353: Code cleanup for OCT19

Code cleanup: trd/base/CbmTrdParSetAsic.h

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

Status:
Closed
Priority:
Normal
Target version:
Start date:
09/11/2019
Due date:
10/07/2019
% Done:

100%

Estimated time:
1.00 h
Spent time:

Description

Cbmroot/trunk/source/trd/base/CbmTrdParSetAsic.h:27:17: warning: 'CbmTrdParSetAsic::addParam' hides overloaded
      virtual function [-Woverloaded-virtual]
  void          addParam(CbmTrdParSetAsic*);
                ^
Cbmroot/trunk/source/trd/base/CbmTrdParSet.h:30:25: note: hidden overloaded virtual function
      'CbmTrdParSet::addParam' declared here: type mismatch at 1st parameter ('CbmTrdParMod *' vs 'CbmTrdParSetAsic *')
  virtual void          addParam(CbmTrdParMod *mod);
                        ^
1 warning generated.

Please fix (adjust argument type or rename method in derived class).

Actions #1

Updated by Florian Uhlig almost 3 years ago

Hi Alex,

could you please take action. Since the problem is in the header file the same warning shows up 20 times which is meanwhile 1/4 of all our warnings.

Ciao

Florian

Actions #2

Updated by Volker Friese almost 3 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 90

Closer inspection of the code shows that CbmTrdParSetAsic implements a different functionality in addParams() than the other ParSets (CbmTrdParSetGas, CbmTrdParSetDigi, CbmTrdParSetGain). Those three do not re-implement addParams() as inherited from CbmTrdParSet. Also, the treatment in CbmTrdParManager::CreateModuleParameters(), where the parameter containers are filled, is different for CbmTrdParSetAsic. This is probably because there are several ASICs connected to one module. While there are corresponding classes CbmTrdParModGain, CbmTrParModGas, CbmTrdParModDigi for the three other parameter sets, a class CbmTrdParModAsic does not exist.

The re-declaration of addParams() in CbmTrdParSetAsic with a different argument type is legal, but misleading. The compiler warning is thus in place.

As a measure, I have renamed with r15040 CbmTrdParSetAsic::addParams(CbmTrdParSetAsic*) to CbmTrdParSetAsic::AddParameters(CbmParSetAsic*). The only location from where this is called is line 227 of CbmTrdParManager (in method CreateModuleParameters()). I have changed the call accordingly.

Actions #3

Updated by Volker Friese almost 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 90 to 100

Fixed.

Actions

Also available in: Atom PDF