85 fLastSubListQueried = 0;
113 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)
172 SetTree(e->GetTreeName(), e->GetFileName());
232 TIter next2(other_sublists);
236 el1->TEntryList::Add(el2);
239 }
else if (el1 && (!el2 || el1->
fEntry < el2->
fEntry)) {
275 return currentArray->
Contains(localentry, 0, subentry);
284 result = t->TEntryList::Contains(subentry);
350 if ((result = currentArray->Enter(localentry, 0, subentry)))
358 if (currentArray && (result = currentArray->
Enter(entry, 0, subentry))) {
367 if (subentry != -1) {
368 t->TEntryList::Enter(subentry);
374 if (subentry != -1 && result) {
376 if (t) t->TEntryList::Enter(subentry);
443 if (!opt.
Contains(
"S") && new_line) {
452 std::cout << e->
fTreeName <<
":" << std::endl;
462 for (
Int_t i = 0; i < tmp->
fN; ++i) {
464 std::cout << entry <<
" ";
468 if (e && e->
fEntry == entry) {
473 std::cout << std::endl;
495 if (currentArray && (result = currentArray->Remove(localentry, 0, subentry))) {
505 if (currentArray && (result = currentArray->
Remove(entry, 0, subentry)) &&
fLists) {
514 if (subentry != -1) {
515 e->TEntryList::Remove(subentry);
517 if (subentry == -1 || !e->
GetN()) {
521 }
else if (subentry == -1) {
592 if (entry < 0)
return 0;
600 return currentArray->
SetEntry(localentry);
667 for (
Int_t i = 0; i < n2; ++i) {
668 entry = (
const_cast<TEntryList*
>(elist))->GetEntry(i);
670 while (el1 && el1->fEntry < entry) {
673 while (el2 && el2->
fEntry < entry) {
677 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 Int_t GetEntries() const
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 void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
A list of entries and subentries in a TTree or TChain.
virtual void Print(const Option_t *option="") const
Print this list.
virtual Bool_t Enter(Long64_t entry, TTree *tree, Long64_t subentry)
Add entry entry (, #subentry) to the list.
virtual Int_t Contains(Long64_t entry, TTree *tree, Long64_t subentry)
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
void ToUpper()
Change string to upper case.
static const char * filename()
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...
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()
to iterate over fSubLists and keep last one checked
virtual TEntryListArray * GetSubListForEntry(Long64_t entry, TTree *tree=0)
Return the list holding the subentries for the given entry or 0.
const char * Data() const
ClassImp(TEntryListArray) void TEntryListArray
Initialize data members, called by Reset.
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.
virtual TList * GetSubLists() const
TEntryListArray()
Default c-tor.
virtual void Add(const TEntryList *elist)
Add 2 entry lists.
TEntryListArray * fLastSubListQueried
virtual TObject * Remove(TObject *obj)
Remove object from the list.
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...
virtual void Subtract(const TEntryList *elist)
Remove all the entries (and subentries) of this entry list that are contained in elist.
virtual const char * GetTreeName() const
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
TIter * fSubListIter
last sublist checked by GetSubListForEntry
virtual TTree * GetTree() const
virtual Bool_t Enter(Long64_t entry, TTree *tree=0)
Add entry entry to the list.
virtual Long64_t GetN() const
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
typedef void((*Func_t)())
virtual TDirectory * GetDirectory() const
virtual void Add(TObject *obj)
virtual ~TEntryListArray()
d-tor
virtual void Reset()
Reset this list.
virtual Bool_t Remove(Long64_t entry, TTree *tree=0)
Remove entry entry from the list.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A TTree object has a header with a name and a title.
virtual void Print(const Option_t *option="") const
Print this list.
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...
virtual TList * GetLists() const
virtual void Add(const TEntryList *elist)
Add 2 entry lists.