12 #ifndef ROOT_TBufferFile
13 #define ROOT_TBufferFile
47 namespace TStreamerInfoActions {
48 class TActionSequence;
virtual TClass * ReadClass(const TClass *cl=0, UInt_t *objTag=0)
Read class definition from I/O buffer.
Describe Streamer information for one class version.
virtual void IncrementLevel(TVirtualStreamerInfo *info)
Increment level.
virtual UInt_t GetTRefExecId()
Return the exec id stored in the current TStreamerInfo element.
void SetReadParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
void SetBufferOffset(Int_t offset=0)
virtual Int_t WriteClones(TClonesArray *a, Int_t nobjects)
Interface to TStreamerInfo::WriteBufferClones.
virtual ~TBufferFile()
Delete an I/O buffer object.
void frombuf(char *&buf, Bool_t *x)
void CheckCount(UInt_t offset)
Check if offset is not too large (< kMaxMapCount) when writing.
virtual void WriteString(const char *s)
Write string to I/O buffer.
virtual Int_t ReadArray(Bool_t *&b)
Read array of bools from the I/O buffer.
virtual void WriteFastArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0)
Write array of n floats (as truncated float) into the I/O buffer.
virtual Version_t ReadVersionForMemberWise(const TClass *cl=0)
Read class version from I/O buffer.
void SetWriteParam(Int_t mapsize)
Set the initial size of the hashtable used to store object and class references during writing...
virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass)
Write object to I/O buffer.
virtual Int_t ReadClones(TClonesArray *a, Int_t nobjects, Version_t objvers)
Interface to TStreamerInfo::ReadBufferClones.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
virtual void WriteClass(const TClass *cl)
Write class description to I/O buffer.
UShort_t GetPidOffset() const
void SetBufferDisplacement()
virtual void WriteFloat16(Float_t *f, TStreamerElement *ele=0)
Write a Float16_t to the buffer.
Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
static Int_t GetGlobalWriteParam()
Get default write map size.
virtual void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0)
Write array of n doubles (as float) into the I/O buffer.
virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits)
Read array of n floats (written as truncated float) from the I/O buffer.
virtual Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele=0)
Read array of doubles (written as float) from the I/O buffer.
virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue)
Read array of n floats (written as truncated float) from the I/O buffer.
virtual void ReadTString(TString &s)
Read TString from TBuffer.
virtual UInt_t WriteVersionMemberWise(const TClass *cl, Bool_t useBcnt=kFALSE)
Write class version to I/O buffer after setting the kStreamedMemberWise bit in the version number...
virtual void ReadDouble32(Double_t *d, TStreamerElement *ele=0)
Read a Double32_t from the buffer, see comments about Double32_t encoding at TBufferFile::WriteDouble...
static void SetGlobalReadParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
static Int_t fgMapSize
Default map size for all TBuffer objects.
Buffer base class used for serializing objects.
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)
Write class version to I/O buffer.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)
Set byte count at position cntpos in the buffer.
virtual Int_t ReadStaticArrayDouble32(Double_t *d, TStreamerElement *ele=0)
Read array of doubles (written as float) from the I/O buffer.
std::vector< TStreamerInfo * > InfoList_t
virtual void ReadChar(Char_t &c)
virtual void * ReadObjectAny(const TClass *cast)
Read object from I/O buffer.
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)
virtual void ReadUInt(UInt_t &i)
UInt_t CheckObject(UInt_t offset, const TClass *cl, Bool_t readClass=kFALSE)
Check for object in the read map.
void MapObject(const TObject *obj, UInt_t offset=1)
Add object to the fMap container.
virtual void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0)
Write array of n floats (as truncated float) into the I/O buffer.
virtual void ReadLong(Long_t &l)
Read Long from TBuffer.
virtual void WriteBool(Bool_t b)
void SetPidOffset(UShort_t offset)
This offset is used when a key (or basket) is transfered from one file to the other.
virtual void WriteULong(ULong_t l)
static void SetGlobalWriteParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
virtual void WriteULong64(ULong64_t l)
virtual void WriteFastArrayString(const Char_t *c, Int_t n)
Write array of n characters into the I/O buffer.
virtual void ReadFloat(Float_t &f)
virtual void WriteUChar(UChar_t c)
virtual TObject * ReadObject(const TClass *cl)
Read object from I/O buffer.
Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss, const char *classname)
Check byte count with current buffer position.
Int_t fDisplacement
Value to be added to the map offsets.
Int_t GetMapCount() const
virtual void WriteUShort(UShort_t s)
virtual void ReadLong64(Long64_t &l)
virtual void SkipObjectAny()
Skip any kind of object from buffer.
TExMap * fMap
Map containing object,offset pairs for reading/writing.
virtual Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele=0)
Read array of floats (written as truncated float) from the I/O buffer.
virtual void ReadInt(Int_t &i)
#define ClassDef(name, id)
virtual char * ReadString(char *s, Int_t max)
Read string from I/O buffer.
virtual void StreamObject(void *obj, const type_info &typeinfo, const TClass *onFileClass=0)
Stream an object given its C++ typeinfo information.
virtual void TagStreamerInfo(TVirtualStreamerInfo *info)
Mark the classindex of the current file as using this TStreamerInfo.
virtual Int_t ReadBuf(void *buf, Int_t max)
Read max bytes from the I/O buffer into buf.
virtual void SetStreamerElementNumber(TStreamerElement *, Int_t)
virtual void ReadUChar(UChar_t &c)
void tobuf(char *&buf, Bool_t x)
A TProcessID identifies a ROOT job in a unique way in time and space.
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
virtual void WriteShort(Short_t s)
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)
Function called by the Streamer functions to serialize object at p to buffer b.
virtual Version_t ReadVersionNoCheckSum(UInt_t *start=0, UInt_t *bcnt=0)
Read class version from I/O buffer, when the caller knows for sure that there is no checksum written/...
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class)
Deserialize information from a buffer into an object.
virtual void ReadULong64(ULong64_t &l)
virtual Int_t ReadStaticArrayFloat16(Float_t *f, TStreamerElement *ele=0)
Read array of floats (written as truncated float) from the I/O buffer.
Int_t fMapCount
Number of objects or classes in map.
virtual void WriteTString(const TString &s)
Write TString to TBuffer.
void ResetMap()
Delete existing fMap and reset map counter.
void operator=(const TBufferFile &)
not implemented
TStreamerInfo * fInfo
Pointer to TStreamerInfo object writing/reading the buffer.
Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
virtual void WriteUInt(UInt_t i)
virtual Int_t ReadStaticArray(Bool_t *b)
Read array of bools from the I/O buffer.
virtual TProcessID * GetLastProcessID(TRefTable *reftable) const
Return the last TProcessID in the file.
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
virtual void ReadStdString(std::string &s)
Read std::string from TBuffer.
virtual void ForceWriteInfoClones(TClonesArray *a)
Make sure TStreamerInfo is not optimized, otherwise it will not be possible to support schema evoluti...
void InitMap()
Create the fMap container and initialize them with the null object.
virtual Int_t ReadClassEmulated(const TClass *cl, void *object, const TClass *onfile_class)
Read emulated class.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)
Read class version from I/O buffer.
The ROOT global object gROOT contains a list of all defined classes.
virtual void WriteInt(Int_t i)
virtual void SkipVersion(const TClass *cl=0)
Skip class version from I/O buffer.
virtual void ReadCharP(Char_t *c)
virtual void WriteBuf(const void *buf, Int_t max)
Write max bytes from buf into the I/O buffer.
virtual void ClassEnd(const TClass *)
virtual void WriteFloat(Float_t f)
virtual void ReadWithNbits(Float_t *ptr, Int_t nbits)
Read a Float16_t from the buffer when the number of bits is specified (explicitly or not) see comment...
UShort_t fPidOffset
Offset to be added to the pid index in this key/buffer.
virtual void WriteArray(const Bool_t *b, Int_t n)
Write array of n bools into the I/O buffer.
TExMap * fClassMap
Map containing object,class pairs for reading.
virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0)
Read array of n doubles (written as float) from the I/O buffer.
Int_t fMapSize
Default size of map.
virtual void WriteLong(Long_t l)
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0)
Read array of n floats (written as truncated float) from the I/O buffer.
virtual void WriteDouble32(Double_t *d, TStreamerElement *ele=0)
Write a Double32_t to the buffer.
unsigned long long ULong64_t
A TRefTable maintains the association between a referenced object and the parent object supporting th...
virtual void WriteDouble(Double_t d)
void SetBufferDisplacement(Int_t skipped)
virtual void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force)
force writing the TStreamerInfo to the file
virtual void WriteObject(const TObject *obj)
Write object to I/O buffer.
virtual Int_t GetVersionOwner() const
Return the version number of the owner file.
virtual void ReadFloat16(Float_t *f, TStreamerElement *ele=0)
Read a Float16_t from the buffer, see comments about Float16_t encoding at TBufferFile::WriteFloat16(...
static Int_t GetGlobalReadParam()
Get default read map size.
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Mother of all ROOT objects.
virtual void ReadBool(Bool_t &b)
virtual void WriteCharP(const Char_t *c)
An array of clone (identical) objects.
virtual void WriteLong64(Long64_t l)
virtual void ClassBegin(const TClass *, Version_t=-1)
virtual void WriteStdString(const std::string &s)
Write std::string to TBuffer.
virtual void WriteFastArray(const Bool_t *b, Int_t n)
Write array of n bools into the I/O buffer.
virtual void ReadUShort(UShort_t &s)
InfoList_t fInfoStack
Stack of pointers to the TStreamerInfos.
virtual void DecrementLevel(TVirtualStreamerInfo *)
Decrement level.
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass)
Write object to I/O buffer.
virtual void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue)
Read a Float16_t from the buffer when the factor and minimun value have been specified see comments a...
virtual void ReadShort(Short_t &s)
Int_t GetBufferDisplacement() const
Abstract Interface class describing Streamer information for one class.
TVirtualStreamerInfo * GetInfo()
virtual void ReadULong(ULong_t &l)
virtual TProcessID * ReadProcessID(UShort_t pidf)
The TProcessID with number pidf is read from file.
virtual void ReadFastArrayString(Char_t *c, Int_t n)
Read array of n characters from the I/O buffer.
virtual UShort_t WriteProcessID(TProcessID *pid)
Check if the ProcessID pid is already in the file.
virtual void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0)
Write array of n doubles (as float) into the I/O buffer.
virtual void WriteChar(Char_t c)
This class stores a (key,value) pair using an external hash.
void GetMappedObject(UInt_t tag, void *&ptr, TClass *&ClassPtr) const
Retrieve the object stored in the buffer's object map at 'tag' Set ptr and ClassPtr respectively to t...
void AutoExpand(Int_t size_needed)
Automatically calculate a new size and expand the buffer to fit at least size_needed.
virtual void ReadFastArray(Bool_t *b, Int_t n)
Read array of n bools from the I/O buffer.
virtual void ReadDouble(Double_t &d)