18#ifdef R__LESS_INCLUDES
79 const char *
GetTitle()
const override;
96 virtual void ls(
Bool_t current)
const;
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
short Short_t
Signed Short integer 2 bytes (short).
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
#define ClassDefOverride(name, id)
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Describe directory structure in memory.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Book space in a file, create I/O buffers, to fill them, (un)compress them.
const char * GetTitle() const override
Returns title (title can contain 32x32 xpm thumbnail/icon).
void Delete(Option_t *option="") override
Delete an object from the file.
virtual Long64_t GetSeekKey() const
Int_t Sizeof() const override
Return the size in bytes of the key header structure.
TKey()
TKey default constructor.
~TKey() override
TKey default destructor.
TFile * GetFile() const
Returns file to which key belong.
virtual void Keep()
Set the "KEEP" status.
const char * GetIconName() const override
Title can keep 32x32 xpm thumbnail/icon of the parent object.
Int_t Read(const char *name) override
Read contents of object with specified name from the current directory.
Int_t UnzipBuffer(char *targetBuffer, const char *compressedBuffer) const
Core of uncompressing the key payload.
TDatime fDatime
Date/Time of insertion in file.
TBuffer * fBufferRef
Pointer to the TBuffer object.
T * ReadObject()
To read an object (non deriving from TObject) from the file.
UShort_t fPidOffset
!Offset to be added to the pid index in this key/buffer. This is actually saved in the high bits of f...
virtual void IncrementPidOffset(UShort_t offset)
Increment fPidOffset by 'offset'.
Short_t GetKeep() const
Returns the "KEEP" status.
Int_t fVersion
Key version identifier.
Bool_t IsFolder() const override
Check if object referenced by the key is a folder.
Int_t fLeft
Number of bytes left in current segment.
virtual const char * GetClassName() const
Short_t fKeylen
Number of bytes for the key itself.
virtual Bool_t ReadFile()
Read the key structure from the file.
TKey(const TKey &)=delete
const TDatime & GetDatime() const
void Browse(TBrowser *b) override
Read object from disk and call its Browse() method.
virtual Int_t WriteFileKeepBuffer(TFile *f=nullptr)
Write the encoded object supported by this key.
Long64_t fSeekKey
Location of object on file.
void Build(TDirectory *motherDir, const char *classname, Long64_t filepos)
Method used in all TKey constructor to initialize basic data fields.
char * fBuffer
Object buffer.
Long64_t fSeekPdir
Location of parent directory on file.
virtual void SetParent(const TObject *parent)
Set parent in key buffer.
virtual void * ReadObjectAny(const TClass *expectedClass)
To read an object (non deriving from TObject) from the file.
void ReadKeyBuffer(char *&buffer)
Decode input buffer.
Int_t fNbytes
Number of bytes for the whole key on file (key header and data).
Int_t fObjlen
Length of uncompressed object in bytes.
void Reset()
Reset the key as it had not been 'filled' yet.
TKey & operator=(const TKey &)=delete
virtual Long64_t GetSeekPdir() const
void SetMotherDir(TDirectory *dir)
Short_t fCycle
Cycle number.
virtual TObject * ReadObjWithBuffer(char *bufferRead)
To read a TObject* from bufferRead.
virtual void ls(Bool_t current) const
List Key contents.
TDirectory * GetMotherDir() const
Short_t GetCycle() const
Return cycle number associated to this key.
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual void Create(Int_t nbytes, TFile *f=nullptr)
Create a TKey object of specified size.
virtual void DeleteBuffer()
Delete key buffer(s).
virtual Int_t WriteFile(Int_t cycle=1, TFile *f=nullptr)
Write the encoded object supported by this key.
virtual char * GetBuffer() const
virtual void ReadBuffer(char *&buffer)
Decode input buffer.
TDirectory * fMotherDir
!pointer to mother directory
TString fClassName
Object Class name.
void Print(Option_t *option="") const override
Print key contents.
void FillBuffer(char *&buffer) override
Encode key header into output buffer.
TBuffer * GetBufferRef() const
Mother of all ROOT objects.
virtual Int_t Read(const char *name)
Read contents of object with specified name from the current directory.