Skip to content
Snippets Groups Projects

egammaEnergyCorrectionTool : Fix unchecked dynamic_cast s (Coverity defect)

egammaEnergyCorrectionTool : Fix unchecked dynamic_cast s (Coverity reports that basically we could use ~70 member variables that could be nullptr as we did not check any dynamic_cast ... ).

Basically add an internal "helper" in the anonymous namespace . That does the dynamic_cast and throws if it fails . In the message we can have the name of the TObject we failed to cast from.

Edited by Christos Anastopoulos

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • :warning: WARNING: big files (>100K) are found in the changeset

    :pencil: 188K in file PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/egammaEnergyCorrectionTool.cxx

  • This merge request affects 1 package:

    • PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection

    This merge request affects 1 file:

    • PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/egammaEnergyCorrectionTool.cxx
  • added 1 commit

    • 3cf5659c - Internal helper to check the result of a cast and throw error

    Compare with previous version

  • Christos Anastopoulos changed title from egammaEnergyCorrectionTool . Try to rm repetitive code / make sure we check the dynamic cast result to egammaEnergyCorrectionTool . Fix uncheckecked dynamic_casts (Coverity defect)

    changed title from egammaEnergyCorrectionTool . Try to rm repetitive code / make sure we check the dynamic cast result to egammaEnergyCorrectionTool . Fix uncheckecked dynamic_casts (Coverity defect)

  • :warning: WARNING: big files (>100K) are found in the changeset

    :pencil: 196K in file PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/egammaEnergyCorrectionTool.cxx

  • This merge request affects 1 package:

    • PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection

    This merge request affects 1 file:

    • PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/egammaEnergyCorrectionTool.cxx
  • :pencil: There were multiple CI triggers for this MR and commit. The system ignored duplicates. However the GitLab pipelines status may be shown incorrectly.

  • Christos Anastopoulos changed the description

    changed the description

  • added 1 commit

    • dc723de4 - add better messages to the runtime error

    Compare with previous version

  • :warning: WARNING: big files (>100K) are found in the changeset

    :pencil: 196K in file PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/egammaEnergyCorrectionTool.cxx

  • This merge request affects 1 package:

    • PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection

    This merge request affects 2 files:

    • PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx
    • PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/egammaEnergyCorrectionTool.cxx
  • Christos Anastopoulos changed title from egammaEnergyCorrectionTool . Fix uncheckecked dynamic_casts (Coverity defect) to egammaEnergyCorrectionTool : Fix unchecked dynamic_casts (Coverity defect)

    changed title from egammaEnergyCorrectionTool . Fix uncheckecked dynamic_casts (Coverity defect) to egammaEnergyCorrectionTool : Fix unchecked dynamic_casts (Coverity defect)

  • Christos Anastopoulos changed the description

    changed the description

  • :white_check_mark: CI Result SUCCESS (hash 99e03ad3)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :cloud: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    required tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view. Check the JIRA CI status board for known problems
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :white_check_mark: DetCommon: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 44827]

  • Christos Anastopoulos changed title from egammaEnergyCorrectionTool : Fix unchecked dynamic_casts (Coverity defect) to egammaEnergyCorrectionTool : Fix unchecked dynamic_cast s (Coverity defect)

    changed title from egammaEnergyCorrectionTool : Fix unchecked dynamic_casts (Coverity defect) to egammaEnergyCorrectionTool : Fix unchecked dynamic_cast s (Coverity defect)

  • Christos Anastopoulos changed the description

    changed the description

  • :white_check_mark: CI Result SUCCESS (hash 3cf5659c)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :cloud: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    required tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view. Check the JIRA CI status board for known problems
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :white_check_mark: DetCommon: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 44830]

  • :white_check_mark: CI Result SUCCESS (hash dc723de4)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :cloud: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    required tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view. Check the JIRA CI status board for known problems
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :white_check_mark: DetCommon: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 44831]

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