#ifndef ROOT_TFileInfo
#define ROOT_TFileInfo
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_Turl
#include "TUrl.h"
#endif
#ifndef ROOT_TUUID
#include "TUUID.h"
#endif
#ifndef ROOT_TMD5
#include "TMD5.h"
#endif
#ifndef ROOT_TObjString
#include "TObjString.h"
#endif
#ifndef ROOT_TList
#include "TList.h"
#endif
class TFileInfoMeta;
class TFileInfo : public TNamed {
private:
TUrl *fCurrentUrl;
TList *fUrlList;
Long64_t fSize;
TUUID *fUUID;
TMD5 *fMD5;
TList *fMetaDataList;
TFileInfo(const TFileInfo&);
TFileInfo& operator=(const TFileInfo&);
public:
enum EStatusBits {
kStaged = BIT(15),
kCorrupted = BIT(16)
};
TFileInfo(const char *url = 0, Long64_t size = -1, const char *uuid = 0,
const char *md5 = 0, TObject *meta = 0);
virtual ~TFileInfo();
void ResetUrl() { fCurrentUrl = (TUrl*)fUrlList->First(); }
TUrl *NextUrl();
TUrl *GetCurrentUrl() const;
TUrl *GetFirstUrl() const { return (TUrl*)fUrlList->First(); }
Int_t GetNUrls() const { return fUrlList->GetEntries(); }
Long64_t GetSize() const { return fSize; }
TUUID *GetUUID() const { return fUUID; }
TMD5 *GetMD5() const { return fMD5; }
TList *GetMetaDataList() const { return fMetaDataList; }
TFileInfoMeta *GetMetaData(const char *meta = 0) const;
void SetSize(Long64_t size) { fSize = size; }
TUrl *FindByUrl(const char *url);
Bool_t AddUrl(const char *url, Bool_t infront = kFALSE);
Bool_t RemoveUrl(const char *url);
Bool_t AddMetaData(TObject *meta);
Bool_t RemoveMetaData(const char *meta = 0);
Bool_t IsSortable() const { return kTRUE; }
Int_t Compare(const TObject *obj) const;
void Print(Option_t *options="") const;
ClassDef(TFileInfo,3)
};
class TFileInfoMeta : public TNamed {
private:
Long64_t fEntries;
Long64_t fFirst;
Long64_t fLast;
Bool_t fIsTree;
Long64_t fTotBytes;
Long64_t fZipBytes;
TFileInfoMeta(const TFileInfoMeta&);
TFileInfoMeta& operator=(const TFileInfoMeta&);
public:
TFileInfoMeta() : fEntries(-1), fFirst(0), fLast(-1),
fIsTree(kFALSE), fTotBytes(-1), fZipBytes(-1){ }
TFileInfoMeta(const char *objPath, const char *objClass = "TTree",
Long64_t entries = -1, Long64_t first = 0, Long64_t last = -1,
Long64_t totbytes = -1, Long64_t zipbytes = -1);
TFileInfoMeta(const char *objPath, const char *objDir,
const char *objClass, Long64_t entries = -1,
Long64_t first = 0, Long64_t last = -1,
Long64_t totbytes = -1, Long64_t zipbytes = -1);
virtual ~TFileInfoMeta() { }
const char *GetObject() const;
const char *GetClass() const { return GetTitle(); }
const char *GetDirectory() const;
Long64_t GetEntries() const { return fEntries; }
Long64_t GetFirst() const { return fFirst; }
Long64_t GetLast() const { return fLast; }
Bool_t IsTree() const { return fIsTree; }
Long64_t GetTotBytes() const { return fTotBytes; }
Long64_t GetZipBytes() const { return fZipBytes; }
void SetEntries(Long64_t entries) { fEntries = entries; }
void SetFirst(Long64_t first) { fFirst = first; }
void SetLast(Long64_t last) { fLast = last; }
void SetTotBytes(Long64_t tot) { fTotBytes = tot; }
void SetZipBytes(Long64_t zip) { fZipBytes = zip; }
void Print(Option_t *options="") const;
ClassDef(TFileInfoMeta,2)
};
#endif
Last change: Wed Jun 25 08:39:02 2008
Last generated: 2008-06-25 08:39
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.