Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
27class TFree : public TObject {
28
29protected:
30 Long64_t fFirst; ///<First free word of segment
31 Long64_t fLast; ///<Last free word of segment
32
33public:
34 TFree();
35 TFree(TList *lfree, Long64_t first, Long64_t last);
36 ~TFree() override;
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 override;
43 virtual void ReadBuffer(char *&buffer);
45 void SetLast(Long64_t last) {fLast=last;}
46 Int_t Sizeof() const;
47
48 ClassDefOverride(TFree,1); //Description of free segments on a file
49};
50
51#endif
int Int_t
Definition RtypesCore.h:45
long long Long64_t
Definition RtypesCore.h:80
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Service class for TFile.
Definition TFree.h:27
Long64_t GetLast() const
Definition TFree.h:41
void SetFirst(Long64_t first)
Definition TFree.h:44
TFree()
Default constructor.
Definition TFree.cxx:40
Int_t Sizeof() const
return number of bytes occupied by this TFree on permanent storage
Definition TFree.cxx:184
virtual void ReadBuffer(char *&buffer)
Decode one free structure from input buffer.
Definition TFree.cxx:167
void SetLast(Long64_t last)
Definition TFree.h:45
void ls(Option_t *="") const override
List free segment contents.
Definition TFree.cxx:159
Long64_t GetFirst() const
Definition TFree.h:40
~TFree() override
Destructor.
Definition TFree.cxx:102
Long64_t fLast
Last free word of segment.
Definition TFree.h:31
virtual void FillBuffer(char *&buffer)
Encode fre structure into output buffer.
Definition TFree.cxx:109
Long64_t fFirst
First free word of segment.
Definition TFree.h:30
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
TFree * GetBestFree(TList *lfree, Int_t nbytes)
Return the best free segment where to store nbytes.
Definition TFree.cxx:127
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
Definition first.py:1