]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenExtFile.cxx
New class used for primary vertex finding (AliITSVertexerTracks)
[u/mrichter/AliRoot.git] / EVGEN / AliGenExtFile.cxx
index c48fdd9c9a5a95977b5d1de7634100625306e982..5cbb7895b420b5802d0e0667e9fc818ee87953c6 100644 (file)
 
 /*
 $Log$
+Revision 1.23  2002/10/14 14:55:35  hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.20.4.1  2002/06/10 14:57:41  hristov
+Merged with v3-08-02
+
+Revision 1.22  2002/05/15 11:59:49  morsch
+CdEventFile() method added.
+
+Revision 1.21  2002/04/26 10:39:31  morsch
+AliGenExtFile derives from AliGenMC. Generate() uses methods from AliGenMC (N. Carrer)
+
 Revision 1.20  2002/03/22 09:43:28  morsch
 Don't delete the TParticle.
 
@@ -72,7 +84,7 @@ Introduction of the Copyright and cvs Log
 // Event generator that using an instance of type AliGenReader
 // reads particles from a file and applies cuts. 
 
-#include <iostream.h>
+#include <Riostream.h>
 
 #include "AliGenExtFile.h"
 #include "AliRun.h"
@@ -231,9 +243,13 @@ void AliGenExtFile::Generate()
   } // event loop
 
   SetHighWaterMark(nt);
+  CdEventFile();
+}
 
+void AliGenExtFile::CdEventFile()
+{
+// CD back to the event file
   TFile *pFile=0;
-// Get AliRun object or create it 
   if (!gAlice) {
       gAlice = (AliRun*)pFile->Get("gAlice");
       if (gAlice) printf("AliRun object found on file\n");
@@ -241,7 +257,7 @@ void AliGenExtFile::Generate()
   }
   TTree *fAli=gAlice->TreeK();
   if (fAli) pFile =fAli->GetCurrentFile();
-  pFile->cd();
+  pFile->cd();    
 }