Project

General

Profile

Actions

Development #1359

closed

Development #1353: Code cleanup for OCT19

Code cleanup: fles/cosy2018/G__CbmFlibCosy2018Dict.cxx

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

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

100%

Estimated time:
4.00 h
Spent time:

Description

Please fix:

Cbmroot/OCT19/build/fles/cosy2018/G__CbmFlibCosy2018Dict.cxx:4957:14: warning: declaration shadows a local variable [-Wshadow]
         int R__i, R__n;
             ^
Cbmroot/OCT19/build/fles/cosy2018/G__CbmFlibCosy2018Dict.cxx:4934:11: note: previous declaration is here
      int R__i;
          ^

Many more instances in the same compile unit.

Actions #1

Updated by Volker Friese almost 3 years ago

Same in fles/mcbm2018/G__CbmFlibMcbm2018Dict.cxx

Actions #2

Updated by Pierre-Alain Loizeau almost 3 years ago

As far as I can remember this comes from a bug/feature in the generation of the 2D vector initialization in the dictionary by ROOT: they are not putting enough brackets around their loops and always redeclaring their indices

Actions #3

Updated by Florian Uhlig almost 3 years ago

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

I fixed the warnings in r14933 by removing some data members from the streamer.

All excluded data members contain a std::vector. The strange thing is that for other data members containing a std::vector no warning appears. In one file there are several data members of type std::vector<TH2*> which do not trigger a compiler warning except one or which does. So I have no clue what is wrong.

I also could not reproduce the compiler warnings on macosx.

A more general question to address here is if we anyway need Streamers for Tasks since we don't save a Task in any file.

Actions #4

Updated by Volker Friese almost 3 years ago

You never know... FairRoot may save some tasks in some parameter file. E.g., to my suprise I realised that CbmUnigenGenerator (used during transport) is instantiated by FairRunAna (in our digitisation run), presumably because it is stored in FairBaseParSet.

But for sure, task members with transient data should not be streamed, such as these vectors that you commented out.

Actions #5

Updated by Volker Friese almost 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF