From a6dadfc92764d95c7c95e8ba1f1362368c2feb54 Mon Sep 17 00:00:00 2001
From: zhang <zhang@9a6e40ed-f3a0-4838-9b4a-bf418f78e88d>
Date: Thu, 7 Oct 2010 13:49:36 +0000
Subject: [PATCH] 07/10/2010 Fix the bug in ReadCh, now the code can read
 correctly the vacuum chamber setting in soleil lattice.

---
 tracy/tracy/src/soleillib.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tracy/tracy/src/soleillib.cc b/tracy/tracy/src/soleillib.cc
index cb4269d..ffcda18 100644
--- a/tracy/tracy/src/soleillib.cc
+++ b/tracy/tracy/src/soleillib.cc
@@ -658,7 +658,7 @@ void ReadCh(const char *AperFile)
 	  k2 = Elem_GetPos(Fnum2, 1);
 	/* set the vacuum chamber*/
 	  for(i=1; i<globval.Cell_nLoc; i++){
-	    if(i>=k1 && i<=k2){
+	    if(i>=k1 && i<k2){
 	      Cell[i].maxampl[X_][0] = dxmin;
 	      Cell[i].maxampl[X_][1] = dxmax;
 	      Cell[i].maxampl[Y_][0] = dymin;
@@ -1972,7 +1972,7 @@ void Multipole_thicksext(char const *fic_hcorr, char const *fic_vcorr, char cons
  }
 
 
- if (trace) printf("Elements: ndip=%d nquad=%d  nsext=%d nhcorr=%d nvcorr=%d nqcorr=%d\n",
+ if (!trace) printf("Elements: ndip=%d nquad=%d  nsext=%d nhcorr=%d nvcorr=%d nqcorr=%d\n",
                      ndip,nquad,nsext,nhcorr,nvcorr,nqcorr);
 
  /***********************************************************************************/
-- 
GitLab