ROOT logo
ROOT » TREE » TREE » TEntryListFromFile

class TEntryListFromFile: public TEntryList

 TEntryListFromFile

 Manages entry lists from different files, when they are not loaded
 in memory at the same time.

 This entry list should only be used when processing a TChain (see
 TChain::SetEntryList() function). File naming convention:
 - by default, filename_elist.root is used, where filename is the
   name of the chain element.
 - xxx$xxx.root - $ sign is replaced by the name of the chain element
 If the list name is not specified (by passing filename_elist.root/listname to
 the TChain::SetEntryList() function, the first object of class TEntryList
 in the file is taken.
 It is assumed that there are as many lists, as there are chain elements,
 and they are in the same order.

 If one of the list files can't be opened, or there is an error reading a list
 from the file, this list is skipped and the entry loop continues on the next
 list.

Function Members (Methods)

public:
TEntryListFromFile()
TEntryListFromFile(const char* filename, const char* listname, Int_t nfiles)
virtual~TEntryListFromFile()
voidTObject::AbstractMethod(const char* method) const
virtual voidAdd(const TEntryList*)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Int_tContains(Long64_t, TTree*)
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidTEntryList::DirectoryAutoAdd(TDirectory*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual Bool_tEnter(Long64_t, TTree*)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual TEntryList*GetCurrentList() const
virtual TDirectory*TEntryList::GetDirectory() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Long64_tGetEntries()
virtual Long64_tGetEntriesFast() const
virtual Long64_tTEntryList::GetEntriesToProcess() const
virtual Long64_tGetEntry(Int_t index)
virtual Long64_tGetEntryAndTree(Int_t index, Int_t& treenum)
virtual TEntryList*GetEntryList(const char*, const char*, Option_t*)
virtual const char*GetFileName() const
virtual const char*TObject::GetIconName() const
virtual TList*TEntryList::GetLists() const
virtual Long64_tGetN() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual Bool_tTEntryList::GetReapplyCut() const
virtual const char*TNamed::GetTitle() const
virtual const char*GetTreeName() const
virtual Int_tGetTreeNumber() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual Int_tLoadList(Int_t listnumber)
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Int_tMerge(TCollection*)
virtual Long64_tNext()
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidOptimizeStorage()
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
static Int_tTEntryList::Relocate(const char* fn, const char* newroot, const char* oldroot = 0, const char* enlnm = 0)
virtual Int_tTEntryList::RelocatePaths(const char* newloc, const char* oldloc = 0)
virtual Bool_tRemove(Long64_t, TTree*)
virtual voidTEntryList::Reset()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
static Int_tTEntryList::Scan(const char* fn, TList* roots)
virtual Int_tTEntryList::ScanPaths(TList* roots, Bool_t notify = kTRUE)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTEntryList::SetDirectory(TDirectory* dir)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTEntryList::SetEntriesToProcess(Long64_t nen)
virtual voidTEntryList::SetFileName(const char* filename)
virtual voidSetFileNames(TObjArray* names)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
virtual voidSetNFiles(Int_t nfiles)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTEntryList::SetReapplyCut(Bool_t apply = kFALSE)TOGGLE
virtual voidTEntryList::SetShift(Bool_t shift)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidSetTree(const TTree*)
virtual voidSetTree(const char*, const char*)
virtual voidTEntryList::SetTreeName(const char* treename)
virtual voidSetTreeNumber(Int_t index)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidSubtract(const TEntryList*)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum { kBigNumber
};
enum TEntryList::[unnamed] { kBlockSize
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TObjArray*TEntryList::fBlocksblocks with indices of passing events (TEntryListBlocks)
TEntryList*TEntryList::fCurrent! currently filled entry list
TDirectory*TEntryList::fDirectory! Pointer to directory holding this tree
Long64_tTEntryList::fEntriesToProcessused on proof to set the number of entries to process in a packet
TFile*fFilecurrently open file
TStringTEntryList::fFileNamename of the file, where the tree is
TObjArray*fFileNames! points to the fFiles data member of the corresponding chain
Long64_tTEntryList::fLastIndexQueried! used to optimize GetEntry() function from a loop
Long64_tTEntryList::fLastIndexReturned! used to optimize GetEntry() function from a loop
TStringfListFileNamefrom this string names of all files can be found
TStringfListNamename of the list
Long64_t*fListOffset[fNFiles] numbers of entries in ind. lists
TList*TEntryList::fListsa list of underlying entry lists for each tree of a chain
Long64_tTEntryList::fNnumber of entries in the list
Int_tTEntryList::fNBlocksnumber of TEntryListBlocks
Int_tfNFilestotal number of files
TStringTNamed::fNameobject identifier
Bool_tTEntryList::fReapplyIf true, TTree::Draw will 'reapply' the original cut
Bool_tTEntryList::fShift! true when some sub-lists don't correspond to trees
ULong_tTEntryList::fStringHash! Hash value of a string of treename and filename
TStringTNamed::fTitleobject title
TStringTEntryList::fTreeNamename of the tree
Int_tTEntryList::fTreeNumber! the index of the tree in the chain (used when the entry

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TEntryListFromFile()
 default constructor.
TEntryListFromFile(const char* filename, const char* listname, Int_t nfiles)
 File naming convention:
 - by default, filename_elist.root is used, where filename is the
   name of the chain element
 - xxx$xxx.root - $ sign is replaced by the name of the chain element
 The TObjArray of chain elements is set by the TEntryListFromFile::SetFileNames()
 function.
 If the list name is not specified, the first object of class TEntryList
 in the file is taken.
 nfiles is the total number of files to process
~TEntryListFromFile()
 d-tor
Long64_t GetEntry(Int_t index)
returns entry #index
See also Next() for a faster alternative
Long64_t GetEntryAndTree(Int_t index, Int_t& treenum)
return the entry corresponding to the index parameter and the
number of the tree, where this entry is
Long64_t GetEntries()
Returns the total number of entries in the list.
If some lists have not been loaded, loads them.
Long64_t Next()
Returns the next entry in the list.
Faster than GetEntry()
Int_t LoadList(Int_t listnumber)
Loads the list #listnumber
This is the only function that can modify fCurrent and fFile data members
void Print(Option_t* option = "") const
Print info about this list
TEntryListFromFile(const TEntryListFromFile& )
TEntryListFromFile & operator=(const TEntryListFromFile& )
void Add(const TEntryList* )
{}
Int_t Contains(Long64_t , TTree* )
{return 0;}
Bool_t Enter(Long64_t , TTree* )
{return 0;}
TEntryList * GetCurrentList() const
{ return fCurrent; }
TEntryList * GetEntryList(const char* , const char* , Option_t* )
{return 0;}
Long64_t GetEntriesFast() const
{ return fN; }
Long64_t GetN() const
{ return fN; }
const char * GetTreeName() const
{ return fTreeName.Data(); }
const char * GetFileName() const
{ return fFileName.Data(); }
Int_t GetTreeNumber() const
{ return fTreeNumber; }
Int_t Merge(TCollection* )
{ return 0; }
void OptimizeStorage()
{}
Bool_t Remove(Long64_t , TTree* )
{ return 0; }
void SetTree(const TTree* )
{}
void SetTree(const char* , const char* )
{}
void SetFileNames(TObjArray* names)
{ fFileNames = names; }
void SetTreeNumber(Int_t index)
{ fTreeNumber=index; }
void SetNFiles(Int_t nfiles)
{ fNFiles = nfiles; }
void Subtract(const TEntryList* )
{}