library: libTree #include "TEntryList.h" |
TEntryList() | |
TEntryList(const TTree* tree) | |
TEntryList(const TEntryList& elist) | |
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) | |
virtual | ~TEntryList() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | Add(const TEntryList* elist) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual Int_t | Contains(Long64_t entry, TTree* tree = 0) |
virtual void | TNamed::Copy(TObject& named) const |
virtual void | TObject::Delete(Option_t* option = "") |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() const |
virtual TObject* | TObject::DrawClone(Option_t* option = "") const |
virtual void | TObject::Dump() const |
virtual Bool_t | Enter(Long64_t entry, TTree* tree = 0) |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
virtual TEntryList* | GetCurrentList() |
virtual TDirectory* | GetDirectory() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual Long64_t | GetEntry(Int_t index) |
virtual Long64_t | GetEntryAndTree(Int_t index, Int_t& treenum) |
virtual TEntryList* | GetEntryList(const char* treename, const char* filename) |
virtual const char* | GetFileName() |
virtual const char* | TObject::GetIconName() const |
virtual TList* | GetLists() const |
virtual Long64_t | GetN() const |
virtual const char* | TNamed::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TNamed::GetTitle() const |
virtual const char* | GetTreeName() |
virtual Int_t | GetTreeNumber() |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() const |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Int_t | Merge(TCollection* list) |
virtual Long64_t | Next() |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::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) |
TEntryList& | operator=(const TEntryList&) |
virtual void | OptimizeStorage() |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
virtual Bool_t | Remove(Long64_t entry, TTree* tree = 0) |
virtual void | Reset() |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") const |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | SetDirectory(TDirectory* dir) |
virtual void | TObject::SetDrawOption(Option_t* option = "") |
static void | TObject::SetDtorOnly(void* obj) |
virtual void | SetFileName(const char* filename) |
virtual void | TNamed::SetName(const char* name) |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | SetShift(Bool_t shift) |
virtual void | TNamed::SetTitle(const char* title = "") |
virtual void | SetTree(const TTree* tree) |
virtual void | SetTree(const char* treename, const char* filename) |
virtual void | SetTreeName(const char* treename) |
virtual void | SetTreeNumber(Int_t index) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | Subtract(const TEntryList* elist) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
enum { | kBlockSize | |
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
TList* | fLists | a list of underlying entry lists for each tree of a chain |
TEntryList* | fCurrent | ! currently filled entry list |
Int_t | fNBlocks | number of TEntryListBlocks |
TObjArray* | fBlocks | blocks with indices of passing events (TEntryListBlocks) |
Long64_t | fN | number of entries in the list |
TString | fTreeName | name of the tree |
TString | fFileName | name of the file, where the tree is |
ULong_t | fStringHash | ! Hash value of a string of treename and filename |
Int_t | fTreeNumber | ! the index of the tree in the chain (used when the entry |
Long64_t | fLastIndexQueried | ! used to optimize GetEntry() function from a loop |
Long64_t | fLastIndexReturned | ! used to optimize GetEntry() function from a loop |
Bool_t | fShift | ! true when some sub-lists don't correspond to trees |
TDirectory* | fDirectory | ! Pointer to directory holding this tree |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
TEntryList Stores entry numbers. There are two types of entry lists: - for a TTree (fBlocks data member is non-zero) Entry numbers are stored in TEntryListBlocks, which, in their turn, are stored in the TObjArray fBlocks. The range of the entry numbers is cut into intervals of kBlockSize entries (currently 64000), so that the first block contains information which entries out of the first 64000 pass the selection, the second block - which entries out of the 64000-127999 interval pass the selection, etc. Some blocks, obviously, might be empty. The internal representation of entry numbers in the blocks is described in the TEntryListBlock class description, and this representation might be changed by calling OptimizeStorage() function (when the list is filled via the Enter() function, this is done automatically). Individual entry lists can be merged (functions Merge() and Add()) to make an entry list for a TChain of corresponding TTrees. - for a TChain (fLists data member is non-zero) It contains a TList of sub-lists (TEntryList objects, corresponding to each TTree) Trees and lists are matched by the TTree name and its file name (full path). All sub-lists are returned by the GetLists() function and individual lists are returned by GetEntryList() function. Such lists are no different from the lists for TTrees, described above. Operations on entry lists (see also function comments): - Add() - if the lists are for the same tree, adds all the entries of the second list to the first list. If the lists are for different trees, creates a TEntryList with 2 sublists for each TTree. If the lists are for TChains, merges the ones for the same trees and adds new sublists for the TTrees that were not included in the first TEntryList - Subtract() - if the lists are for the same TTree, removes the entries of the second list from the first list. If the lists are for TChains, loops over all sub-lists - GetEntry(n) - returns the n-th non-zero entry number - Next() - returns next non-zero entry number. Note, that this function is much faster than GetEntry, and it's called when GetEntry() is called for 2 or more indices in a row. TEntryList objects are added to the list of objects in the current directory TTree::Draw() and TChain::Draw(): tree->Draw(">>elist", "x<0 && y>0"); TEntryList *elist = (TEntryList*)gDirectory->Get("elist"); TSelectors: To fill an TEntryList from a TSelector correctly, one must add the TEntryList object to the output list of the selector (TSelector::fOutput). This is the only way to make the sub-lists of the TEntryList switch when the current tree of the TChain is changed. Using a TEntryList as input (TTree::SetEntryList() and TChain::SetEntryList()) - while the TTree::SetEntryList() function is only setting the TTree::fEntryList data member, the same function in TChain also finds correspondance between the TTrees of this TChain and the sub-lists of this TEntryList. TEntryList and the current directory: - TEntryList objects are automatically added to the current directory (like TTrees). However, in case of a TEntryList for a chain, only the top-level entry list is added, not the sub-lists for specific trees. Placing entry lists in the current directory allows calling them as a part of a TTreeFormula expression, so if the user wants to extract a sublist from a TChain entry list via the GetEntryList() or some other function, he has to add it to the current directory to be able to use it in TTreeFormula expressions.
constructor with name and title, which also sets the tree
c-tor with name and title, which also sets the treename and the filename
Add 2 entry lists If the resulting list has sublists (fLists!=0), its fCurrent member is reset to 0
When tree = 0, returns from the current list When tree != 0, finds the list, corresponding to this tree When tree is a chain, the entry is assumed to be global index and the local entry is recomputed from the treeoffset information of the chain
Add entry #entry to the list When tree = 0, returns from the current list When tree != 0, finds the list, corresponding to this tree When tree is a chain, the entry is assumed to be global index and the local entry is recomputed from the treeoffset information of the chain
Remove entry #entry from the list When tree = 0, returns from the current list When tree != 0, finds the list, corresponding to this tree When tree is a chain, the entry is assumed to be global index and the local entry is recomputed from the treeoffset information of the chain
return the number of the entry #index of this TEntryList in the TTree or TChain See also Next().
return the index of "index"-th non-zero entry in the TTree or TChain and the # of the corresponding tree in the chain
return the entry list, correspoding to treename and filename
return the next non-zero entry index (next after fLastIndexQueried) this function is faster than GetEntry()
Checks if the array representation is more economical and if so, switches to it
Print this list option = "" - default - print the name of the tree and file option = "all" - print all the entry numbers
If a list for a tree with such name and filename exists, sets it as the current sublist If not, creates this list and sets it as the current sublist
If a list for a tree with such name and filename exists, sets it as the current sublist If not, creates this list and sets it as the current sublist
remove all the entries of this entry list, that are contained in elist