12 #ifndef ROOT_TFileCollection
13 #define ROOT_TFileCollection
39 class TFileCollection :
public TNamed {
49 Long64_t fNStagedFiles;
50 Long64_t fNCorruptFiles;
52 TFileCollection(
const TFileCollection&);
53 TFileCollection& operator=(
const TFileCollection&);
55 void PrintDetailed(TString &showOnly)
const;
56 void FormatSize(Long64_t bytes, TString &um, Double_t &size)
const;
60 kRemoteCollection = BIT(15)
62 TFileCollection(
const char *name = 0,
const char *title = 0,
63 const char *file = 0, Int_t nfiles = -1, Int_t firstfile = 1);
64 virtual ~TFileCollection();
66 Int_t Add(TFileInfo *info);
67 Int_t Add(TFileCollection *coll);
68 Int_t AddFromFile(
const char *file, Int_t nfiles = -1, Int_t firstfile = 1);
69 Int_t Add(
const char *path);
70 THashList *GetList() {
return fList; }
71 void SetList(THashList* list) { fList = list; }
73 TObjString *ExportInfo(
const char *name = 0, Int_t popt = 0);
75 Long64_t Merge(TCollection* list);
76 Int_t RemoveDuplicates();
77 Int_t Update(Long64_t avgsize = -1);
78 void Sort(Bool_t useindex = kFALSE);
79 void SetAnchor(
const char *anchor);
80 void Print(Option_t *option =
"")
const;
82 void SetBitAll(UInt_t f);
83 void ResetBitAll(UInt_t f);
85 Long64_t GetTotalSize()
const {
return fTotalSize; }
86 Long64_t GetNFiles()
const {
return fNFiles; }
87 Long64_t GetNStagedFiles()
const {
return fNStagedFiles; }
88 Long64_t GetNCorruptFiles()
const {
return fNCorruptFiles; }
89 Float_t GetStagedPercentage()
const
90 {
return (fNFiles > 0) ? 100. * fNStagedFiles / fNFiles : 0; }
91 Float_t GetCorruptedPercentage()
const
92 {
return (fNFiles > 0) ? 100. * fNCorruptFiles / fNFiles : 0; }
94 const char *GetDefaultTreeName()
const;
95 void SetDefaultTreeName(
const char* treeName) { fDefaultTree = treeName; }
96 Long64_t GetTotalEntries(
const char *tree)
const;
98 TFileInfoMeta *GetMetaData(
const char *meta = 0)
const;
99 void SetDefaultMetaData(
const char *meta);
100 Bool_t AddMetaData(TObject *meta);
101 void RemoveMetaData(
const char *meta = 0);
103 TFileCollection *GetStagedSubset();
105 TFileCollection *GetFilesOnServer(
const char *server);
106 TMap *GetFilesPerServer(
const char *exclude = 0, Bool_t curronly = kFALSE);
108 ClassDef(TFileCollection, 3)