Logo ROOT   6.08/07
Reference Guide
TFree.h
Go to the documentation of this file.
1 // @(#)root/io:$Id$
2 // Author: Rene Brun 28/12/94
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TFree
13 #define ROOT_TFree
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TFree //
19 // //
20 // Description of free segments on a file. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TObject
25 #include "TObject.h"
26 #endif
27 
28 
29 class TFree : public TObject {
30 
31 protected:
32  Long64_t fFirst; ///<First free word of segment
33  Long64_t fLast; ///<Last free word of segment
34 
35 public:
36  TFree();
37  TFree(TList *lfree, Long64_t first, Long64_t last);
38  virtual ~TFree();
39  TFree *AddFree(TList *lfree, Long64_t first, Long64_t last);
40  virtual void FillBuffer(char *&buffer);
41  TFree *GetBestFree(TList *lfree, Int_t nbytes);
42  Long64_t GetFirst() const {return fFirst;}
43  Long64_t GetLast() const {return fLast;}
44  void ls(Option_t * = "") const;
45  virtual void ReadBuffer(char *&buffer);
46  void SetFirst(Long64_t first) {fFirst=first;}
47  void SetLast(Long64_t last) {fLast=last;}
48  Int_t Sizeof() const;
49 
50  ClassDef(TFree,1); //Description of free segments on a file
51 };
52 
53 #endif
Long64_t fFirst
First free word of segment.
Definition: TFree.h:32
long long Long64_t
Definition: RtypesCore.h:69
Long64_t GetLast() const
Definition: TFree.h:43
const char Option_t
Definition: RtypesCore.h:62
int Int_t
Definition: RtypesCore.h:41
void SetLast(Long64_t last)
Definition: TFree.h:47
void ls(Option_t *="") const
List free segment contents.
Definition: TFree.cxx:159
virtual void FillBuffer(char *&buffer)
Encode fre structure into output buffer.
Definition: TFree.cxx:109
TFree * AddFree(TList *lfree, Long64_t first, Long64_t last)
Add a new free segment to the list of free segments.
Definition: TFree.cxx:67
#define ClassDef(name, id)
Definition: Rtypes.h:254
Service class for TFile.
Definition: TFree.h:29
Long64_t fLast
Last free word of segment.
Definition: TFree.h:33
A doubly linked list.
Definition: TList.h:47
Long64_t GetFirst() const
Definition: TFree.h:42
virtual void ReadBuffer(char *&buffer)
Decode one free structure from input buffer.
Definition: TFree.cxx:167
void SetFirst(Long64_t first)
Definition: TFree.h:46
Int_t Sizeof() const
return number of bytes occupied by this TFree on permanent storage
Definition: TFree.cxx:184
virtual ~TFree()
Destructor.
Definition: TFree.cxx:102
TFree()
Default constructor.
Definition: TFree.cxx:40
Mother of all ROOT objects.
Definition: TObject.h:37
TFree * GetBestFree(TList *lfree, Int_t nbytes)
Return the best free segment where to store nbytes.
Definition: TFree.cxx:127
Definition: first.py:1