X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=STRUCT%2FAliALIFE.cxx;h=f33b237b2c1b55fb2af04777b4cd6055f3986c24;hp=56363b6d40929771a140ce7fdcc56e46facefa9f;hb=cbd70aad4d5df13e1fe495331e8a9dc3d1d4c7c5;hpb=b9d0a01d7a0723a09071b0b56200d72f59a9c2b6 diff --git a/STRUCT/AliALIFE.cxx b/STRUCT/AliALIFE.cxx index 56363b6d409..f33b237b2c1 100644 --- a/STRUCT/AliALIFE.cxx +++ b/STRUCT/AliALIFE.cxx @@ -13,27 +13,20 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.3.6.1 2002/08/29 18:08:17 hristov -Replace strcpy by assignment operator +/* $Id$ */ -Revision 1.3 2001/10/31 15:56:54 morsch -Correction in OnionCone. - -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. - -*/ +//---------------------------------------------------------------------- +// Helper class to write geometry in ALIFE format +// in parallel with Geant geometry definition. +// Author: A.Morsch +//---------------------------------------------------------------------- #include ClassImp(AliALIFE) - AliALIFE::AliALIFE(const char* file1, const char* file2) + +AliALIFE::AliALIFE(const char* file1, const char* file2) { // Constructor fNBodies = 0; @@ -48,7 +41,7 @@ ClassImp(AliALIFE) fDefaultVolume2 = "DEFAU2"; } - AliALIFE::AliALIFE() +AliALIFE::AliALIFE() { // Default constructor fBodyFile = "FlukaBody.inp"; @@ -200,6 +193,7 @@ void AliALIFE::Cone(Float_t rmin1, Float_t rmin2, // outer radius d=zmax-zmin; + sprintf(nameCou, "C%4.4d", fNBodies++); if (rmax1 >= 0. && rmax2 >= 0.) { if (rmax1!=rmax2) { if (rmax1 > rmax2) { @@ -212,12 +206,10 @@ void AliALIFE::Cone(Float_t rmin1, Float_t rmin2, r1=rmax2; r2=rmax1; } - sprintf(nameCou, "C%4.4d", fNBodies++); fprintf(fFile1,"%5s TRC%10.3f%10.3f%10.3f%10.3f%10.3f%10.3f\n", nameCou, pos[0], pos[1], pos[2], 0., 0., d); fprintf(fFile1," %10.3f%10.3f\n",r1,r2); } else { - sprintf(nameCou, "C%4.4d", fNBodies++); fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n", nameCou, pos[0], pos[1], rmax1); } @@ -228,6 +220,7 @@ void AliALIFE::Cone(Float_t rmin1, Float_t rmin2, // inner radius + sprintf(nameCin, "C%4.4d", fNBodies++); if (rmin1 >= 0. && rmin2 >= 0.) { if (rmin1!=rmin2) { if (rmin1 != 0 && rmin2 !=0) { @@ -242,13 +235,11 @@ void AliALIFE::Cone(Float_t rmin1, Float_t rmin2, r2=rmin1; d=-d; } - sprintf(nameCin, "C%4.4d", fNBodies++); fprintf(fFile1,"%5s TRC%10.3f%10.3f%10.3f%10.3f%10.3f%10.3f\n", nameCin, pos[0], pos[1], pos[2], 0., 0., d); fprintf(fFile1," %10.3f%10.3f\n",r1,r2); } } else { - sprintf(nameCin, "C%4.4d", fNBodies++); fprintf(fFile1,"%5s ZCC%10.3f%10.3f%10.3f\n", nameCin, pos[0], pos[1], rmin1); } @@ -436,7 +427,7 @@ void AliALIFE::Comment(char* Comment) } -void AliALIFE::Finish() +void AliALIFE::Finish(Bool_t iremove) { // Finish geometry definition char s[BUFSIZ]; @@ -449,8 +440,19 @@ void AliALIFE::Finish() fclose(fFile1); fclose(fFile2); + if (iremove) { + remove(fVolumeFile); + remove(fBodyFile); + } } +void AliALIFE::Copy(TObject&) const +{ + // + // Copy + // + Fatal("Copy","Not implemented!\n"); +}