]> 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 093bf1ac985ad36a621cf1038ee2c3e1f66cd809..9a88b014bd3f9d181b8afa9a5f9715eea62a2779 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Header$ */
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -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");
 }
 
@@ -601,6 +605,27 @@ void AliRun::EnergySummary()
   //  fSum2Energy.Set(0);
 }
 
+//_______________________________________________________________________
+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");
+}
+
 //_______________________________________________________________________
 AliModule *AliRun::GetModule(const char *name) const
 {
@@ -905,6 +930,9 @@ void AliRun::ResetGenerator(AliGenerator *generator)
 //_______________________________________________________________________
 void AliRun::SetTransPar(const char *filename)
 {
+  //
+  // Sets the file name for transport parameters
+  //
   fTransParName = filename;
 }
 
@@ -1121,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);
 }
 
 //_______________________________________________________________________
@@ -1198,6 +1229,8 @@ void AliRun::InitMC(const char *setup)
   // Initialize the Alice setup
   //
 
+  Announce();
+
   if(fInitDone) {
     Warning("Init","Cannot initialise AliRun twice!\n");
     return;
@@ -1888,7 +1921,7 @@ Int_t AliRun::GetNtrack() const {
 }
 
 //_______________________________________________________________________
-TObjArray* AliRun::Particles() {
+TObjArray* AliRun::Particles() const {
   //
   // Returns pointer to Particles array
   //
@@ -1896,7 +1929,7 @@ TObjArray* AliRun::Particles() {
 }
 
 //_______________________________________________________________________
-TTree* AliRun::TreeK() {
+TTree* AliRun::TreeK() const {
   //
   // Returns pointer to the TreeK array
   //