/usr/include/root/TFileCollection.h is in libroot-core-dev 5.34.19+dfsg-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | // @(#)root/base:$Id$
// Author: Jan Fiete Grosse-Oetringhaus 01/06/07
/*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TFileCollection
#define ROOT_TFileCollection
//////////////////////////////////////////////////////////////////////////
// //
// TFileCollection //
// //
// Class that contains a list of TFileInfo's and accumulated meta //
// data information about its entries. This class is used to describe //
// file sets as stored by Grid file catalogs, by PROOF or any other //
// collection of TFile names. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
class THashList;
class TMap;
class TList;
class TCollection;
class TFileInfo;
class TFileInfoMeta;
class TObjString;
class TFileCollection : public TNamed {
private:
THashList *fList; //-> list of TFileInfos
TList *fMetaDataList; //-> generic list of file meta data object(s)
// (summed over entries of fList)
TString fDefaultTree; // name of default tree
Long64_t fTotalSize; // total size of files in the list
Long64_t fNFiles; // number of files ( == fList->GetEntries(), needed
// because TFileCollection might be read without fList)
Long64_t fNStagedFiles; // number of staged files
Long64_t fNCorruptFiles; // number of corrupt files
TFileCollection(const TFileCollection&); // not implemented
TFileCollection& operator=(const TFileCollection&); // not implemented
void PrintDetailed(TString &showOnly) const;
void FormatSize(Long64_t bytes, TString &um, Double_t &size) const;
public:
enum EStatusBits {
kRemoteCollection = BIT(15) // the collection is not staged
};
TFileCollection(const char *name = 0, const char *title = 0,
const char *file = 0, Int_t nfiles = -1, Int_t firstfile = 1);
virtual ~TFileCollection();
Int_t Add(TFileInfo *info);
Int_t Add(TFileCollection *coll);
Int_t AddFromFile(const char *file, Int_t nfiles = -1, Int_t firstfile = 1);
Int_t Add(const char *path);
THashList *GetList() { return fList; }
void SetList(THashList* list) { fList = list; }
TObjString *ExportInfo(const char *name = 0, Int_t popt = 0);
Long64_t Merge(TCollection* list);
Int_t RemoveDuplicates();
Int_t Update(Long64_t avgsize = -1);
void Sort(Bool_t useindex = kFALSE);
void SetAnchor(const char *anchor);
void Print(Option_t *option = "") const;
void SetBitAll(UInt_t f);
void ResetBitAll(UInt_t f);
Long64_t GetTotalSize() const { return fTotalSize; }
Long64_t GetNFiles() const { return fNFiles; }
Long64_t GetNStagedFiles() const { return fNStagedFiles; }
Long64_t GetNCorruptFiles() const { return fNCorruptFiles; }
Float_t GetStagedPercentage() const
{ return (fNFiles > 0) ? 100. * fNStagedFiles / fNFiles : 0; }
Float_t GetCorruptedPercentage() const
{ return (fNFiles > 0) ? 100. * fNCorruptFiles / fNFiles : 0; }
const char *GetDefaultTreeName() const;
void SetDefaultTreeName(const char* treeName) { fDefaultTree = treeName; }
Long64_t GetTotalEntries(const char *tree) const;
TFileInfoMeta *GetMetaData(const char *meta = 0) const;
void SetDefaultMetaData(const char *meta);
Bool_t AddMetaData(TObject *meta);
void RemoveMetaData(const char *meta = 0);
TFileCollection *GetStagedSubset();
TFileCollection *GetFilesOnServer(const char *server);
TMap *GetFilesPerServer(const char *exclude = 0, Bool_t curronly = kFALSE);
ClassDef(TFileCollection, 3) // Collection of TFileInfo objects
};
#endif
|