114TEntryListArray::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)
173 SetTree(
e->GetTreeName(),
e->GetFileName());
202 e->AddEntriesAndSubLists(elist);
233 TIter next2(other_sublists);
237 el1->TEntryList::Add(el2);
240 }
else if (el1 && (!el2 || el1->
fEntry < el2->
fEntry)) {
278 return currentArray->
Contains(localentry, 0, subentry);
287 result = t->TEntryList::Contains(subentry);
353 if ((
result = currentArray->
Enter(localentry, 0, subentry)))
361 if (currentArray && (
result = currentArray->
Enter(entry, 0, subentry))) {
370 if (subentry != -1) {
371 t->TEntryList::Enter(subentry);
377 if (subentry != -1 &&
result) {
379 if (t) t->TEntryList::Enter(subentry);
391 if ((
result = currentArray->
Enter(localentry, 0, subentry)))
459 if (!opt.
Contains(
"S") && new_line) {
468 std::cout <<
e->
fTreeName <<
":" << std::endl;
478 for (
Int_t i = 0; i < tmp->
fN; ++i) {
480 std::cout << entry <<
" ";
484 if (
e &&
e->fEntry == entry) {
489 std::cout << std::endl;
511 if (currentArray && (
result = currentArray->
Remove(localentry, 0, subentry))) {
530 if (subentry != -1) {
531 e->TEntryList::Remove(subentry);
533 if (subentry == -1 || !
e->GetN()) {
537 }
else if (subentry == -1) {
607 if (entry < 0)
return 0;
615 return currentArray->
SetEntry(localentry);
682 for (
Int_t i = 0; i < n2; ++i) {
683 entry = (
const_cast<TEntryList*
>(elist))->GetEntry(i);
685 while (el1 && el1->
fEntry < entry) {
688 while (el2 && el2->
fEntry < entry) {
692 if (el1 && el2 && entry == el1->
fEntry && entry == el2->
fEntry) {
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Collection abstract base class.
virtual Int_t GetEntries() const
A list of entries and subentries in a TTree or TChain.
virtual TEntryListArray * GetSubListForEntry(Long64_t entry, TTree *tree=nullptr)
Return the list holding the subentries for the given entry or 0.
virtual ~TEntryListArray()
d-tor
virtual Bool_t RemoveSubListForEntry(Long64_t entry, TTree *tree=nullptr)
Remove the sublists for the given entry --> not being used...
virtual void Reset()
Reset all entries and remove all sublists.
void Init()
Initialize data members, called by Reset.
virtual TEntryListArray * SetEntry(Long64_t entry, TTree *tree=nullptr)
Create a sublist for the given entry and returns it --> should be called after calling GetSubListForE...
TEntryListArray * fLastSubListQueried
! last sublist checked by GetSubListForEntry
virtual Bool_t Remove(Long64_t entry, TTree *tree, Long64_t subentry)
Remove entry #entry (, #subentry) from the list.
TList * fSubLists
a list of underlying entry lists for each event of a TEntryList
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,...
TEntryListArray()
Default c-tor.
virtual void Add(const TEntryList *elist)
Add 2 entry lists.
virtual void ConvertToTEntryListArray(TEntryList *e)
Create a TEntryListArray based on the given TEntryList Called by SetTree when the given list is added...
virtual void Print(const Option_t *option="") const
Print this list.
Long64_t fEntry
the entry number, when the list is used for subentries
virtual Bool_t RemoveSubList(TEntryListArray *e, TTree *tree=nullptr)
Remove the given sublist and return true if succeeded.
virtual TList * GetSubLists() const
virtual Int_t Contains(Long64_t entry, TTree *tree, Long64_t subentry)
virtual Bool_t Enter(Long64_t entry, TTree *tree, Long64_t subentry)
Add entry #entry (, #subentry) to the list.
virtual void AddEntriesAndSubLists(const TEntryList *elist)
The method that really adds two entry lists with sublists If lists are split (fLists !...
TIter * fSubListIter
! to iterate over fSubLists and keep last one checked
virtual void Subtract(const TEntryList *elist)
Remove all the entries (and subentries) of this entry list that are contained in elist.
A List of entry numbers in a TTree or TChain.
TString fFileName
name of the file, where the tree is
virtual TList * GetLists() const
virtual Int_t Contains(Long64_t entry, TTree *tree=nullptr)
virtual Bool_t Remove(Long64_t entry, TTree *tree=nullptr)
Remove entry #entry from the list.
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 Bool_t Enter(Long64_t entry, TTree *tree=nullptr)
Add entry #entry to the list.
Long64_t fN
number of entries in the list
virtual void Reset()
Reset this list.
virtual Long64_t GetEntry(Long64_t index)
Return the number of the entry #index of this TEntryList in the TTree or TChain See also Next().
virtual const char * GetTreeName() const
TEntryList * fCurrent
! currently filled entry list
virtual void Print(const Option_t *option="") const
Print this list.
void GetFileName(const char *filename, TString &fn, Bool_t *=nullptr)
To be able to re-localize the entry-list we identify the file by just the name and the anchor,...
TList * fLists
a list of underlying entry lists for each tree of a chain
TString fTreeName
name of the tree
virtual void Subtract(const TEntryList *elist)
Remove all the entries of this entry list, that are contained in elist.
virtual void Add(const TEntryList *elist)
Add 2 entry lists.
virtual Long64_t GetN() const
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
void AddLast(TObject *obj) override
Add object at the end of the list.
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
const char * Data() const
void ToUpper()
Change string to upper case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A TTree represents a columnar dataset.