43 fListFileName(""), fListName(""), fNFiles(0), fListOffset(0), fFile(0), fFileNames(0)
64 fListFileName(filename), fListName(listname), fNFiles(nfiles), fListOffset(0), fFile(0), fFileNames(0)
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");
138 if (fTreeNumber!=itree)
191 Error(
"Next",
"All lists are empty\n");
214 Error(
"Next",
"Something wrong with reading the current list, even though thefile #%d and the list exist\n",
fTreeNumber);
247 if (filename_short.
Contains(
".root")){
252 filename_short.
Append(
"_elist.root");
275 while ((key=(
TKey*)nextkey())){
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");
333 while ((key=(
TKey*)nextkey())){
virtual const char * GetTitle() const
Returns title of object.
virtual Long64_t Next()
Return the next non-zero entry index (next after fLastIndexQueried) this function is faster than GetE...
Manages entry lists from different files, when they are not loaded in memory at the same time...
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual TList * GetListOfKeys() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
static const char * filename()
virtual const char * GetClassName() const
Long64_t fLastIndexQueried
the index of the tree in the chain (used when the entry
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
const char * Data() const
The TNamed class is the base class for all named ROOT classes.
TString & Append(const char *cs)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Int_t LoadList(Int_t listnumber)
Loads the list #listnumber This is the only function that can modify fCurrent and fFile data members...
ClassImp(TEntryListFromFile) TEntryListFromFile
virtual Long64_t Next()
Returns the next entry in the list.
virtual Long64_t GetEntry(Int_t index)
Returns entry #index See also Next() for a faster alternative.
virtual void Print(const Option_t *option="") const
Print info about this list.
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 ~TEntryListFromFile()
d-tor
TString & Remove(Ssiz_t pos)
Long64_t fLastIndexReturned
used to optimize GetEntry() function from a loop
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual Long64_t GetN() const
Int_t fTreeNumber
Hash value of a string of treename and filename.
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual Long64_t GetEntries()
Returns the total number of entries in the list.
virtual Long64_t GetEntryAndTree(Int_t index, Int_t &treenum)
Return the entry corresponding to the index parameter and the number of the tree, where this entry is...
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TObject * At(Int_t idx) const
virtual void Print(const Option_t *option="") const
Print this list.
A List of entry numbers in a TTree or TChain.
static constexpr Long64_t kMaxEntries