From 447d45b1276a5d2cc0bcd7c0dd392786685759b6 Mon Sep 17 00:00:00 2001 From: adrien-matta <a.matta@surrey.ac.uk> Date: Thu, 19 Jul 2018 14:50:10 +0200 Subject: [PATCH] * Target related Getter are now const in NPDetectorManager --- Examples/Example1/Analysis.h | 2 + NPLib/Core/NPDetectorManager.cxx | 64 ++++++++++++++++---------------- NPLib/Core/NPDetectorManager.h | 64 ++++++++++++++++---------------- 3 files changed, 66 insertions(+), 64 deletions(-) diff --git a/Examples/Example1/Analysis.h b/Examples/Example1/Analysis.h index 7f471c45f..908a9f782 100644 --- a/Examples/Example1/Analysis.h +++ b/Examples/Example1/Analysis.h @@ -29,6 +29,8 @@ #include "NPEnergyLoss.h" #include "NPReaction.h" #include "TRandom3.h" + +#include"NPDetectorManager.h" class Analysis: public NPL::VAnalysis{ public: Analysis(); diff --git a/NPLib/Core/NPDetectorManager.cxx b/NPLib/Core/NPDetectorManager.cxx index 0f7646d30..8be0afde8 100644 --- a/NPLib/Core/NPDetectorManager.cxx +++ b/NPLib/Core/NPDetectorManager.cxx @@ -489,37 +489,37 @@ void NPL::DetectorManager::CheckSpectraServer(){ } //////////////////////////////////////////////////////////////////////////////// -bool NPL::DetectorManager::IsCryogenic() {return m_CryoTarget;}; -double NPL::DetectorManager::GetTargetThickness() {return m_TargetThickness;}; -double NPL::DetectorManager::GetNominalTargetThickness() {return m_TargetThickness;}; -double NPL::DetectorManager::GetTargetDensity() {return m_TargetDensity;}; -double NPL::DetectorManager::GetFrontDeformation() {return m_FrontDeformation;}; -double NPL::DetectorManager::GetFrontThickness() {return m_FrontThickness;}; -double NPL::DetectorManager::GetFrontRadius() {return m_FrontRadius;}; -std::string NPL::DetectorManager::GetFrontMaterial() {return m_FrontMaterial;}; -double NPL::DetectorManager::GetBackDeformation() {return m_BackDeformation;}; -double NPL::DetectorManager::GetBackRadius() {return m_BackRadius;}; -double NPL::DetectorManager::GetBackThickness() {return m_BackThickness;}; -std::string NPL::DetectorManager::GetBackMaterial() {return m_BackMaterial;}; -double NPL::DetectorManager::GetFrameRadius() {return m_FrameRadius;}; -double NPL::DetectorManager::GetFrameThickness() {return m_FrameThickness;}; -double NPL::DetectorManager::GetFrontCone() {return m_FrontCone;}; -double NPL::DetectorManager::GetBackCone() {return m_BackCone;}; -std::string NPL::DetectorManager::GetFrameMaterial() {return m_FrameMaterial;}; -double NPL::DetectorManager::GetShieldInnerRadius() {return m_ShieldInnerRadius;}; -double NPL::DetectorManager::GetShieldOuterRadius() {return m_ShieldOuterRadius;}; -double NPL::DetectorManager::GetShieldBottomLength() {return m_ShieldBottomLength;}; -double NPL::DetectorManager::GetShieldTopLength() {return m_ShieldTopLength;}; -double NPL::DetectorManager::GetShieldFrontRadius() {return m_ShieldFrontRadius;}; -double NPL::DetectorManager::GetShieldBackRadius() {return m_ShieldBackRadius;}; -std::string NPL::DetectorManager::GetShieldMaterial() {return m_ShieldMaterial;}; -std::string NPL::DetectorManager::GetTargetMaterial() {return m_TargetMaterial;}; -double NPL::DetectorManager::GetWindowsThickness() {return m_WindowsThickness;}; -std::string NPL::DetectorManager::GetWindowsMaterial() {return m_WindowsMaterial;}; -double NPL::DetectorManager::GetTargetRadius() {return m_TargetRadius;}; -double NPL::DetectorManager::GetTargetAngle() {return m_TargetAngle;}; -double NPL::DetectorManager::GetTargetX() {return m_TargetX;}; -double NPL::DetectorManager::GetTargetY() {return m_TargetY;}; -double NPL::DetectorManager::GetTargetZ() {return m_TargetZ;}; +bool NPL::DetectorManager::IsCryogenic() const {return m_CryoTarget;}; +double NPL::DetectorManager::GetTargetThickness() const {return m_TargetThickness;}; +double NPL::DetectorManager::GetNominalTargetThickness() const {return m_TargetThickness;}; +double NPL::DetectorManager::GetTargetDensity() const {return m_TargetDensity;}; +double NPL::DetectorManager::GetFrontDeformation() const {return m_FrontDeformation;}; +double NPL::DetectorManager::GetFrontThickness() const {return m_FrontThickness;}; +double NPL::DetectorManager::GetFrontRadius() const {return m_FrontRadius;}; +std::string NPL::DetectorManager::GetFrontMaterial() const {return m_FrontMaterial;}; +double NPL::DetectorManager::GetBackDeformation() const {return m_BackDeformation;}; +double NPL::DetectorManager::GetBackRadius() const {return m_BackRadius;}; +double NPL::DetectorManager::GetBackThickness() const {return m_BackThickness;}; +std::string NPL::DetectorManager::GetBackMaterial() const {return m_BackMaterial;}; +double NPL::DetectorManager::GetFrameRadius() const {return m_FrameRadius;}; +double NPL::DetectorManager::GetFrameThickness() const {return m_FrameThickness;}; +double NPL::DetectorManager::GetFrontCone() const {return m_FrontCone;}; +double NPL::DetectorManager::GetBackCone() const {return m_BackCone;}; +std::string NPL::DetectorManager::GetFrameMaterial() const {return m_FrameMaterial;}; +double NPL::DetectorManager::GetShieldInnerRadius() const {return m_ShieldInnerRadius;}; +double NPL::DetectorManager::GetShieldOuterRadius() const {return m_ShieldOuterRadius;}; +double NPL::DetectorManager::GetShieldBottomLength() const {return m_ShieldBottomLength;}; +double NPL::DetectorManager::GetShieldTopLength() const {return m_ShieldTopLength;}; +double NPL::DetectorManager::GetShieldFrontRadius() const {return m_ShieldFrontRadius;}; +double NPL::DetectorManager::GetShieldBackRadius() const {return m_ShieldBackRadius;}; +std::string NPL::DetectorManager::GetShieldMaterial() const {return m_ShieldMaterial;}; +std::string NPL::DetectorManager::GetTargetMaterial() const {return m_TargetMaterial;}; +double NPL::DetectorManager::GetWindowsThickness() const {return m_WindowsThickness;}; +std::string NPL::DetectorManager::GetWindowsMaterial() const {return m_WindowsMaterial;}; +double NPL::DetectorManager::GetTargetRadius() const {return m_TargetRadius;}; +double NPL::DetectorManager::GetTargetAngle() const {return m_TargetAngle;}; +double NPL::DetectorManager::GetTargetX() const {return m_TargetX;}; +double NPL::DetectorManager::GetTargetY() const {return m_TargetY;}; +double NPL::DetectorManager::GetTargetZ() const {return m_TargetZ;}; diff --git a/NPLib/Core/NPDetectorManager.h b/NPLib/Core/NPDetectorManager.h index a838c9ee3..8b66d3628 100644 --- a/NPLib/Core/NPDetectorManager.h +++ b/NPLib/Core/NPDetectorManager.h @@ -129,38 +129,38 @@ namespace NPL{ std::string m_WindowsMaterial; public: // those are define in cxx, otherwise the return value depend on context !? - bool IsCryogenic(); // {return m_CryoTarget;}; - double GetTargetThickness(); // {return m_TargetThickness;}; - double GetNominalTargetThickness(); // {return m_TargetThickness;}; - double GetTargetDensity(); // {return m_TargetDensity;}; - double GetFrontDeformation(); // {return m_FrontDeformation;}; - double GetFrontThickness(); // {return m_FrontThickness;}; - double GetFrontRadius(); // {return m_FrontRadius;}; - std::string GetFrontMaterial(); // {return m_FrontMaterial;}; - double GetBackDeformation(); // {return m_BackDeformation;}; - double GetBackRadius(); // {return m_BackRadius;}; - double GetBackThickness(); // {return m_BackThickness;}; - std::string GetBackMaterial(); // {return m_BackMaterial;}; - double GetFrameRadius(); // {return m_FrameRadius;}; - double GetFrameThickness(); // {return m_FrameThickness;}; - double GetFrontCone(); // {return m_FrontCone;}; - double GetBackCone(); // {return m_BackCone;}; - std::string GetFrameMaterial(); // {return m_FrameMaterial;}; - double GetShieldInnerRadius(); // {return m_ShieldInnerRadius;}; - double GetShieldOuterRadius(); // {return m_ShieldOuterRadius;}; - double GetShieldBottomLength(); // {return m_ShieldBottomLength;}; - double GetShieldTopLength(); // {return m_ShieldTopLength;}; - double GetShieldFrontRadius(); // {return m_ShieldFrontRadius;}; - double GetShieldBackRadius(); // {return m_ShieldBackRadius;}; - std::string GetShieldMaterial(); // {return m_ShieldMaterial;}; - std::string GetTargetMaterial(); // {return m_TargetMaterial;}; - double GetWindowsThickness(); // {return m_WindowsThickness;}; - std::string GetWindowsMaterial(); // {return m_WindowsMaterial;}; - double GetTargetRadius(); // {return m_TargetRadius;}; - double GetTargetAngle(); // {return m_TargetAngle;}; - double GetTargetX(); // {return m_TargetX;}; - double GetTargetY(); // {return m_TargetY;}; - double GetTargetZ(); // {return m_TargetZ;}; + bool IsCryogenic() const; // {return m_CryoTarget;}; + double GetTargetThickness() const;//{return m_TargetThickness;}; + double GetNominalTargetThickness() const; // {return m_TargetThickness;}; + double GetTargetDensity() const; // {return m_TargetDensity;}; + double GetFrontDeformation() const; // {return m_FrontDeformation;}; + double GetFrontThickness() const; // {return m_FrontThickness;}; + double GetFrontRadius() const; // {return m_FrontRadius;}; + std::string GetFrontMaterial() const; // {return m_FrontMaterial;}; + double GetBackDeformation() const; // {return m_BackDeformation;}; + double GetBackRadius() const; // {return m_BackRadius;}; + double GetBackThickness() const; // {return m_BackThickness;}; + std::string GetBackMaterial() const; // {return m_BackMaterial;}; + double GetFrameRadius() const; // {return m_FrameRadius;}; + double GetFrameThickness() const; // {return m_FrameThickness;}; + double GetFrontCone() const; // {return m_FrontCone;}; + double GetBackCone() const; // {return m_BackCone;}; + std::string GetFrameMaterial() const; // {return m_FrameMaterial;}; + double GetShieldInnerRadius() const; // {return m_ShieldInnerRadius;}; + double GetShieldOuterRadius() const; // {return m_ShieldOuterRadius;}; + double GetShieldBottomLength() const; // {return m_ShieldBottomLength;}; + double GetShieldTopLength() const; // {return m_ShieldTopLength;}; + double GetShieldFrontRadius() const; // {return m_ShieldFrontRadius;}; + double GetShieldBackRadius() const; // {return m_ShieldBackRadius;}; + std::string GetShieldMaterial() const; // {return m_ShieldMaterial;}; + std::string GetTargetMaterial() const; // {return m_TargetMaterial;}; + double GetWindowsThickness() const; // {return m_WindowsThickness;}; + std::string GetWindowsMaterial() const; // {return m_WindowsMaterial;}; + double GetTargetRadius() const; // {return m_TargetRadius;}; + double GetTargetAngle() const; // {return m_TargetAngle;}; + double GetTargetX() const; // {return m_TargetX;}; + double GetTargetY() const; // {return m_TargetY;}; + double GetTargetZ() const; // {return m_TargetZ;}; }; } -- GitLab