From 86f8ef5319b6d3eacc3e40a5f3f630b4334d5cce Mon Sep 17 00:00:00 2001 From: John Derek Chapman <chapman@hep.phy.cam.ac.uk> Date: Fri, 8 Mar 2019 10:49:55 +0000 Subject: [PATCH] Add ATLAS_CHECK_THREAD_SAFETY to LArG4FCAL and LArG4HEC packages --- LArCalorimeter/LArG4/LArG4FCAL/ATLAS_CHECK_THREAD_SAFETY | 1 + LArCalorimeter/LArG4/LArG4HEC/ATLAS_CHECK_THREAD_SAFETY | 1 + LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc | 4 ++-- .../LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc | 2 +- LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc | 4 ++-- 5 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 LArCalorimeter/LArG4/LArG4FCAL/ATLAS_CHECK_THREAD_SAFETY create mode 100644 LArCalorimeter/LArG4/LArG4HEC/ATLAS_CHECK_THREAD_SAFETY diff --git a/LArCalorimeter/LArG4/LArG4FCAL/ATLAS_CHECK_THREAD_SAFETY b/LArCalorimeter/LArG4/LArG4FCAL/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 00000000000..a12b3f4ada3 --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4FCAL/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +LArCalorimeter/LArG4/LArG4FCAL diff --git a/LArCalorimeter/LArG4/LArG4HEC/ATLAS_CHECK_THREAD_SAFETY b/LArCalorimeter/LArG4/LArG4HEC/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 00000000000..0be6fbada7b --- /dev/null +++ b/LArCalorimeter/LArG4/LArG4HEC/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +LArCalorimeter/LArG4/LArG4HEC diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc index 8c05dccac2b..e0e38363bb5 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/HECGeometry.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // LArG4::HEC::HECGeometry @@ -215,7 +215,7 @@ namespace LArG4 { G4StepPoint* pre_step_point = a_step->GetPreStepPoint(); Point3D<double> globalPosition = pre_step_point->GetPosition(); - G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); + const G4TouchableHistory* theTouchable = static_cast<const G4TouchableHistory*>(pre_step_point->GetTouchable()); G4String volumeName = theTouchable->GetVolume()->GetName() ; // Do the following only once - to determine the G4 history-depth of the wheel coordinates diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc index 960b2dddb6f..914abae8272 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalCalibrationCalculator.cc @@ -92,7 +92,7 @@ namespace LArG4 { { // Calculate the identifier. G4StepPoint* pre_step_point = step->GetPreStepPoint(); - G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); + const G4TouchableHistory* theTouchable = static_cast<const G4TouchableHistory*>(pre_step_point->GetTouchable()); // Volume name G4String hitVolume = theTouchable->GetVolume(0)->GetName(); #ifdef DEBUG_HITS diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc index 2d00aa44423..69c7d732701 100644 --- a/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc +++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // LArG4::HEC::LocalGeometry @@ -192,7 +192,7 @@ namespace LArG4 { // We can extract our position from the copy number of depth and module - G4TouchableHistory* theTouchable = (G4TouchableHistory*) (pre_step_point->GetTouchable()); + const G4TouchableHistory* theTouchable = static_cast<const G4TouchableHistory*>(pre_step_point->GetTouchable()); // Get local coordinates of the step, independently of how it was positioned in World G4AffineTransform transformation; -- GitLab