]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliRun.cxx
Corrected deletion of gMC (I.Hrivnacova)
[u/mrichter/AliRoot.git] / STEER / AliRun.cxx
index 01e00ba47b98df23ff1c078ec13dabc8ca1be366..9a88b014bd3f9d181b8afa9a5f9715eea62a2779 100644 (file)
@@ -271,7 +271,8 @@ AliRun::~AliRun()
   if(fTreeE)curfil=fTreeE->GetCurrentFile();
   delete fImedia;
   delete fField;
-  delete fMC;
+  // delete fMC;
+  delete gMC; gMC=0;
   delete fGeometry;
   delete fDisplay;
   delete fGenerator;
@@ -320,6 +321,9 @@ AliRun::~AliRun()
 //_______________________________________________________________________
 void AliRun::Copy(AliRun &) const
 {
+  //
+  //  Copy method ... not implemented
+  //
   Fatal("Copy","Not implemented!\n");
 }
 
@@ -605,6 +609,21 @@ void AliRun::EnergySummary()
 void AliRun::Announce() const
 {
   //
+  // Announce the current version of AliRoot
+  //
+  printf("%70s",
+        "****************************************************************\n");
+  printf("%6s","*");printf("%64s","*\n");
+
+  printf("%6s","*");
+  printf("    You are running AliRoot version v3-09-07\n");
+
+  printf("%6s","*");
+  printf("    The cvs tag for the current program is $Name$\n");
+
+  printf("%6s","*");printf("%64s","*\n");
+  printf("%70s",
+        "****************************************************************\n");
 }
 
 //_______________________________________________________________________
@@ -911,6 +930,9 @@ void AliRun::ResetGenerator(AliGenerator *generator)
 //_______________________________________________________________________
 void AliRun::SetTransPar(const char *filename)
 {
+  //
+  // Sets the file name for transport parameters
+  //
   fTransParName = filename;
 }
 
@@ -1127,9 +1149,12 @@ void AliRun::MakeTree(Option_t *option, const char *file)
 }
 
 //_______________________________________________________________________
-TParticle* AliRun::Particle(Int_t i)
+TParticle* AliRun::Particle(Int_t i) const
 {
-    return fStack->Particle(i);
+  //
+  // Returns particle i on the simulation stack
+  //
+  return fStack->Particle(i);
 }
 
 //_______________________________________________________________________
@@ -1204,6 +1229,8 @@ void AliRun::InitMC(const char *setup)
   // Initialize the Alice setup
   //
 
+  Announce();
+
   if(fInitDone) {
     Warning("Init","Cannot initialise AliRun twice!\n");
     return;
@@ -1894,7 +1921,7 @@ Int_t AliRun::GetNtrack() const {
 }
 
 //_______________________________________________________________________
-TObjArray* AliRun::Particles() {
+TObjArray* AliRun::Particles() const {
   //
   // Returns pointer to Particles array
   //
@@ -1902,7 +1929,7 @@ TObjArray* AliRun::Particles() {
 }
 
 //_______________________________________________________________________
-TTree* AliRun::TreeK() {
+TTree* AliRun::TreeK() const {
   //
   // Returns pointer to the TreeK array
   //