74 virtual const char *
GetTitle()
const;
100 return reinterpret_cast<T*
>(
ReadObjectAny(TClass::GetClass<T>()));
#define ClassDef(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.
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 ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Print(Option_t *option="") const
Print key contents.
virtual Long64_t GetSeekKey() const
virtual void FillBuffer(char *&buffer)
Encode key header into output buffer.
TKey()
TKey default constructor.
virtual void Delete(Option_t *option="")
Delete an object from the file.
TFile * GetFile() const
Returns file to which key belong.
virtual void Keep()
Set the "KEEP" status.
virtual Int_t WriteFileKeepBuffer(TFile *f=0)
Write the encoded object supported by this key.
virtual const char * GetIconName() const
Title can keep 32x32 xpm thumbnail/icon of the parent object.
virtual Int_t Read(const char *name)
Read contents of object with specified name from the current directory.
virtual void ls(Option_t *option="") const
List Key contents.
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.
virtual ~TKey()
TKey default destructor.
Int_t fLeft
Number of bytes left in current segment.
virtual const char * GetClassName() const
virtual void Create(Int_t nbytes, TFile *f=0)
Create a TKey object of specified size.
virtual const char * GetTitle() const
Returns title (title can contain 32x32 xpm thumbnail/icon).
Short_t fKeylen
Number of bytes for the key itself.
virtual Bool_t ReadFile()
Read the key structure from the file.
virtual Int_t WriteFile(Int_t cycle=1, TFile *f=0)
Write the encoded object supported by this key.
TKey(const TKey &)=delete
const TDatime & GetDatime() const
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.
Bool_t IsFolder() const
Check if object referenced by the key is a folder.
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 object on file.
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.
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 DeleteBuffer()
Delete key buffer(s).
virtual char * GetBuffer() const
virtual Int_t Sizeof() const
Return the size in bytes of the key header structure.
virtual void ReadBuffer(char *&buffer)
Decode input buffer.
TDirectory * fMotherDir
!pointer to mother directory
virtual void Browse(TBrowser *b)
Read object from disk and call its Browse() method.
TString fClassName
Object Class name.
TBuffer * GetBufferRef() const
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
virtual Int_t Read(const char *name)
Read contents of object with specified name from the current directory.
const char * Data() const