]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSgeomSPD300.cxx
Fixed compilation warning with HP unix.
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSPD300.cxx
index 7f774bdfdc9771876e1b2b2e384b0a440827c21b..63f638d495c10ee3c78b1396179b083835a7f767 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/06/10 10:43:04  nilsen
+Fixed bug in copy and operator =.
+
 
 */
 
@@ -34,6 +37,7 @@ const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction.
 const Int_t   knbinx = 256;    // number of pixels along x direction.
 const Float_t kbinz0 = 0.0300; // cm; Standard pixel size in z direction.
 const Int_t   knbinz = 279;    // number of pixels along z direction.
+    Int_t i;
 
     fdx = kdx;  // default value.
     fdy = kdy;  // default value.
@@ -42,9 +46,9 @@ const Int_t   knbinz = 279;    // number of pixels along z direction.
     fNbinz = knbinz; // default number of bins in z.
 
     fBinSizeX = new Float_t[fNbinx]; // array of bin sizes along x.
-    for(Int_t i=0;i<fNbinx;i++) fBinSizeX[i] = kbinx0; // default x bin size.
+    for(i=0;i<fNbinx;i++) fBinSizeX[i] = kbinx0; // default x bin size.
     fBinSizeZ = new Float_t[fNbinz]; // array of bin sizes along z.
-    for(Int_t i=0;i<fNbinz;i++) fBinSizeZ[i] = kbinz0; // default z bin size.
+    for(i=0;i<fNbinz;i++) fBinSizeZ[i] = kbinz0; // default z bin size.
 
     // correct detector size for bin size.
     fdx = 0.0;
@@ -63,6 +67,7 @@ AliITSgeomSPD300::AliITSgeomSPD300(Float_t dy,Int_t nx,Float_t *bx,
 ////////////////////////////////////////////////////////////////////////
 //    default constructor, for a User modified TDR based geometry.
 ////////////////////////////////////////////////////////////////////////
+    Int_t i;
     fdx = 0.0;
     fdy =  dy;
     fdz = 0.0;
@@ -70,14 +75,14 @@ AliITSgeomSPD300::AliITSgeomSPD300(Float_t dy,Int_t nx,Float_t *bx,
     fNbinz = nz; // new number of bins in z.
 
     fBinSizeX = new Float_t[fNbinx]; // array of bin sizes along x.
-    for(Int_t i=0;i<fNbinx;i++) fBinSizeX[i] = bx[i]; // new x bin size.
+    for(i=0;i<fNbinx;i++) fBinSizeX[i] = bx[i]; // new x bin size.
     fBinSizeZ = new Float_t[fNbinz]; // array of bin sizes along z.
-    for(Int_t i=0;i<fNbinz;i++) fBinSizeZ[i] = bz[i]; // new z bin size.
+    for(i=0;i<fNbinz;i++) fBinSizeZ[i] = bz[i]; // new z bin size.
 
     // correct detector size for bin size.
-    for(Int_t i=0;i<fNbinx;i++) fdx +=fBinSizeX[i];
+    for(i=0;i<fNbinx;i++) fdx +=fBinSizeX[i];
     fdx *= 0.5;
-    for(Int_t i=0;i<fNbinz;i++) fdz +=fBinSizeZ[i];
+    for(i=0;i<fNbinz;i++) fdz +=fBinSizeZ[i];
     fdz *= 0.5;
 
     fShapeSPD = new TBRIK("ActiveSPD","Active volume of SPD","SPD SI DET",
@@ -86,6 +91,7 @@ AliITSgeomSPD300::AliITSgeomSPD300(Float_t dy,Int_t nx,Float_t *bx,
 //______________________________________________________________________
 AliITSgeomSPD300::AliITSgeomSPD300(AliITSgeomSPD300 &source){
   // copy constructor
+    Int_t i;
     if(&source == this) return;
     this->fShapeSPD = new TBRIK(*(source.fShapeSPD));
     this->fdx = source.fdx;
@@ -97,12 +103,13 @@ AliITSgeomSPD300::AliITSgeomSPD300(AliITSgeomSPD300 &source){
     this->fBinSizeX = new Float_t[this->fNbinx];
     this->fNbinz = source.fNbinz;
     this->fBinSizeZ = new Float_t[this->fNbinz];
-    for(Int_t i=0;i<fNbinx;i++) this->fBinSizeX[i] = source.fBinSizeX[i];
-    for(Int_t i=0;i<fNbinz;i++) this->fBinSizeZ[i] = source.fBinSizeZ[i];
+    for(i=0;i<fNbinx;i++) this->fBinSizeX[i] = source.fBinSizeX[i];
+    for(i=0;i<fNbinz;i++) this->fBinSizeZ[i] = source.fBinSizeZ[i];
 }
 //______________________________________________________________________
 AliITSgeomSPD300& AliITSgeomSPD300::operator=(AliITSgeomSPD300 &source){
   // = operator
+    Int_t i;
     if(&source == this) return *this;
     this->fShapeSPD = new TBRIK(*(source.fShapeSPD));
     this->fdx = source.fdx;
@@ -114,8 +121,8 @@ AliITSgeomSPD300& AliITSgeomSPD300::operator=(AliITSgeomSPD300 &source){
     this->fBinSizeX = new Float_t[this->fNbinx];
     this->fNbinz = source.fNbinz;
     this->fBinSizeZ = new Float_t[this->fNbinz];
-    for(Int_t i=0;i<fNbinx;i++) this->fBinSizeX[i] = source.fBinSizeX[i];
-    for(Int_t i=0;i<fNbinz;i++) this->fBinSizeZ[i] = source.fBinSizeZ[i];
+    for(i=0;i<fNbinx;i++) this->fBinSizeX[i] = source.fBinSizeX[i];
+    for(i=0;i<fNbinz;i++) this->fBinSizeZ[i] = source.fBinSizeZ[i];
     return *this;
 }
 //______________________________________________________________________
@@ -131,6 +138,7 @@ void AliITSgeomSPD300::ReSetBins(Float_t dy,Int_t nx,Float_t *bx,
 ////////////////////////////////////////////////////////////////////////
 //    default constructor, for a User modified TDR based geometry.
 ////////////////////////////////////////////////////////////////////////
+    Int_t i;
     fdx = 0.0;
     fdy =  dy;
     fdz = 0.0;
@@ -139,15 +147,15 @@ void AliITSgeomSPD300::ReSetBins(Float_t dy,Int_t nx,Float_t *bx,
 
     if(fBinSizeX!=0) delete[] fBinSizeX;
     fBinSizeX = new Float_t[fNbinx]; // array of bin sizes along x.
-    for(Int_t i=0;i<fNbinx;i++) fBinSizeX[i] = bx[i]; // new x bin size.
+    for(i=0;i<fNbinx;i++) fBinSizeX[i] = bx[i]; // new x bin size.
     if(fBinSizeZ!=0) delete[] fBinSizeZ;
     fBinSizeZ = new Float_t[fNbinz]; // array of bin sizes along z.
-    for(Int_t i=0;i<fNbinz;i++) fBinSizeZ[i] = bz[i]; // new z bin size.
+    for(i=0;i<fNbinz;i++) fBinSizeZ[i] = bz[i]; // new z bin size.
 
     // correct detector size for bin size.
-    for(Int_t i=0;i<fNbinx;i++) fdx +=fBinSizeX[i];
+    for(i=0;i<fNbinx;i++) fdx +=fBinSizeX[i];
     fdx *= 0.5;
-    for(Int_t i=0;i<fNbinz;i++) fdz +=fBinSizeZ[i];
+    for(i=0;i<fNbinz;i++) fdz +=fBinSizeZ[i];
     fdz *= 0.5;
 
     fShapeSPD = new TBRIK("ActiveSPD","Active volume of SPD","SPD SI DET",