#ifndef ROOT_TEntryList
#define ROOT_TEntryList
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
class TTree;
class TDirectory;
class TObjArray;
class TString;
class TList;
class TCollection;
class TEntryList: public TNamed
{
private:
TEntryList& operator=(const TEntryList&);
protected:
TList *fLists;
TEntryList *fCurrent;
Int_t fNBlocks;
TObjArray *fBlocks;
Long64_t fN;
Long64_t fEntriesToProcess;
TString fTreeName;
TString fFileName;
ULong_t fStringHash;
Int_t fTreeNumber;
Long64_t fLastIndexQueried;
Long64_t fLastIndexReturned;
Bool_t fShift;
TDirectory *fDirectory;
Bool_t fReapply;
void GetFileName(const char *filename, TString &fn, Bool_t * = 0);
public:
enum {kBlockSize = 64000};
TEntryList();
TEntryList(const char *name, const char *title);
TEntryList(const char *name, const char *title, const TTree *tree);
TEntryList(const char *name, const char *title, const char *treename, const char *filename);
TEntryList(const TTree *tree);
TEntryList(const TEntryList& elist);
virtual ~TEntryList();
virtual void Add(const TEntryList *elist);
virtual Int_t Contains(Long64_t entry, TTree *tree = 0);
virtual void DirectoryAutoAdd(TDirectory *);
virtual Bool_t Enter(Long64_t entry, TTree *tree = 0);
virtual TEntryList *GetCurrentList() const { return fCurrent; };
virtual TEntryList *GetEntryList(const char *treename, const char *filename, Option_t *opt="");
virtual Long64_t GetEntry(Int_t index);
virtual Long64_t GetEntryAndTree(Int_t index, Int_t &treenum);
virtual Long64_t GetEntriesToProcess() const {return fEntriesToProcess;}
virtual TList *GetLists() const { return fLists; }
virtual TDirectory *GetDirectory() const { return fDirectory; }
virtual Long64_t GetN() const { return fN; }
virtual const char *GetTreeName() const { return fTreeName.Data(); }
virtual const char *GetFileName() const { return fFileName.Data(); }
virtual Int_t GetTreeNumber() const { return fTreeNumber; }
virtual Bool_t GetReapplyCut() const { return fReapply; };
virtual Int_t Merge(TCollection *list);
virtual Long64_t Next();
virtual void OptimizeStorage();
virtual Int_t RelocatePaths(const char *newloc, const char *oldloc = 0);
virtual Bool_t Remove(Long64_t entry, TTree *tree = 0);
virtual void Reset();
virtual Int_t ScanPaths(TList *roots, Bool_t notify = kTRUE);
virtual void Print(const Option_t* option = "") const;
virtual void SetDirectory(TDirectory *dir);
virtual void SetEntriesToProcess(Long64_t nen) { fEntriesToProcess = nen; }
virtual void SetShift(Bool_t shift) { fShift = shift; };
virtual void SetTree(const TTree *tree);
virtual void SetTree(const char *treename, const char *filename);
virtual void SetTreeName(const char *treename){ fTreeName = treename; };
virtual void SetFileName(const char *filename){ fFileName = filename; };
virtual void SetTreeNumber(Int_t index) { fTreeNumber=index; }
virtual void SetReapplyCut(Bool_t apply = kFALSE) {fReapply = apply;};
virtual void Subtract(const TEntryList *elist);
static Int_t Relocate(const char *fn,
const char *newroot, const char *oldroot = 0, const char *enlnm = 0);
static Int_t Scan(const char *fn, TList *roots);
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
friend TEntryList operator||(TEntryList& elist1, TEntryList& elist2);
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
#pragma GCC diagnostic pop
#endif
ClassDef(TEntryList, 2);
};
#endif