Modernize GenCountersFSR and GenFSR
- GenCountersFSR does not contain any member data (only a
static
mapping of enum to string), so make it non-instantiable, and remove inheritance from DataObject - use enum->string mapping instead of expensive error prone string->string mapping
-
bug fix: the string-to-string mapping contained "Dsminus0Gen" and "Dsminus0Acc" which should have "DsminusGen" and "DsminusAcc" respectively(split into !3137 (merged))
-
- GenFSR:
- remove expensive conversion of enum to string, followed by string comparisons (error prone, as the compiler cannot check for misspeliing, but can check for invalid enum values) and conversion back to enum
- allow lookup by
string_view
to avoid having to createstd::string
when a literal string is passed - prefer STL algorithms and range-based loops
- remove (unused) illogical
operator+
(but leaveoperator+=
!) (note: after doing c = a + b, one would have that a == c, i.e.operator+
modified its left argument... ) - do not rebuild the same expensive string -> string map on every call to
getFullNames
Merge request reports
Activity
added modernisation label
added 1 commit
- 9ca55b57 - do not rebuild the (expensive!) string->string map on every call to `getFullNames`
added 1 commit
- d46c3ce3 - do not rebuild the (expensive!) string->string map on every call to `getFullNames`
- Resolved by Gerhard Raven
added 1 commit
- c04ca788 - map enum -> string instead of the error prone and expensive string -> string mapping
added bug fix label
added 1 commit
- e49088b5 - map enum -> string instead of the error prone and expensive string -> string mapping
- Resolved by Michal Kreps
I think we will need to assure that if we produce a sample with this change we can still properly read it in reco14-patches to keep compatibility with Run 1 and 2.
I see there was bug fix, which is likely relevant for current Gauss and also Run 1 and 2 and we should make sure that one is propagated everywhere where relevant. I will investigate next week.
- Resolved by Gerhard Raven
It would be good to decouple the pure modernisation (which we do only on this branch and perhaps
run2-patches
) from the bug fix (which may need to be propagated to other legacy branches, including ones that don't even support C++11....)
assigned to @thboettc
added 13 commits
-
7e1046a1...60cff675 - 6 commits from branch
master
- 931849ba - fix typos
- 110e6de1 - Modernize GenCountersFSR and GenFSR
- c80732fd - remove illogical operator+
- 6d2e61ab - do not rebuild the (expensive!) string->string map on every call to `getFullNames`
- 7538dabe - map enum -> string instead of the error prone and expensive string -> string mapping
- f6520689 - avoid making vector when not necessary
- 8b729c79 - more trivial cleanup
Toggle commit list-
7e1046a1...60cff675 - 6 commits from branch
- Resolved by Gerhard Raven
/ci-test --merge
added ci-test-triggered label
- [2021-07-20 13:49] Validation started with lhcb-master-mr#2589
- [2021-07-23 11:27] Validation started with lhcb-master-mr#2602
- [2021-07-23 21:18] Validation started with lhcb-master-mr#2605
Edited by Software for LHCbassigned to @graven
added 41 commits
-
0464e4db...fea9a397 - 32 commits from branch
master
- a3d54cdb - Modernize GenCountersFSR and GenFSR
- 793c6b66 - remove illogical operator+
- 7481ac1f - do not rebuild the (expensive!) string->string map on every call to `getFullNames`
- faa684f0 - map enum -> string instead of the error prone and expensive string -> string mapping
- bdacc037 - avoid making vector when not necessary
- 493e09d8 - more trivial cleanup
- 1cd95719 - Move static tables out of inline functions
- 31aedbad - update dictionaries
- 1905cf78 - have setters return reference to *this
Toggle commit list-
0464e4db...fea9a397 - 32 commits from branch
added 2 commits
added 2 commits
added 2 commits
added 11 commits
-
e565bfba...4180cf57 - 2 commits from branch
master
- ff0aa579 - Modernize GenCountersFSR and GenFSR
- d5b3f957 - remove illogical operator+
- 3bfdaf3d - do not rebuild the (expensive!) string->string map on every call to `getFullNames`
- 9c0c6cc5 - map enum -> string instead of the error prone and expensive string -> string mapping
- 4c7d7955 - avoid making vector when not necessary
- dca3dc37 - more trivial cleanup
- e2eba4e2 - Move static tables out of inline functions
- 53ace530 - have setters return reference to *this
- 3d8dedaa - update dictionaries, add schema evolution
Toggle commit list-
e565bfba...4180cf57 - 2 commits from branch
unassigned @graven
mentioned in merge request Boole!350 (merged)
- [2021-07-24 20:36] Validation started with lhcb-master-mr#2606
assigned to @rmatev
added Persistency label
added Simulation label
removed bug fix label