/*
$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.
// 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"
} // 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");
}
TTree *fAli=gAlice->TreeK();
if (fAli) pFile =fAli->GetCurrentFile();
- pFile->cd();
+ pFile->cd();
}