87 fLastSubListQueried = 0;
115 TEntryListArray::TEntryListArray(
const char *
name,
const char *title,
const char *treename,
const char *filename):
TEntryList(name, title, treename, filename),
fSubLists(0),
fEntry(-1),
fLastSubListQueried(0),
fSubListIter(0)
174 SetTree(e->GetTreeName(), e->GetFileName());
234 TIter next2(other_sublists);
238 el1->TEntryList::Add(el2);
241 }
else if (el1 && (!el2 || el1->
fEntry < el2->
fEntry)) {
277 return currentArray->
Contains(localentry, 0, subentry);
286 result = t->TEntryList::Contains(subentry);
352 if ((result = currentArray->Enter(localentry, 0, subentry)))
360 if (currentArray && (result = currentArray->
Enter(entry, 0, subentry))) {
369 if (subentry != -1) {
370 t->TEntryList::Enter(subentry);
376 if (subentry != -1 && result) {
378 if (t) t->TEntryList::Enter(subentry);
445 if (!opt.
Contains(
"S") && new_line) {
454 std::cout << e->
fTreeName <<
":" << std::endl;
464 for (
Int_t i = 0; i < tmp->
fN; ++i) {
466 std::cout << entry <<
" ";
470 if (e && e->
fEntry == entry) {
475 std::cout << std::endl;
497 if (currentArray && (result = currentArray->Remove(localentry, 0, subentry))) {
507 if (currentArray && (result = currentArray->
Remove(entry, 0, subentry)) &&
fLists) {
516 if (subentry != -1) {
517 e->TEntryList::Remove(subentry);
519 if (subentry == -1 || !e->
GetN()) {
523 }
else if (subentry == -1) {
594 if (entry < 0)
return 0;
602 return currentArray->
SetEntry(localentry);
669 for (
Int_t i = 0; i < n2; ++i) {
670 entry = (
const_cast<TEntryList*
>(elist))->GetEntry(i);
672 while (el1 && el1->fEntry < entry) {
675 while (el2 && el2->
fEntry < entry) {
679 if (el1 && el2 && entry == el1->
fEntry && entry == el2->
fEntry) {
virtual void AddEntriesAndSubLists(const TEntryList *elist)
The method that really adds two entry lists with sublists If lists are splitted (fLists != 0)...
virtual void Print(const Option_t *option="") const
Print this list.
virtual TEntryListArray * SetEntry(Long64_t entry, TTree *tree=0)
Create a sublist for the given entry and returns it –> should be called after calling GetSubListForE...
virtual TDirectory * GetDirectory() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual Long64_t GetN() const
A list of entries and subentries in a TTree or TChain.
virtual Bool_t Enter(Long64_t entry, TTree *tree, Long64_t subentry)
Add entry #entry (, #subentry) to the list.
virtual TList * GetLists() const
virtual Int_t Contains(Long64_t entry, TTree *tree, Long64_t subentry)
virtual Int_t GetEntries() const
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
void ToUpper()
Change string to upper case.
virtual void SetTree(const char *treename, const char *filename)
If a list for a tree with such name and filename exists, sets it as the current sublist If not...
TList * fLists
a list of underlying entry lists for each tree of a chain
virtual void SetTree(const TTree *tree)
If a list for a tree with such name and filename exists, sets it as the current sublist If not...
virtual void AddLast(TObject *obj)
Add object at the end of the list.
void Init()
Initialize data members, called by Reset.
virtual TEntryListArray * GetSubListForEntry(Long64_t entry, TTree *tree=0)
Return the list holding the subentries for the given entry or 0.
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
void Init(TClassEdit::TInterpreterLookupHelper *helper)
virtual Bool_t RemoveSubList(TEntryListArray *e, TTree *tree=0)
Remove the given sublist and return true if succeeded.
TEntryListArray()
Default c-tor.
virtual TTree * GetTree() const
TList * fSubLists
a list of underlying entry lists for each event of a TEntryList
virtual void Add(const TEntryList *elist)
Add 2 entry lists.
TString fTreeName
name of the tree
Long64_t fEntry
the entry number, when the list is used for subentries
TEntryListArray * fLastSubListQueried
! last sublist checked by GetSubListForEntry
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
TEntryList * fCurrent
! currently filled entry list
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TList * GetSubLists() const
Collection abstract base class.
virtual void Reset()
Reset all entries and remove all sublists.
virtual Long64_t GetEntry(Int_t index)
Return the number of the entry #index of this TEntryList in the TTree or TChain See also Next()...
virtual Bool_t Remove(Long64_t entry, TTree *tree, Long64_t subentry)
Remove entry #entry (, #subentry) from the list.
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
virtual Int_t Contains(Long64_t entry, TTree *tree=0)
void GetFileName(const char *filename, TString &fn, Bool_t *=0)
To be able to re-localize the entry-list we identify the file by just the name and the anchor...
Long64_t fN
number of entries in the list
virtual void Subtract(const TEntryList *elist)
Remove all the entries (and subentries) of this entry list that are contained in elist.
TIter * fSubListIter
! to iterate over fSubLists and keep last one checked
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual Bool_t Enter(Long64_t entry, TTree *tree=0)
Add entry #entry to the list.
typedef void((*Func_t)())
virtual void Print(const Option_t *option="") const
Print this list.
virtual void Add(TObject *obj)
virtual ~TEntryListArray()
d-tor
virtual void Reset()
Reset this list.
virtual const char * GetTreeName() const
virtual Bool_t Remove(Long64_t entry, TTree *tree=0)
Remove entry #entry from the list.
A TTree object has a header with a name and a title.
TString fFileName
name of the file, where the tree is
virtual void ConvertToTEntryListArray(TEntryList *e)
Create a TEntryListArray based on the given TEntryList Called by SetTree when the given list is added...
A List of entry numbers in a TTree or TChain.
virtual void Subtract(const TEntryList *elist)
Remove all the entries of this entry list, that are contained in elist.
virtual Bool_t RemoveSubListForEntry(Long64_t entry, TTree *tree=0)
Remove the sublists for the given entry –> not being used...
const char * Data() const
virtual void Add(const TEntryList *elist)
Add 2 entry lists.