Correction in OnionCone.
[u/mrichter/AliRoot.git] / STRUCT / AliALIFE.cxx
index 785153c6ea00e8fa64b4e2d539c2d3e134dfba9d..9a61a122a876c9b1bee998a445d8f5a300a4ef26 100644 (file)
 
 /*
 $Log$
+Revision 1.2  2000/10/10 06:40:25  hristov
+Bug fixes
+
+Revision 1.1  2000/07/26 15:10:57  morsch
+Helper class to write geometry in ALIFE format in parallel with Geant geometry definition.
+
 */
 
 #include <AliALIFE.h>
@@ -160,7 +166,7 @@ void AliALIFE::OnionCylinder(Float_t* r, Int_t nr, Float_t zmin, Float_t zmax,
            fprintf(fFile2,"+%5s-%5s+%5s\n", nameZou, nameZin, nameRou);
        }
        fprintf(fFile2,"\n");
-       nameRin=nameRou;
+       strcpy(nameRin,nameRou);
     }
 }
 
@@ -360,15 +366,17 @@ void AliALIFE::OnionCone (Float_t* r1, Float_t* r2, Int_t nr,
            fprintf(fFile2,"EMFCUT=%s\n", "$UNSHIELDED");
            fprintf(fFile2,"WW-FACTOR=%s\n", "$UNSHIELDED");
        }
-       if (hasInner) {
-           fprintf(fFile2,"+%5s-%5s+%5s-%5s\n", 
+       if (hasInner || isCylinder) {
+           if (!isCylinder) fprintf(fFile2,"+%5s-%5s+%5s-%5s\n", 
                    nameCou, nameCin, nameZou, nameZin);
+           if (isCylinder)  fprintf(fFile2,"+%5s+%5s-%5s\n",
+                   nameCou, nameZou, nameZin); 
        } else {
            fprintf(fFile2,"+%5s\n", nameCou);
            hasInner=kTRUE;
        }
        fprintf(fFile2,"\n");        
-       nameCin=nameCou;
+       strcpy(nameCin,nameCou);
     }
 }
 
@@ -392,7 +400,7 @@ void AliALIFE::PolyCone(Float_t* rmin, Float_t* rmax, Float_t* z,
 void AliALIFE::OnionPolyCone(Float_t** r, Float_t* z,
                             Int_t nr, Int_t nz,
                             Float_t pos[3], 
-                            char** Materials, char** Fields=0, char** Cuts)
+                            char** Materials, char** Fields, char** Cuts)
 {
 //
 // Concentric PCONS