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)) {
279 return currentArray->
Contains(localentry, 0, subentry);
288 result = t->TEntryList::Contains(subentry);
354 if ((result = currentArray->Enter(localentry, 0, subentry)))
362 if (currentArray && (result = currentArray->
Enter(entry, 0, subentry))) {
371 if (subentry != -1) {
372 t->TEntryList::Enter(subentry);
378 if (subentry != -1 && result) {
380 if (t) t->TEntryList::Enter(subentry);
447 if (!opt.
Contains(
"S") && new_line) {
456 std::cout << e->
fTreeName <<
":" << std::endl;
466 for (
Int_t i = 0; i < tmp->
fN; ++i) {
468 std::cout << entry <<
" ";
472 if (e && e->
fEntry == entry) {
477 std::cout << std::endl;
499 if (currentArray && (result = currentArray->Remove(localentry, 0, subentry))) {
509 if (currentArray && (result = currentArray->
Remove(entry, 0, subentry)) &&
fLists) {
518 if (subentry != -1) {
519 e->TEntryList::Remove(subentry);
521 if (subentry == -1 || !e->
GetN()) {
525 }
else if (subentry == -1) {
596 if (entry < 0)
return 0;
604 return currentArray->
SetEntry(localentry);
671 for (
Int_t i = 0; i < n2; ++i) {
672 entry = (
const_cast<TEntryList*
>(elist))->GetEntry(i);
674 while (el1 && el1->fEntry < entry) {
677 while (el2 && el2->
fEntry < entry) {
681 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.
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.
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.