class TFileCollection: public TNamed


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.


Function Members (Methods)

public:
TFileCollection(const char* name = 0, const char* title = 0, const char* file = 0, Int_t nfiles = -1, Int_t firstfile = 1)
virtual~TFileCollection()
voidTObject::AbstractMethod(const char* method) const
Int_tAdd(TFileInfo* info)
Int_tAdd(const char* path)
Int_tAddFromFile(const char* file, Int_t nfiles = -1, Int_t firstfile = 1)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
TObjString*ExportInfo(const char* name = 0)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Float_tGetCorruptedPercentage() const
const char*GetDefaultTreeName() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
THashList*GetList()
TFileInfoMeta*GetMetaData(const char* meta = 0) const
virtual const char*TNamed::GetName() const
Long64_tGetNCorruptFiles() const
Long64_tGetNFiles() const
Long64_tGetNStagedFiles() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Float_tGetStagedPercentage() const
TFileCollection*GetStagedSubset()
virtual const char*TNamed::GetTitle() const
Long64_tGetTotalEntries(const char* tree) const
Long64_tGetTotalSize() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidRemoveMetaData(const char* meta = 0)
voidTObject::ResetBit(UInt_t f)
voidResetBitAll(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetAnchor(const char* anchor)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetBitAll(UInt_t f)
voidSetDefaultMetaData(const char* meta)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetList(THashList* list)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
voidSort()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
Int_tUpdate(Long64_t avgsize = -1)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
TFileCollection(const TFileCollection&)
TFileCollection&operator=(const TFileCollection&)

Data Members

public:
enum EStatusBits { kRemoteCollection
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
THashList*fList-> list of TFileInfos
TList*fMetaDataList-> generic list of file meta data object(s)
Long64_tfNCorruptFilesnumber of corrupt files
Long64_tfNFilesnumber of files ( == fList->GetEntries(), needed
Long64_tfNStagedFilesnumber of staged files
Long64_tfTotalSizetotal size of files in the list

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TFileCollection(const char* name = 0, const char* title = 0, const char* file = 0, Int_t nfiles = -1, Int_t firstfile = 1)
 TFileCollection constructor. Specify a name and title describing
 the list. If textfile is specified the file is opened and a
 TFileCollection is created containing the files in the textfile.
~TFileCollection()
 Cleanup.
Int_t Add(TFileInfo *info)
 Add TFileInfo to the collection.
Int_t AddFromFile(const char* file, Int_t nfiles = -1, Int_t firstfile = 1)
 Add file names contained in the specified text file.
 The file should contain one url per line; empty lines or lines starting with '#'
 (commented lines) are ignored.
 If nfiles > 0 only nfiles files are added, starting from file 'firstfile' (>= 1).
 The method returns the number of added files.
Int_t Add(const char *dir)
 Add all files matching the specified pattern to the collection.
 'dir' can include wildcards after the last slash, which causes all
 matching files in that directory to be added.
 If dir is the full path of a file, only one element is added.
 Return value is the number of added files.
TFileCollection * GetStagedSubset()
 Creates a subset of the files that have the kStaged & !kCorrupted bit set.
Int_t Update(Long64_t avgsize = -1)
 Update accumulated information about the elements of the collection
 (e.g. fTotalSize). If 'avgsize' > 0, use an average file size of 'avgsize'
 bytes when the size info is not available.
 Also updates the meta data information by summarizing
 the meta data of the contained objects.
 Return -1 in case of any failure, 0 if the total size is exact, 1 if
 incomplete, 2 if complete but (at least partially) estimated.
void Print(Option_t* option = "") const
 Prints the contents of the TFileCollection.
 If option contains "M": prints meta data entries,
 if option contains "F": prints all the files in the collection.
void SetAnchor(const char* anchor)
 Calls TUrl::SetAnchor() for all URLs contained in all TFileInfos.
void SetBitAll(UInt_t f)
 Set the bit for all TFileInfos
void ResetBitAll(UInt_t f)
 Reset the bit for all TFileInfos
const char * GetDefaultTreeName()
 Returns the name of the first tree in the meta data list.
 Returns 0 in case no trees are found in the meta data list.
Long64_t GetTotalEntries(const char* tree) const
 Returns the number of entries for the specified tree (retrieved from meta data).
 If tree is not specified, use the default tree name.
 Returns -1 in case the specified tree is not found.
TFileInfoMeta * GetMetaData(const char* meta = 0) const
 Returns the meta data object with the soecified meta name.
 Returns 0 in case specified meta data is not found.
void SetDefaultMetaData(const char* meta)
 Moves the indicated meta data in the first position, so that
 it becomes efectively the default.
void RemoveMetaData(const char* meta = 0)
 Removes the indicated meta data object in all TFileInfos and this object
 If no name is given all metadata is removed
void Sort()
 Sort the collection.
TObjString * ExportInfo(const char* name = 0)
 Export the relevant info as a string; use 'name' as collection name,
 if defined, else use GetName().
 The output object must be destroyed by the caller
TFileCollection(const TFileCollection& )
TFileCollection& operator=(const TFileCollection& )
THashList * GetList()
{ return fList; }
void SetList(THashList* list)
{ fList = list; }
Long64_t GetTotalSize()
{ return fTotalSize; }
Long64_t GetNFiles()
{ return fNFiles; }
Long64_t GetNStagedFiles()
{ return fNStagedFiles; }
Long64_t GetNCorruptFiles()
{ return fNCorruptFiles; }
Float_t GetStagedPercentage()
{ return (fNFiles > 0) ? 100. * fNStagedFiles / fNFiles : 0; }
Float_t GetCorruptedPercentage()
{ return (fNFiles > 0) ? 100. * fNCorruptFiles / fNFiles : 0; }

Author: Jan Fiete Grosse-Oetringhaus 01/06/07
Last change: root/base:$Id: TFileCollection.h 24470 2008-06-23 01:37:37Z rdm $
Last generated: 2008-06-25 08:39
Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.