File indexing completed on 2025-01-18 10:11:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEntryListFromFile
0013 #define ROOT_TEntryListFromFile
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 #include "TEntryList.h"
0037
0038 class TFile;
0039
0040 class TEntryListFromFile: public TEntryList
0041 {
0042 protected:
0043 TString fListFileName;
0044 TString fListName;
0045 Int_t fNFiles;
0046 Long64_t *fListOffset;
0047 TFile *fFile;
0048
0049 TObjArray *fFileNames;
0050
0051
0052 static constexpr auto kBigNumber = std::numeric_limits<Long64_t>::max();
0053
0054 private:
0055 TEntryListFromFile(const TEntryListFromFile&);
0056 TEntryListFromFile &operator=(const TEntryListFromFile&);
0057
0058 public:
0059
0060 TEntryListFromFile();
0061 TEntryListFromFile(const char *filename, const char *listname, Int_t nfiles);
0062 ~TEntryListFromFile() override;
0063 void Add(const TEntryList * ) override {};
0064 Int_t Contains(Long64_t , TTree * ) override { return 0; };
0065 bool Enter(Long64_t , TTree * ) override { return false; };
0066 bool Enter(Long64_t , const char * , const char * ) override { return false; };
0067 TEntryList *GetCurrentList() const override { return fCurrent; };
0068 TEntryList *GetEntryList(const char * , const char * , Option_t * ) override { return nullptr; };
0069
0070 Long64_t GetEntry(Long64_t index) override;
0071 Long64_t GetEntryAndTree(Long64_t index, Int_t &treenum) override;
0072 virtual Long64_t GetEntries();
0073 virtual Long64_t GetEntriesFast() const { return fN; }
0074
0075 Long64_t GetN() const override { return fN; }
0076 const char *GetTreeName() const override { return fTreeName.Data(); }
0077 const char *GetFileName() const override { return fFileName.Data(); }
0078 Int_t GetTreeNumber() const override { return fTreeNumber; }
0079
0080 virtual Int_t LoadList(Int_t listnumber);
0081
0082 Int_t Merge(TCollection * ) override{ return 0; }
0083
0084 Long64_t Next() override;
0085 void OptimizeStorage() override {};
0086 bool Remove(Long64_t , TTree * ) override{ return false; }
0087
0088 void Print(const Option_t* option = "") const override;
0089
0090 void SetTree(const TTree * ) override {}
0091 void SetTree(const char * , const char * ) override {}
0092 virtual void SetFileNames(TObjArray *names) { fFileNames = names; }
0093 void SetTreeNumber(Int_t index) override { fTreeNumber=index; }
0094 virtual void SetNFiles(Int_t nfiles) { fNFiles = nfiles; }
0095 void Subtract(const TEntryList * ) override {}
0096
0097 ClassDefOverride(TEntryListFromFile, 1);
0098 };
0099 #endif