**************************************************************************/
/* $Id$ */
-
+//
+// Realisation of AliGenReader to be used with AliGenExtFile
+// It reads events from a kinematics TreeK.
+// NextEvent() is used to loop over events
+// and NextParticle() to loop over particles.
+// Author: andreas.morsch@cern.ch
+//
#include <TFile.h>
#include <TTree.h>
#include <TParticle.h>
#include "AliRun.h"
#include "AliRunLoader.h"
-ClassImp(AliGenReaderTreeK);
+ClassImp(AliGenReaderTreeK)
const TString AliGenReaderTreeK::fgkEventFolderName("GenReaderTreeK");
AliGenReaderTreeK::AliGenReaderTreeK():
- AliGenReader(),
- fNcurrent(0),
- fNparticle(0),
- fNp(0),
- fInRunLoader(0),
- fBaseFile(0),
- fStack(0),
- fOnlyPrimaries(kFALSE),
- fDirs(0x0),
- fCurrentDir(0)
+ AliGenReader(),
+ fNcurrent(0),
+ fNparticle(0),
+ fNp(0),
+ fInRunLoader(0),
+ fBaseFile(0),
+ fStack(0),
+ fOnlyPrimaries(kFALSE),
+ fDirs(0x0),
+ fCurrentDir(0)
{
// Default constructor
}
AliGenReaderTreeK::AliGenReaderTreeK(const AliGenReaderTreeK &reader):
- fNcurrent(0),
- fNparticle(0),
- fNp(0),
- fInRunLoader(0),
- fBaseFile(0),
- fStack(0),
- fOnlyPrimaries(kFALSE),
- fDirs(0x0),
- fCurrentDir(0)
+ AliGenReader(reader),
+ fNcurrent(0),
+ fNparticle(0),
+ fNp(0),
+ fInRunLoader(0),
+ fBaseFile(0),
+ fStack(0),
+ fOnlyPrimaries(kFALSE),
+ fDirs(0x0),
+ fCurrentDir(0)
{
- ;
+ reader.Copy(*this);
}
AliGenReaderTreeK& AliGenReaderTreeK::operator=(const AliGenReaderTreeK& rhs)
{
// Assignment operator
+ rhs.Copy(*this);
return *this;
}
+void AliGenReaderTreeK::Copy(TObject&) const
+{
+ //
+ // Copy
+ //
+ Fatal("Copy","Not implemented!\n");
+}
+
TString& AliGenReaderTreeK::GetDirName(Int_t entry)
{
+// Get the current directory name
+
TString* retval;//return value
if (fDirs == 0x0)
{