00001 // @(#)root/io:$Id: TFree.h 23122 2008-04-10 14:56:30Z rdm $ 00002 // Author: Rene Brun 28/12/94 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TFree 00013 #define ROOT_TFree 00014 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TFree // 00019 // // 00020 // Description of free segments on a file. // 00021 // // 00022 ////////////////////////////////////////////////////////////////////////// 00023 00024 #ifndef ROOT_TObject 00025 #include "TObject.h" 00026 #endif 00027 00028 00029 class TFree : public TObject { 00030 00031 protected: 00032 Long64_t fFirst; //First free word of segment 00033 Long64_t fLast; //Last free word of segment 00034 00035 public: 00036 TFree(); 00037 TFree(TList *lfree, Long64_t first, Long64_t last); 00038 virtual ~TFree(); 00039 TFree *AddFree(TList *lfree, Long64_t first, Long64_t last); 00040 virtual void FillBuffer(char *&buffer); 00041 TFree *GetBestFree(TList *lfree, Int_t nbytes); 00042 Long64_t GetFirst() const {return fFirst;} 00043 Long64_t GetLast() const {return fLast;} 00044 void ls(Option_t *) const; 00045 virtual void ReadBuffer(char *&buffer); 00046 void SetFirst(Long64_t first) {fFirst=first;} 00047 void SetLast(Long64_t last) {fLast=last;} 00048 Int_t Sizeof() const; 00049 00050 ClassDef(TFree,1); //Description of free segments on a file 00051 }; 00052 00053 #endif