91 if (index<0)
return -1;
94 Error(
"GetEntry",
"Index value is too large\n");
107 Error(
"GetEntry",
"All lists are empty\n");
135 Error(
"GetEntry",
"Entry number is too big\n");
191 Error(
"Next",
"All lists are empty\n");
214 Error(
"Next",
"Something wrong with reading the current list, even though the file #%d and the list exist\n",
fTreeNumber);
247 if (filename_short.
Contains(
".root")){
252 filename_short.
Append(
"_elist.root");
275 while ((key=(
TKey*)nextkey())){
286 Error(
"LoadList",
"List %s not found in the file\n",
fListName.Data());
306 printf(
"total number of files: %d\n",
fNFiles);
310 Error(
"Print",
"fFileNames was not set properly.");
312 for (
Int_t listnumber=0; listnumber<
fNFiles; listnumber++){
315 if (filename_short.
Contains(
".root")){
320 filename_short.
Append(
"_elist.root");
329 if (
f && !
f->IsZombie()){
332 TIter nextkey(
f->GetListOfKeys());
333 while ((key=(
TKey*)nextkey())){
int Int_t
Signed integer 4 bytes (int).
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
TString fListName
name of the list
virtual Int_t LoadList(Int_t listnumber)
Loads the list #listnumber This is the only function that can modify fCurrent and fFile data members.
~TEntryListFromFile() override
d-tor
TFile * fFile
currently open file fCurrent points to the currently open list
void Print(const Option_t *option="") const override
Print info about this list.
Int_t fNFiles
total number of files
Long64_t Next() override
Returns the next entry in the list.
Long64_t GetEntryAndTree(Long64_t index, Int_t &treenum) override
Return the entry corresponding to the index parameter and the number of the tree, where this entry is...
virtual Long64_t GetEntries()
Returns the total number of entries in the list.
TString fListFileName
from this string names of all files can be found
Long64_t GetEntry(Long64_t index) override
Returns entry #index See also Next() for a faster alternative.
TObjArray * fFileNames
! points to the fFiles data member of the corresponding chain
Long64_t * fListOffset
[fNFiles] numbers of entries in ind. lists
Long64_t fLastIndexQueried
! used to optimize GetEntry() function from a loop
Long64_t fN
number of entries in the list
Long64_t fLastIndexReturned
! used to optimize GetEntry() function from a loop
TEntryList * fCurrent
! currently filled entry list
void Print(const Option_t *option="") const override
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
virtual TObject * ReadObj()
To read a TObject* from the file.
const char * GetTitle() const override
Returns title of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static constexpr Long64_t kMaxEntries
Used as the max value for any TTree range operation.