46 fIsPointer(isPointer),
47 fIsPrealloc(isPrealloc),
48 fCollectionClass(proxy?proxy->GetCollectionClass():0)
72 Int_t nobjects, dummy;
84 char *addr = (
char*)pmember;
94 char *addr = (
char*)pmember;
113 if (
b.GetBufferVersion() > 0) {
114 tag +=
b.GetBufferDisplacement();
116 if (tag > (
UInt_t)
b.GetMapCount()) {
117 Error(
"TConvertClonesArrayToProxy",
"object tag too large, I/O buffer corrupted");
122 b.GetMappedObject( tag, objptr, clRef);
123 if ( objptr == (
void*)-1 ) {
124 Error(
"TConvertClonesArrayToProxy",
125 "Object can not be found in the buffer's map (at %d)",tag);
129 if (
b.GetBufferVersion()==0)
continue;
134 Int_t currentpos =
b.Length();
137 (*this)(
b,&objptr,1);
138 b.SetBufferOffset( currentpos);
140 if (objptr==0)
continue;
147 Error(
"TConvertClonesArrayToProxy",
148 "Object refered to has not been converted from TClonesArray to %s",
152 Error(
"TConvertClonesArrayToProxy",
153 "Object refered to is of type %s instead of %s",
157 *(
void**)addr = objptr;
161 Warning(
"TConvertClonesArrayToProxy",
162 "Only the TClonesArray part of %s will be read into %s!\n",
166 *(
void**)addr = proxy->
New();
167 if (
b.GetBufferVersion()>0) {
189 strncpy(classv,s.
Data(),255);
191 char *semicolon = strchr(classv,
';');
198 printf(
"TClonesArray::Streamer expecting class %s\n", classv);
204 if (nobjects < 0) nobjects = -nobjects;
207 Error(
"TClonesArray::Conversion to vector",
"Bad class");
210 env = proxy->
Allocate(nobjects,
true);
217 for (
Int_t i = 0; i < nobjects; i++) {
220 void* elem = proxy->
At(i);
221 b.StreamObject(elem,subinfo->
GetClass());
235 fIsPointer(isPointer),
236 fIsPrealloc(isPrealloc),
247 if (isPointer)
fSizeOf =
sizeof(
void*);
280 char *addr = (
char*)pmember;
291 char *addr = (
char*)pmember;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
Int_t Size() const
Return size of object of this class.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
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.
An array of clone (identical) objects.
Class streamer object to implement TClassStreamer functionality for I/O emulation.
TGenCollectionProxy * GetXYZ()
TConvertClonesArrayToProxy(TVirtualCollectionProxy *proxy, Bool_t isPointer, Bool_t isPrealloc)
Constructor.
void operator()(TBuffer &b, void *pmember, Int_t size=0) override
Read a TClonesArray from the TBuffer b and load it into a (stl) collection.
~TConvertClonesArrayToProxy() override
Destructor.
TClass * fCollectionClass
void operator()(TBuffer &b, void *pmember, Int_t size=0) override
Read a std::map or std::multimap from the TBuffer b and load it into a (stl) collection.
TConvertMapToProxy(TClassStreamer *streamer, Bool_t isPointer, Bool_t isPrealloc)
Constructor.
TClass * fCollectionClass
virtual void StreamerAsMap(TBuffer &refBuffer)
const char * GetName() const override
Returns name of object.
TObject * At(Int_t idx) const override
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
Describes a persistent version of a class.
Int_t ReadBufferSTL(TBuffer &b, TVirtualCollectionProxy *cont, Int_t nc, Int_t eoffset, Bool_t v7=kTRUE)
The STL vector/list is deserialized from the buffer b.
TClass * GetClass() const override
const char * Data() const
virtual void Streamer(TBuffer &)
Stream a string object.
RAII helper class that ensures that PushProxy() / PopProxy() are called when entering / leaving a C++...
Defines a common interface to inspect/change the contents of an object that represents a collection.
virtual void * New() const
Construct a new container object and return its address.
virtual TClass * GetValueClass() const =0
If the value type is a user-defined class, return a pointer to the TClass representing the value type...
virtual void Commit(void *)=0
Commits pending elements in a staging area (see Allocate() for more information).
virtual void * At(UInt_t idx)=0
Return the address of the value at index idx
virtual void * Allocate(UInt_t n, Bool_t forceDelete)=0
Allocates space for storing at least n elements.
virtual TClass * GetCollectionClass() const
Return a pointer to the TClass representing the proxied container class.
virtual TObjArray * GetElements() const =0
static Bool_t CanDelete()
static function returning true if ReadBuffer can delete object