From 9ef1aa45fa2b67a9fc8057ee4659ea0f5f24f412 Mon Sep 17 00:00:00 2001
From: adrien-matta <a.matta@surrey.ac.uk>
Date: Tue, 28 Oct 2014 17:01:25 +0000
Subject: [PATCH] * Fixing issue with tigress

---
 NPAnalysis/macros/GeometricalEfficiency.C |  2 +-
 NPLib/VDetector/DetectorManager.cxx       | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/NPAnalysis/macros/GeometricalEfficiency.C b/NPAnalysis/macros/GeometricalEfficiency.C
index 1509e128f..06ed0c122 100644
--- a/NPAnalysis/macros/GeometricalEfficiency.C
+++ b/NPAnalysis/macros/GeometricalEfficiency.C
@@ -98,4 +98,4 @@ void GeometricalEfficiency(const char * fname = "myResult"){
   SolidACM->GetXaxis()->SetTitle("#theta_{CM} (deg)");
   SolidACM->GetYaxis()->SetTitle("d#Omega (sr) ");
   c4->Update();
-
+}
diff --git a/NPLib/VDetector/DetectorManager.cxx b/NPLib/VDetector/DetectorManager.cxx
index b9b5ed31b..9027d06d8 100644
--- a/NPLib/VDetector/DetectorManager.cxx
+++ b/NPLib/VDetector/DetectorManager.cxx
@@ -106,6 +106,7 @@ void DetectorManager::ReadConfigurationFile(string Path)   {
    bool TiaraBarrel         = false;
    bool TiaraHyball         = false;
    bool Trifoil             = false;
+   bool Tigress             = false;
    bool W1                  = false;
    ////////////////////////////////
    bool GeneralTarget       = false;
@@ -637,6 +638,26 @@ void DetectorManager::ReadConfigurationFile(string Path)   {
 #endif
     }
  
+    ////////////////////////////////////////////
+    ///////////// Search for Tigress ///////////
+    ////////////////////////////////////////////
+    else if (LineBuffer.compare(0, 7, "Tigress") == 0 && Tigress == false) {
+#ifdef INC_TIGRESS
+      Tigress = true;
+      cout << "//////// Tigress ////////" << endl << endl;
+
+      // Instantiate the new array as a VDetector Object
+      VDetector* myDetector = new TTigressPhysics();
+      // Read Position of Telescope
+      ConfigFile.close();
+      myDetector->ReadConfiguration(Path);
+      ConfigFile.open(Path.c_str());
+
+      // Add array to the VDetector Vector
+      AddDetector("Tigress", myDetector);
+#endif
+    }
+ 
       ////////////////////////////////////////////
       ////////// Search for W1 (Micron)  /////////
       ////////////////////////////////////////////
-- 
GitLab