Logo ROOT   6.12/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 #include "TObject.h"
25 
26 
27 class TFree : public TObject {
28 
29 protected:
30  Long64_t fFirst; ///<First free word of segment
31  Long64_t fLast; ///<Last free word of segment
32 
33 public:
34  TFree();
35  TFree(TList *lfree, Long64_t first, Long64_t last);
36  virtual ~TFree();
37  TFree *AddFree(TList *lfree, Long64_t first, Long64_t last);
38  virtual void FillBuffer(char *&buffer);
39  TFree *GetBestFree(TList *lfree, Int_t nbytes);
40  Long64_t GetFirst() const {return fFirst;}
41  Long64_t GetLast() const {return fLast;}
42  void ls(Option_t * = "") const;
43  virtual void ReadBuffer(char *&buffer);
44  void SetFirst(Long64_t first) {fFirst=first;}
45  void SetLast(Long64_t last) {fLast=last;}
46  Int_t Sizeof() const;
47 
48  ClassDef(TFree,1); //Description of free segments on a file
49 };
50 
51 #endif
Long64_t fFirst
First free word of segment.
Definition: TFree.h:30
long long Long64_t
Definition: RtypesCore.h:69
Long64_t GetLast() const
Definition: TFree.h:41
const char Option_t
Definition: RtypesCore.h:62
int Int_t
Definition: RtypesCore.h:41
void SetLast(Long64_t last)
Definition: TFree.h:45
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:320
Service class for TFile.
Definition: TFree.h:27
Long64_t fLast
Last free word of segment.
Definition: TFree.h:31
A doubly linked list.
Definition: TList.h:44
Long64_t GetFirst() const
Definition: TFree.h:40
virtual void ReadBuffer(char *&buffer)
Decode one free structure from input buffer.
Definition: TFree.cxx:167
void SetFirst(Long64_t first)
Definition: TFree.h:44
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