Skip to content
Snippets Groups Projects
Commit aad4ea8d authored by adrien-matta's avatar adrien-matta
Browse files

* Reorganising DetectorManager

* Detector are now put in alphabetical order
parent c618cc1b
No related branches found
No related tags found
No related merge requests found
...@@ -28,36 +28,37 @@ ...@@ -28,36 +28,37 @@
// Detector // Detector
#include "../DetectorList.inc" #include "../DetectorList.inc"
#include "GaspardTracker.h"
#include "Hyde2Tracker.h"
#include "Paris.h"
#include "Shield.h"
#include "TAnnularS1Physics.h" #include "TAnnularS1Physics.h"
#include "TCATSPhysics.h"
#include "TCharissaPhysics.h"
#include "TChateauCristalPhysics.h"
#include "TChio_anPhysics.h"
#include "TChio_digPhysics.h"
#include "TExlPhysics.h"
#include "TExogamPhysics.h" #include "TExogamPhysics.h"
#include "TLaBr3Physics.h"
#include "TMust2Physics.h" #include "TMust2Physics.h"
#include "TCATSPhysics.h" #include "TPlasticPhysics.h"
#include "TS2Physics.h"
#include "TSSSDPhysics.h" #include "TSSSDPhysics.h"
#include "TSharcPhysics.h" #include "TSharcPhysics.h"
#include "TSiLiPhysics.h"
#include "TSiResPhysics.h"
#include "TSpegPhysics.h"
#include "TTacPhysics.h"
#include "TTiaraBarrelPhysics.h"
#include "TTiaraHyballPhysics.h"
#include "TTigressPhysics.h" #include "TTigressPhysics.h"
#include "TTrifoilPhysics.h" #include "TTrifoilPhysics.h"
#include "TPlasticPhysics.h"
#include "TTrifoilPhysics.h" #include "TTrifoilPhysics.h"
#include "TTiaraHyballPhysics.h"
#include "TTiaraBarrelPhysics.h"
#include "TChateauCristalPhysics.h"
#include "GaspardTracker.h"
#include "Hyde2Tracker.h"
#include "Paris.h"
#include "TW1Physics.h" #include "TW1Physics.h"
#include "TS2Physics.h"
#include "TCharissaPhysics.h"
#include "Shield.h"
#include "TSpegPhysics.h"
#include "TExlPhysics.h"
#include "TTacPhysics.h"
#include "TSiLiPhysics.h"
#include "TSiResPhysics.h"
#include "TLaBr3Physics.h"
#include "TChio_digPhysics.h"
#include "TChio_anPhysics.h"
#include "NPOptionManager.h"
#include "RootInput.h" #include "RootInput.h"
#include "NPOptionManager.h"
///////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////
// Default Constructor // Default Constructor
DetectorManager::DetectorManager() { DetectorManager::DetectorManager() {
...@@ -82,31 +83,31 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -82,31 +83,31 @@ void DetectorManager::ReadConfigurationFile(string Path) {
/////////Boolean//////////////////// /////////Boolean////////////////////
bool AnnularS1 = false; bool AnnularS1 = false;
bool MUST2 = false;
bool CATS = false; bool CATS = false;
bool SSSD = false; bool Charissa = false;
bool Sharc = false;
bool ChateauCristal = false; bool ChateauCristal = false;
bool EXL = false;
bool Exogam = false; bool Exogam = false;
bool ScintillatorPlastic = false;
bool SiLi = false;
bool SiRes = false;
bool LaBr3 = false;
bool IonisationChamber = false;
bool Trifoil = false;
bool Charissa = false;
bool GeneralTarget = false;
bool GPDTracker = false; bool GPDTracker = false;
bool GeneralTarget = false;
bool HYD2Tracker = false; bool HYD2Tracker = false;
bool IonisationChamber = false;
bool LaBr3 = false;
bool MUST2 = false;
bool ParisDet = false; bool ParisDet = false;
bool ShieldDet = false;
bool W1 = false;
bool S2 = false; bool S2 = false;
bool SPEG = false; bool SPEG = false;
bool EXL = false; bool SSSD = false;
bool ScintillatorPlastic = false;
bool Sharc = false;
bool ShieldDet = false;
bool SiLi = false;
bool SiRes = false;
bool TAC = false; bool TAC = false;
bool TiaraHyball = false;
bool TiaraBarrel = false; bool TiaraBarrel = false;
bool TiaraHyball = false;
bool Trifoil = false;
bool W1 = false;
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
ifstream ConfigFile; ifstream ConfigFile;
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
...@@ -122,6 +123,133 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -122,6 +123,133 @@ void DetectorManager::ReadConfigurationFile(string Path) {
//Search for comment Symbol: % //Search for comment Symbol: %
if (LineBuffer.compare(0, 1, "%") == 0) { /*Do Nothing*/ ;} if (LineBuffer.compare(0, 1, "%") == 0) { /*Do Nothing*/ ;}
////////////////////////////////////////////
////// Search for Annular S1 Array //////
////////////////////////////////////////////
else if (LineBuffer.compare(0, 10, "AnnularS1") == 0 && AnnularS1 == false) {
#ifdef INC_ANNULARS1
AnnularS1 = true;
cout << "//////// Annular S1 Array ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TAnnularS1Physics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("AnnularS1", myDetector);
#endif
}
////////////////////////////////////////////
//////// Search for CATS Array ////////
////////////////////////////////////////////
else if (LineBuffer.compare(0, 9, "CATSArray") == 0 && CATS == false) {
#ifdef INC_CATS
CATS = true;
cout << "//////// CATS Array ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TCATSPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("CATS", myDetector);
#endif
}
////////////////////////////////////////////
/////// Search for CHARISSA Array //////
////////////////////////////////////////////
else if (LineBuffer.compare(0, 13, "CharissaArray") == 0 && Charissa == false) {
#ifdef INC_CHARISSA
Charissa = true;
cout << "//////// Charissa Array ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TCharissaPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("Charissa", myDetector);
#endif
}
////////////////////////////////////////////////////
//////// Search for Chateau de Cristal ////////
////////////////////////////////////////////////////
else if (LineBuffer.compare(0, 9, "ChateauCristal") == 14 && ChateauCristal == false) {
#ifdef INC_CHATEAUCRISTAL
ChateauCristal = true;
cout << "//////// Chateau de Cristal Array ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TChateauCristalPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("ChateauCristal", myDetector);
#endif
}
/////////////////////////////////////////
//////////// Search for EXL ////////////
/////////////////////////////////////////
else if (LineBuffer.compare(0, 3, "EXL") == 0 && EXL == false) {
#ifdef INC_EXL
EXL = true ;
cout << "//////// EXL Csi gamma detector ////////" << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TExlPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("EXL", myDetector);
#endif
}
//////////////////////////////////////////////
////////// Search for Exogam /////////
//////////////////////////////////////////////
else if (LineBuffer.compare(0, 11, "EXOGAMArray") == 0 && Exogam == false) {
#ifdef INC_EXOGAM
Exogam = true ;
cout << "//////// Exogam ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TExogamPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("EXOGAM", myDetector);
#endif
}
//////////////////////////////////////////// ////////////////////////////////////////////
//////////// Search for Gaspard //////////// //////////// Search for Gaspard ////////////
//////////////////////////////////////////// ////////////////////////////////////////////
...@@ -162,66 +290,60 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -162,66 +290,60 @@ void DetectorManager::ReadConfigurationFile(string Path) {
AddDetector("HYDE2", myDetector); AddDetector("HYDE2", myDetector);
#endif #endif
} }
////////////////////////////////////////////
///////////// Search for Paris ///////////// ///////////////////////////////////////////////////////
//////////////////////////////////////////// ///////////// Search for Ionisation Chamber ///////////
else if (LineBuffer.compare(0, 5, "Paris") == 0 && ParisDet == false) { ///////////////////////////////////////////////////////
#ifdef INC_PARIS else if (LineBuffer.compare(0, 17, "IonisationChamber") == 0 && IonisationChamber == false) {
ParisDet = true; #ifdef INC_CHIO
cout << "//////// Paris ////////" << endl << endl; IonisationChamber = true;
cout << "//////// Ionisation Chamger ////////" << endl << endl;
/////// Case with analog electronics
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new Paris(); VDetector* myDetector_an = new TChio_anPhysics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector_an->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("PARIS", myDetector); AddDetector("Chio_an", myDetector_an);
#endif
}
////////////////////////////////////////////
///////////// Search for Paris' Shield /////
////////////////////////////////////////////
else if (LineBuffer.compare(0, 6, "Shield") == 0 && ShieldDet == false) {
#ifdef INC_SHIELD
ShieldDet = true;
cout << "//////// Shield ////////" << endl << endl;
/////// Case with digital electronics
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new Shield(); VDetector* myDetector_dig = new TChio_digPhysics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector_dig->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("SHIELD", myDetector); AddDetector("Chio_dig", myDetector_dig);
#endif #endif
} }
//////////////////////////////////////////// ////////////////////////////////////////////
////// Search for Annular S1 Array ////// ///////////// Search for LaBr3 ///////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 10, "AnnularS1") == 0 && AnnularS1 == false) { else if (LineBuffer.compare(0, 5, "LaBr3") == 0 && LaBr3 == false) {
#ifdef INC_ANNULARS1 #ifdef INC_LABR3
AnnularS1 = true; LaBr3 = true;
cout << "//////// Annular S1 Array ////////" << endl << endl; cout << "//////// Plastic ////////" << endl << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TAnnularS1Physics(); VDetector* myDetector = new TLaBr3Physics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("AnnularS1", myDetector); AddDetector("LaBr3", myDetector);
#endif #endif
} }
//////////////////////////////////////////// ////////////////////////////////////////////
//////// Search for MUST2 Array //////// //////// Search for MUST2 Array ////////
//////////////////////////////////////////// ////////////////////////////////////////////
...@@ -242,70 +364,50 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -242,70 +364,50 @@ void DetectorManager::ReadConfigurationFile(string Path) {
AddDetector("MUST2", myDetector); AddDetector("MUST2", myDetector);
#endif #endif
} }
////////////////////////////////////////////
//////// Search for CHARISSA Array ////////
////////////////////////////////////////////
else if (LineBuffer.compare(0, 13, "CharissaArray") == 0 && Charissa == false) {
#ifdef INC_CHARISSA
Charissa = true;
cout << "//////// Charissa Array ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TCharissaPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("Charissa", myDetector);
#endif
}
//////////////////////////////////////////// ////////////////////////////////////////////
//////// Search for CATS Array //////// ///////////// Search for Paris /////////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 9, "CATSArray") == 0 && CATS == false) { else if (LineBuffer.compare(0, 5, "Paris") == 0 && ParisDet == false) {
#ifdef INC_CATS #ifdef INC_PARIS
CATS = true; ParisDet = true;
cout << "//////// CATS Array ////////" << endl << endl; cout << "//////// Paris ////////" << endl << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TCATSPhysics(); VDetector* myDetector = new Paris();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("CATS", myDetector); AddDetector("PARIS", myDetector);
#endif #endif
} }
////////////////////////////////////////////
//////////////////////////////////////////////////// ///////////// Search for Paris' Shield /////
//////// Search for Chateau de Cristal //////// ////////////////////////////////////////////
//////////////////////////////////////////////////// else if (LineBuffer.compare(0, 6, "Shield") == 0 && ShieldDet == false) {
else if (LineBuffer.compare(0, 9, "ChateauCristal") == 14 && ChateauCristal == false) { #ifdef INC_SHIELD
#ifdef INC_CHATEAUCRISTAL ShieldDet = true;
ChateauCristal = true; cout << "//////// Shield ////////" << endl << endl;
cout << "//////// Chateau de Cristal Array ////////" << endl << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TChateauCristalPhysics(); VDetector* myDetector = new Shield();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("ChateauCristal", myDetector); AddDetector("SHIELD", myDetector);
#endif #endif
} }
//////////////////////////////////////////// ////////////////////////////////////////////
////////// Search for S2 (Micron) ///////// ////////// Search for S2 (Micron) /////////
//////////////////////////////////////////// ////////////////////////////////////////////
...@@ -326,17 +428,17 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -326,17 +428,17 @@ void DetectorManager::ReadConfigurationFile(string Path) {
AddDetector("S2", myDetector); AddDetector("S2", myDetector);
#endif #endif
} }
//////////////////////////////////////////// ////////////////////////////////////////////
////////// Search for W1 (Micron) ///////// ///////////// Search for SPEG //////////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 2, "W1") == 0 && W1 == false) { else if (LineBuffer.compare(0, 4, "SPEG") == 0 && SPEG == false) {
#ifdef INC_W1 #ifdef INC_SPEG
W1 = true; SPEG = true ;
cout << "//////// W1 ////////" << endl; cout << "//////// SPEG Spectrometer ////////" << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TW1Physics(); VDetector* myDetector = new TSpegPhysics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
...@@ -344,7 +446,7 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -344,7 +446,7 @@ void DetectorManager::ReadConfigurationFile(string Path) {
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("W1", myDetector); AddDetector("SPEG", myDetector);
#endif #endif
} }
...@@ -369,48 +471,6 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -369,48 +471,6 @@ void DetectorManager::ReadConfigurationFile(string Path) {
#endif #endif
} }
////////////////////////////////////////////
///////// Search for Sharc /////////
////////////////////////////////////////////
else if (LineBuffer.compare(0, 5, "Sharc") == 0 && Sharc == false) {
#ifdef INC_SHARC
Sharc = true ;
cout << "//////// Sharc ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TSharcPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("Sharc", myDetector);
#endif
}
//////////////////////////////////////////////
////////// Search for Exogam /////////
//////////////////////////////////////////////
else if (LineBuffer.compare(0, 11, "EXOGAMArray") == 0 && Exogam == false) {
#ifdef INC_EXOGAM
Exogam = true ;
cout << "//////// Exogam ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TExogamPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("EXOGAM", myDetector);
#endif
}
//////////////////////////////////////////// ////////////////////////////////////////////
///////////// Search for Plastic /////////// ///////////// Search for Plastic ///////////
//////////////////////////////////////////// ////////////////////////////////////////////
...@@ -430,25 +490,30 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -430,25 +490,30 @@ void DetectorManager::ReadConfigurationFile(string Path) {
AddDetector("Plastic", myDetector); AddDetector("Plastic", myDetector);
#endif #endif
} }
//////////////////////////////////////////// ////////////////////////////////////////////
///////////// Search for LaBr3 /////////// ///////// Search for Sharc /////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 5, "LaBr3") == 0 && LaBr3 == false) { else if (LineBuffer.compare(0, 5, "Sharc") == 0 && Sharc == false) {
#ifdef INC_LABR3 #ifdef INC_SHARC
LaBr3 = true; Sharc = true ;
cout << "//////// Plastic ////////" << endl << endl; cout << "//////// Sharc ////////" << endl << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TLaBr3Physics(); VDetector* myDetector = new TSharcPhysics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("LaBr3", myDetector); AddDetector("Sharc", myDetector);
#endif #endif
} //////////////////////////////////////////// }
////////////////////////////////////////////
///////////// Search for SiLi /////////// ///////////// Search for SiLi ///////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 4, "SiLi") == 0 && SiLi == false) { else if (LineBuffer.compare(0, 4, "SiLi") == 0 && SiLi == false) {
...@@ -466,7 +531,8 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -466,7 +531,8 @@ void DetectorManager::ReadConfigurationFile(string Path) {
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("SiLi", myDetector); AddDetector("SiLi", myDetector);
#endif #endif
} //////////////////////////////////////////// }
////////////////////////////////////////////
///////////// Search for SiRes /////////// ///////////// Search for SiRes ///////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 5, "SiRes") == 0 && SiRes == false) { else if (LineBuffer.compare(0, 5, "SiRes") == 0 && SiRes == false) {
...@@ -485,50 +551,17 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -485,50 +551,17 @@ void DetectorManager::ReadConfigurationFile(string Path) {
AddDetector("SiRes", myDetector); AddDetector("SiRes", myDetector);
#endif #endif
} }
///////////////////////////////////////////////////////
///////////// Search for Ionisation Chamber ///////////
///////////////////////////////////////////////////////
else if (LineBuffer.compare(0, 17, "IonisationChamber") == 0 && IonisationChamber == false) {
#ifdef INC_CHIO
IonisationChamber = true;
cout << "//////// Ionisation Chamger ////////" << endl << endl;
/////// Case with analog electronics
// Instantiate the new array as a VDetector Object
VDetector* myDetector_an = new TChio_anPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector_an->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("Chio_an", myDetector_an);
/////// Case with digital electronics
// Instantiate the new array as a VDetector Object
VDetector* myDetector_dig = new TChio_digPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector_dig->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("Chio_dig", myDetector_dig);
#endif
}
//////////////////////////////////////////// ////////////////////////////////////////////
///////////// Search for SPEG ////////////// ////////////// Search for TAC //////////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 4, "SPEG") == 0 && SPEG == false) { else if (LineBuffer.compare(0, 3, "TAC") == 0 && TAC == false) {
#ifdef INC_SPEG #ifdef INC_MISC
SPEG = true ; TAC = true ;
cout << "//////// SPEG Spectrometer ////////" << endl; cout << "//////// TAC ////////" << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TSpegPhysics(); VDetector* myDetector = new TTacPhysics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
...@@ -536,52 +569,51 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -536,52 +569,51 @@ void DetectorManager::ReadConfigurationFile(string Path) {
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("SPEG", myDetector); AddDetector("TAC", myDetector);
#endif #endif
} }
///////////////////////////////////////////////////////////
//////////// Search for EXL Csi gamma detector //////////// ////////////////////////////////////////////
/////////////////////////////////////////////////////////// ////////// Search for Tiara Hyball /////////
else if (LineBuffer.compare(0, 3, "EXL") == 0 && EXL == false) { ////////////////////////////////////////////
#ifdef INC_EXL else if (LineBuffer.compare(0, 11, "TiaraHyball") == 0 && TiaraHyball == false) {
EXL = true ; #ifdef INC_TIARA
cout << "//////// EXL Csi gamma detector ////////" << endl; TiaraHyball = true;
cout << "//////// Tiara Hyball ////////" << endl << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TExlPhysics(); VDetector* myDetector = new TTiaraHyballPhysics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("EXL", myDetector); AddDetector("TiaraHyball", myDetector);
#endif #endif
} }
//////////////////////////////////////////// ////////////////////////////////////////////
////////////// Search for TAC ////////////// ///////// Search for Tiara Barrel //////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 3, "TAC") == 0 && TAC == false) { else if (LineBuffer.compare(0, 11, "TiaraBarrel") == 0 && TiaraBarrel == false) {
#ifdef INC_MISC #ifdef INC_TIARA
TAC = true ; TiaraBarrel = true;
cout << "//////// TAC ////////" << endl; cout << "//////// Tiara Barrel ////////" << endl << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TTacPhysics(); VDetector* myDetector = new TTiaraBarrelPhysics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("TAC", myDetector); AddDetector("TiaraBarrel", myDetector);
#endif #endif
} }
//////////////////////////////////////////// ////////////////////////////////////////////
///////////// Search for Trifoil /////////// ///////////// Search for Trifoil ///////////
//////////////////////////////////////////// ////////////////////////////////////////////
...@@ -601,46 +633,32 @@ void DetectorManager::ReadConfigurationFile(string Path) { ...@@ -601,46 +633,32 @@ void DetectorManager::ReadConfigurationFile(string Path) {
AddDetector("Trifoil", myDetector); AddDetector("Trifoil", myDetector);
#endif #endif
} }
//////////////////////////////////////////// ////////////////////////////////////////////
///////////// Search for Hyball //////////// ////////// Search for W1 (Micron) /////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 11, "TiaraHyball") == 0 && TiaraHyball == false) { else if (LineBuffer.compare(0, 2, "W1") == 0 && W1 == false) {
#ifdef INC_TIARA #ifdef INC_W1
TiaraHyball = true; W1 = true;
cout << "//////// Tiara Hyball ////////" << endl << endl; cout << "//////// W1 ////////" << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TTiaraHyballPhysics(); VDetector* myDetector = new TW1Physics();
// Read Position of Telescope // Read Position of Telescope
ConfigFile.close(); ConfigFile.close();
myDetector->ReadConfiguration(Path); myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str()); ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector // Add array to the VDetector Vector
AddDetector("TiaraHyball", myDetector); AddDetector("W1", myDetector);
#endif #endif
} }
////////////////////////////////////////////
///////// Search for Tiara barrel //////////
////////////////////////////////////////////
else if (LineBuffer.compare(0, 11, "TiaraBarrel") == 0 && TiaraBarrel == false) {
#ifdef INC_TIARA
TiaraBarrel = true;
cout << "//////// Tiara Barrel ////////" << endl << endl;
// Instantiate the new array as a VDetector Object ///////////////////////////////////////////////////////////////////////////////
VDetector* myDetector = new TTiaraBarrelPhysics(); // END OF DETECTOR //
// Read Position of Telescope ///////////////////////////////////////////////////////////////////////////////
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("TiaraBarrel", myDetector);
#endif
}
//////////////////////////////////////////// ////////////////////////////////////////////
//////////// Search for Target ///////////// //////////// Search for Target /////////////
//////////////////////////////////////////// ////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment