-// -*- mode: C++ -*-
+ // -*- mode: C++ -*-
#ifndef ALIMCEVENTHANDLER_H
#define ALIMCEVENTHANDLER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
//
// Origin: Andreas Morsch, CERN, andreas.morsch@cern.ch
//-------------------------------------------------------------------------
-#include "AliVEventHandler.h"
+#include "AliInputEventHandler.h"
#include "AliHeader.h"
#include <TExMap.h>
class TFile;
class TTree;
class TList;
+class TTreeCache;
class TParticle;
class TString;
-class AliMCEventHandler : public AliVEventHandler
+class AliMCEventHandler : public AliInputEventHandler
{
public:
AliMCEventHandler(const char* name, const char* title);
virtual ~AliMCEventHandler();
virtual void SetOutputFileName(const char* /* fname */) {;}
- virtual const char* GetOutputFileName() {return 0;}
+ virtual const char* GetOutputFileName() const {return 0;}
virtual void SetInputPath(const char* fname);
virtual void SetInputTree(TTree* /*tree*/) {;}
virtual TString* GetInputPath() const {return fPathName;}
virtual Bool_t Terminate();
virtual Bool_t TerminateIO();
virtual void ResetIO();
- virtual Bool_t GetEvent(Int_t iev);
- virtual void SetReadTR(Bool_t flag) { fReadTR = flag; }
+ virtual Bool_t LoadEvent(Int_t iev);
+ virtual void SetReadTR(Bool_t flag) { Changed(); fReadTR = flag; }
virtual void AddSubsidiaryHandler(AliMCEventHandler* handler);
virtual void SetNumberOfEventsInContainer(Int_t nev) {fEventsInContainer = nev;}
- virtual void SetPreReadMode(PreReadMode_t mode) {fPreReadMode = mode;}
+ virtual void SetPreReadMode(PreReadMode_t mode) {Changed(); fPreReadMode = mode;}
+ virtual void SetCacheSize(Long64_t size) {if (fCacheSize==0) fCacheSize = size;}
//
- AliMCEvent* MCEvent() const {return fMCEvent;}
+ AliMCEvent* MCEvent() const {return fMCEvent;}
TTree* TreeTR() const {return fTreeTR;}
TTree* TreeK() const {return fTreeK;}
virtual TTree* GetTree() const {return fTreeE;}
Int_t fNEvent; //! Number of events
Int_t fEvent; //! Current event
TString *fPathName; //! Input file path
- const Char_t *fExtension; //! File name extension
+ const Char_t *fkExtension; //! File name extension
Int_t fFileNumber; //! Input file number
Int_t fEventsPerFile; //! Number of events per file
Bool_t fReadTR; // determines if TR shall be read
Bool_t fInitOk; // Initialization ok
TList *fSubsidiaryHandlers; //! List of subsidiary MC handlers (for example for Background)
Int_t fEventsInContainer; //! Number of events in container class
- PreReadMode_t fPreReadMode; //! Pre reading mode
+ PreReadMode_t fPreReadMode; // Pre reading mode
+ Long64_t fCacheSize; // Cache size for kinematics tree
+ TTreeCache *fCacheTK; //! Cache for kinematics tree
+ TTreeCache *fCacheTR; //! Cache for track references tree
- ClassDef(AliMCEventHandler,1) //MC Truth EventHandler class
+ ClassDef(AliMCEventHandler,3) //MC Truth EventHandler class
};
#endif