Skip to content
Snippets Groups Projects

Modernize GenCountersFSR and GenFSR

Merged Gerhard Raven requested to merge modernize-GenFSR into master
  • 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 create std::string when a literal string is passed
    • prefer STL algorithms and range-based loops
    • remove (unused) illogical operator+ (but leave operator+=!) (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
Edited by Gerhard Raven

Merge request reports

Pipeline #2969493 passed

Pipeline passed for 9d989870 on modernize-GenFSR

Merged by Christoph HasseChristoph Hasse 3 years ago (Sep 8, 2021 7:23am UTC)

Merge details

  • Changes merged into master with ecd144bc.
  • Deleted the source branch.

Pipeline #2998138 passed

Pipeline passed for ecd144bc on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Gerhard Raven added 1 commit

    added 1 commit

    • c04ca788 - map enum -> string instead of the error prone and expensive string -> string mapping

    Compare with previous version

  • Gerhard Raven changed the description

    changed the description

  • added bug fix label

  • Gerhard Raven added 1 commit

    added 1 commit

    • e49088b5 - map enum -> string instead of the error prone and expensive string -> string mapping

    Compare with previous version

  • Gerhard Raven added 1 commit

    added 1 commit

    • 655d1f89 - avoid making vector when not necessary

    Compare with previous version

  • Gerhard Raven added 1 commit

    added 1 commit

    • 793c4c53 - avoid making vector when not necessary

    Compare with previous version

  • 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....)

  • Gerhard Raven resolved all threads

    resolved all threads

  • Gerhard Raven added 1 commit

    added 1 commit

    Compare with previous version

  • Gerhard Raven added 1 commit

    added 1 commit

    Compare with previous version

  • assigned to @thboettc

  • Gerhard Raven added 13 commits

    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

    Compare with previous version

  • Gerhard Raven resolved all threads

    resolved all threads

  • Gerhard Raven added 1 commit

    added 1 commit

    • b6b0801d - Move static tables out of inline functions

    Compare with previous version

  • Gerhard Raven added 1 commit

    added 1 commit

    • 202bb703 - Move static tables out of inline functions

    Compare with previous version

  • Gerhard Raven added 1 commit

    added 1 commit

    • 3a3b061b - Move static tables out of inline functions

    Compare with previous version

  • Gerhard Raven added 1 commit

    added 1 commit

    • 0464e4db - Move static tables out of inline functions

    Compare with previous version

  • Edited by Software for LHCb
  • assigned to @graven

  • Gerhard Raven added 41 commits

    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

    Compare with previous version

  • Gerhard Raven added 1 commit

    added 1 commit

    • 32945f97 - have setters return reference to *this

    Compare with previous version

  • Gerhard Raven added 2 commits

    added 2 commits

    • 2a3a0bc1 - update dictionaries
    • 6a4b90d7 - have setters return reference to *this

    Compare with previous version

  • Gerhard Raven added 2 commits

    added 2 commits

    • e39b5137 - update dictionaries
    • 5d76c801 - have setters return reference to *this

    Compare with previous version

  • Gerhard Raven added 2 commits

    added 2 commits

    • 7f3eed0a - update dictionaries
    • e565bfba - have setters return reference to *this

    Compare with previous version

  • Gerhard Raven added 11 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

    Compare with previous version

  • unassigned @graven

  • Gerhard Raven added 4 commits

    added 4 commits

    • dc7871a9 - remain backwards compatible
    • 9caee071 - Move static tables out of inline functions
    • af1dd5c6 - have setters return reference to *this
    • 562895fc - update dictionaries, add schema evolution

    Compare with previous version

  • Gerhard Raven mentioned in merge request Boole!350 (merged)

    mentioned in merge request Boole!350 (merged)

  • Gerhard Raven added 4 commits

    added 4 commits

    • a4ed020f - remain backwards compatible
    • dbe62f43 - Move static tables out of inline functions
    • 2929a9c7 - have setters return reference to *this
    • 9c313061 - update dictionaries, add schema evolution

    Compare with previous version

  • Gerhard Raven changed the description

    changed the description

  • Gerhard Raven resolved all threads

    resolved all threads

  • assigned to @rmatev

  • added Simulation label

  • Rosen Matev changed the description

    changed the description

  • removed bug fix label

  • Rosen Matev requested review from @dfazzini and @kreps

    requested review from @dfazzini and @kreps

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading