From 30414dd7e1b172453d6e0c21fa3db4665c348b7b Mon Sep 17 00:00:00 2001
From: matta <matta@npt>
Date: Tue, 18 Jan 2011 23:21:04 +0000
Subject: [PATCH] * Cosmetic change on different classes

---
 NPLib/Plastic/TPlasticPhysics.cxx | 26 +++++++++++++-------------
 NPLib/Tools/NPReaction.cxx        | 14 +++++++-------
 NPLib/VDetector/VDetector.h       | 11 +----------
 3 files changed, 21 insertions(+), 30 deletions(-)

diff --git a/NPLib/Plastic/TPlasticPhysics.cxx b/NPLib/Plastic/TPlasticPhysics.cxx
index 394c52311..bfc3c1fb2 100644
--- a/NPLib/Plastic/TPlasticPhysics.cxx
+++ b/NPLib/Plastic/TPlasticPhysics.cxx
@@ -124,38 +124,38 @@ void TPlasticPhysics::ReadConfiguration(string Path)
 						}
 											
 													//Angle method
-						else if (DataBuffer.compare(0, 6, "THETA=") == 0) {
+						else if (DataBuffer=="THETA=") {
 							check_Theta = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Theta:  " << atof(DataBuffer.c_str()) << "deg" << endl;
 						}
 
-						else if (DataBuffer.compare(0, 4, "PHI=") == 0) {
+						else if (DataBuffer=="PHI=") {
 							check_Phi = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Phi:  " << atof( DataBuffer.c_str() ) << "deg" << endl;
 						}
 
-						else if (DataBuffer.compare(0, 2, "R=") == 0) {
+						else if (DataBuffer=="R=") {
 							check_R = true;
 							ConfigFile >> DataBuffer ;
 							cout << "R:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
 						}
 						
 						//Position method
-						else if (DataBuffer.compare(0, 2, "X=") == 0) {
+						else if (DataBuffer=="X=") {
 							check_X = true;
 							ConfigFile >> DataBuffer ;
 							cout << "X:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
 						}
 
-						else if (DataBuffer.compare(0, 2, "Y=") == 0) {
+						else if (DataBuffer=="Y=") {
 							check_Y = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Y:  " << atof( DataBuffer.c_str() ) << "mm"<< endl;
 						}
 
-						else if (DataBuffer.compare(0, 2, "Z=") == 0) {
+						else if (DataBuffer=="Z=") {
 							check_Z = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Z:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
@@ -163,46 +163,46 @@ void TPlasticPhysics::ReadConfiguration(string Path)
 						
 						
 						//General
-						else if (DataBuffer.compare(0, 6, "Shape=") == 0) {
+						else if (DataBuffer=="Shape=") {
 							check_Shape = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Shape:  " << DataBuffer << endl;
 						}
 						
 						// Cylindrical shape
-						else if (DataBuffer.compare(0, 7, "Radius=") == 0) {
+						else if (DataBuffer== "Radius=") {
 							check_Radius = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Plastic Radius:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
 						}
 						
 						// Squared shape
-						else if (DataBuffer.compare(0, 7, "Width=") == 0) {
+						else if (DataBuffer=="Width=") {
 							check_Width = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Plastic Width:  " <<atof( DataBuffer.c_str() ) << "mm" << endl;
 						}
 						
-						else if (DataBuffer.compare(0, 7, "Height=") == 0) {
+						else if (DataBuffer== "Height=") {
 							check_Height = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Plastic Height:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
 						}
 						
 						// Common
-						else if (DataBuffer.compare(0, 10, "Thickness=") == 0) {
+						else if (DataBuffer=="Thickness=") {
 							check_Thickness = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Plastic Thickness:  " << atof( DataBuffer.c_str() ) << "mm" << endl;
 						}
 						
-						else if (DataBuffer.compare(0, 13, "Scintillator=") == 0) {
+						else if (DataBuffer== "Scintillator=") {
 							check_Scintillator = true ;
 							ConfigFile >> DataBuffer ;
 							cout << "Plastic Scintillator type:  " << DataBuffer << endl;
 						}
 						
-						else if (DataBuffer.compare(0, 14, "LeadThickness=") == 0) {
+						else if (DataBuffer=="LeadThickness=") {
 							check_LeadThickness = true;
 							ConfigFile >> DataBuffer ;
 							cout << "Lead Thickness :  " << atof( DataBuffer.c_str() ) << "mm" << endl;
diff --git a/NPLib/Tools/NPReaction.cxx b/NPLib/Tools/NPReaction.cxx
index 1697f5828..2c85273a7 100644
--- a/NPLib/Tools/NPReaction.cxx
+++ b/NPLib/Tools/NPReaction.cxx
@@ -300,49 +300,49 @@ void Reaction::ReadConfigurationFile(string Path)
 		 			 //Search for comment Symbol %
 			      	 if (LineBuffer.compare(0, 1, "%") == 0) {/* Do Nothing */;}
 		 			 
-			         else if (DataBuffer.compare(0, 5, "Beam=") == 0) {
+			         else if (DataBuffer=="Beam=") {
 			         	check_Beam = true ;
 			            ReactionFile >> DataBuffer;
 			            Beam = DataBuffer;
 			            cout << "Beam " << Beam << endl;
 			         }
 			
-			         else if (DataBuffer.compare(0, 7, "Target=") == 0) {
+			         else if (DataBuffer=="Target=") {
 			            check_Target = true ;
 			            ReactionFile >> DataBuffer;
 			            Target = DataBuffer;
 			            cout << "Target " << Target << endl;
 			         }
 
-			         else if (DataBuffer.compare(0, 6, "Light=") == 0) {
+			         else if (DataBuffer=="Light=") {
 			         	check_Light = true ;
 			            ReactionFile >> DataBuffer;
 			            Light = DataBuffer;
 			            cout << "Light " << Light << endl;
 			         }
 
-			        else if  (DataBuffer.compare(0, 6, "Heavy=") == 0) {
+			        else if  (DataBuffer== "Heavy=") {
 			            check_Heavy = true ;
 			            ReactionFile >> DataBuffer;
 			            Heavy = DataBuffer;
 			            cout << "Heavy " << Heavy << endl;
 			         }
 
-			        else if  (DataBuffer.compare(0, 17, "ExcitationEnergy=") == 0) {
+			        else if  (DataBuffer=="ExcitationEnergy=") {
 			        	check_ExcitationEnergy = true ;
 			            ReactionFile >> DataBuffer;
 			            ExcitationEnergy = atof(DataBuffer.c_str()) * MeV;
 			            cout << "Excitation Energy " << ExcitationEnergy / MeV << " MeV" << endl;
 			         }
 
-			        else if  (DataBuffer.compare(0, 11, "BeamEnergy=") == 0) {
+			        else if  (DataBuffer=="BeamEnergy=") {
 			        	check_BeamEnergy = true ;
 			            ReactionFile >> DataBuffer;
 			            BeamEnergy = atof(DataBuffer.c_str()) * MeV;
 			            cout << "Beam Energy " << BeamEnergy / MeV << " MeV" << endl;
 			         }
 
-			        else if  (DataBuffer.compare(0, 17, "CrossSectionPath=") == 0) {
+			        else if  (DataBuffer== "CrossSectionPath=") {
 			        	check_CrossSectionPath = true ;
 			            ReactionFile >> CrossSectionPath;
 			            cout << "Cross Section File: " << CrossSectionPath << endl ;
diff --git a/NPLib/VDetector/VDetector.h b/NPLib/VDetector/VDetector.h
index c83f3b7d4..ee2a631ea 100644
--- a/NPLib/VDetector/VDetector.h
+++ b/NPLib/VDetector/VDetector.h
@@ -45,25 +45,16 @@ namespace NPA
 				//	Add Parameter to the CalibrationManger
 				virtual void AddParameterToCalibrationManager()	{} ;		
 
-				//	XXX To be DUMPED XXX
-				//	Read stream at CalibFile and pick-up calibration parameter using Token
-				//	If argument is "Simulation" no change calibration is loaded
-				virtual void ReadCalibrationFile(string)	{} ;		
-					
-				
 				//	Activated associated Branches and link it to the private member DetectorData address
 				//	In this method mother Branches (Detector) AND daughter leaf (fDetector_parameter) have to be activated
 				virtual void InitializeRootInput() 			{}		;
 
-
 				//	Create associated branches and associated private member DetectorPhysics address
 				virtual void InitializeRootOutput() 		{} 	;
 				
-				
 				//	This method is called at each event read from the Input Tree. Aime is to build treat Raw dat in order to extract physical parameter. 
 				virtual void BuildPhysicalEvent()			{}		;
 				
-				
 				//	Same as above, but only the simplest event and/or simple method are used (low multiplicity, faster algorythm but less efficient ...).
 				//	This method aimed to be used for analysis performed during experiment, when speed is requiered.
 				//	NB: This method can eventually be the same as BuildPhysicalEvent.
@@ -88,7 +79,7 @@ namespace NPA
 				
 				//	Position of detector: An array which held geometric information of detector, such as Strip position,...
 				//	Dimension must be suited for your need
-				
+
 				vector< vector <double > >	DetectorPosition	;
 				
 				//	Calibration are passed to the EventPhysics Object, so you don't need to store them here
-- 
GitLab