Logo ROOT  
Reference Guide
TStreamerInfo.h
Go to the documentation of this file.
1// @(#)root/io:$Id$
2// Author: Rene Brun 12/10/2000
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_TStreamerInfo
13#define ROOT_TStreamerInfo
14
15#include <atomic>
16
18
19#include "ThreadLocalStorage.h"
20
22
23#include "TObjArray.h"
24
25
26/**
27\class TStreamerInfo
28\ingroup IO
29Describe Streamer information for one class version
30*/
31
32class TFile;
33class TClass;
34class TClonesArray;
35class TDataMember;
36class TMemberStreamer;
39class TClassStreamer;
40class TVirtualArray;
41namespace ROOT { namespace Detail { class TCollectionProxyInfo; } }
42namespace ROOT { class TSchemaRule; }
43
44namespace TStreamerInfoActions { class TActionSequence; }
45
47
48 class TCompInfo {
49 // Class used to cache information (see fComp)
50 private:
51 // TCompInfo(const TCompInfo&) = default;
52 // TCompInfo& operator=(const TCompInfo&) = default;
53 public:
58 TStreamerElement *fElem; ///< Not Owned
60 TClass *fClass; ///< Not Owned
61 TClass *fNewClass; ///< Not Owned
63 TMemberStreamer *fStreamer; ///< Not Owned
64 TCompInfo() : fType(-1), fNewType(0), fOffset(0), fLength(0), fElem(0), fMethod(0),
65 fClass(0), fNewClass(0), fClassName(), fStreamer(0) {};
67 void Update(const TClass *oldcl, TClass *newcl);
68 };
70
71public:
72 // make the opaque pointer public.
74
75protected:
76 //---------------------------------------------------------------------------
77 // Adapter class used to handle streaming collection of pointers
78 //---------------------------------------------------------------------------
80 {
81 public:
83 fProxy( proxy ) {}
84
85 char* operator[]( UInt_t idx ) const
86 {
87 char **el = (char**)fProxy->At(idx);
88 return *el;
89 }
90 private:
92 };
93
94private:
95 UInt_t fCheckSum; ///<Checksum of original class
96 Int_t fClassVersion; ///<Class version identifier
97 Int_t fOnFileClassVersion;///<!Class version identifier as stored on file.
98 Int_t fNumber; ///<!Unique identifier
99 Int_t fSize; ///<!size of the persistent class
100 Int_t fNdata; ///<!number of optimized elements
101 Int_t fNfulldata; ///<!number of elements
102 Int_t fNslots; ///<!total numbrer of slots in fComp.
103 TCompInfo *fComp; ///<![fNslots with less than fElements->GetEntries()*1.5 used] Compiled info
104 TCompInfo **fCompOpt; ///<![fNdata]
105 TCompInfo **fCompFull; ///<![fElements->GetEntries()]
106 TClass *fClass; ///<!pointer to class
107 TObjArray *fElements; ///<Array of TStreamerElements
108 Version_t fOldVersion; ///<! Version of the TStreamerInfo object read from the file
109 Int_t fNVirtualInfoLoc; ///<! Number of virtual info location to update.
110 ULong_t *fVirtualInfoLoc; ///<![fNVirtualInfoLoc] Location of the pointer to the TStreamerInfo inside the object (when emulated)
111 TStreamerInfoActions::TActionSequence *fReadObjectWise; ///<! List of read action resulting from the compilation.
112 TStreamerInfoActions::TActionSequence *fReadMemberWise; ///<! List of read action resulting from the compilation for use in member wise streaming.
113 TStreamerInfoActions::TActionSequence *fReadMemberWiseVecPtr; ///<! List of read action resulting from the compilation for use in member wise streaming.
114 TStreamerInfoActions::TActionSequence *fReadText; ///<! List of text read action resulting from the compilation, used for JSON.
115 TStreamerInfoActions::TActionSequence *fWriteObjectWise; ///<! List of write action resulting from the compilation.
116 TStreamerInfoActions::TActionSequence *fWriteMemberWise; ///<! List of write action resulting from the compilation for use in member wise streaming.
117 TStreamerInfoActions::TActionSequence *fWriteMemberWiseVecPtr; ///<! List of write action resulting from the compilation for use in member wise streaming.
118 TStreamerInfoActions::TActionSequence *fWriteText; ///<! List of text write action resulting for the compilation, used for JSON.
119
120 static std::atomic<Int_t> fgCount; ///<Number of TStreamerInfo instances
121
122 template <typename T> static T GetTypedValueAux(Int_t type, void *ladd, int k, Int_t len);
123 static void PrintValueAux(char *ladd, Int_t atype, TStreamerElement * aElement, Int_t aleng, Int_t *count);
124
125 UInt_t GenerateIncludes(FILE *fp, char *inclist, const TList *extrainfos);
126 void GenerateDeclaration(FILE *fp, FILE *sfp, const TList *subClasses, Bool_t top = kTRUE);
127 void InsertArtificialElements(std::vector<const ROOT::TSchemaRule*> &rules);
128 void DestructorImpl(void* p, Bool_t dtorOnly);
129
130private:
131 TStreamerInfo(const TStreamerInfo&) = delete; // TStreamerInfo are not copiable. Not Implemented.
132 TStreamerInfo& operator=(const TStreamerInfo&) = delete; // TStreamerInfo are not copiable. Not Implemented.
133 void AddReadAction(TStreamerInfoActions::TActionSequence *readSequence, Int_t index, TCompInfo *compinfo);
134 void AddWriteAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo);
135 void AddReadTextAction(TStreamerInfoActions::TActionSequence *readSequence, Int_t index, TCompInfo *compinfo);
136 void AddWriteTextAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo);
139
140public:
141
142 /// Status bits
143 /// See TVirtualStreamerInfo::EStatusBits for the values.
144
145 /// EReadWrite Enumerator
146 /// | Enum Constant | Description |
147 /// |-------------|--------------------|
148 /// | kBase | Base class element |
149 /// | kOffsetL | Fixed size array |
150 /// | kOffsetP | Pointer to object |
151 /// | kCounter | Counter for array size |
152 /// | kCharStar | Pointer to array of char |
153 /// | kLegacyChar | Equal to TDataType's kchar |
154 /// | kBits | TObject::fBits in case of a referenced object |
155 /// | kObject | Class derived from TObject, or for TStreamerSTL::fCtype non-pointer elements |
156 /// | kObjectp | Class* derived from TObject and with comment field //->Class, or for TStreamerSTL::fCtype: pointer elements |
157 /// | kObjectP | Class* derived from TObject and with NO comment field //->Class |
158 /// | kAny | Class not derived from TObject |
159 /// | kAnyp | Class* not derived from TObject with comment field //->Class |
160 /// | kAnyP | Class* not derived from TObject with NO comment field //->Class |
161 /// | kAnyPnoVT | Class* not derived from TObject with NO comment field //->Class and Class has NO virtual table |
162 /// | kSTLp | Pointer to STL container |
163 /// | kTString | TString, special case |
164 /// | kTObject | TObject, special case |
165 /// | kTNamed | TNamed , special case |
166 /// | kCache | Cache the value in memory than is not part of the object but is accessible via a SchemaRule |
168 kBase = 0, kOffsetL = 20, kOffsetP = 40, kCounter = 6, kCharStar = 7,
169 kChar = 1, kShort = 2, kInt = 3, kLong = 4, kFloat = 5,
171 kLegacyChar = 10, /// Equal to TDataType's kchar
172 kUChar = 11, kUShort = 12, kUInt = 13, kULong = 14, kBits = 15,
173 kLong64 = 16, kULong64 = 17, kBool = 18, kFloat16 = 19,
174 kObject = 61, kAny = 62, kObjectp = 63, kObjectP = 64, kTString = 65,
175 kTObject = 66, kTNamed = 67, kAnyp = 68, kAnyP = 69, kAnyPnoVT = 70,
176 kSTLp = 71,
177 kSkip = 100, kSkipL = 120, kSkipP = 140,
178 kConv = 200, kConvL = 220, kConvP = 240,
179 kSTL = 300, kSTLstring = 365,
180 kStreamer = 500, kStreamLoop = 501,
181 kCache = 600, /// Cache the value in memory than is not part of the object but is accessible via a SchemaRule
183 kCacheNew = 1001,
186 kMissing = 99999
187 };
188
191 virtual ~TStreamerInfo();
192 void Build(Bool_t isTransient = kFALSE);
193 void BuildCheck(TFile *file = 0, Bool_t load = kTRUE);
194 void BuildEmulated(TFile *file);
195 void BuildOld();
196 virtual Bool_t BuildFor( const TClass *cl );
197 void CallShowMembers(const void* obj, TMemberInspector &insp, Bool_t isTransient) const;
198 void Clear(Option_t *);
199 TObject *Clone(const char *newname = "") const;
201 void Compile();
202 void ComputeSize();
203 void ForceWriteInfo(TFile *file, Bool_t force=kFALSE);
204 Int_t GenerateHeaderFile(const char *dirname, const TList *subClasses = 0, const TList *extrainfos = 0);
205 TClass *GetActualClass(const void *obj) const;
206 TClass *GetClass() const {return fClass;}
207 UInt_t GetCheckSum() const {return fCheckSum;}
211 TObjArray *GetElements() const {return fElements;}
212 TStreamerElement *GetElem(Int_t id) const {return fComp[id].fElem;} // Return the element for the list of optimized elements (max GetNdata())
213 TStreamerElement *GetElement(Int_t id) const {return (TStreamerElement*)fElements->At(id);} // Return the element for the complete list of elements (max GetElements()->GetEntries())
221 Int_t GetNdata() const {return fNdata;}
223 Int_t GetNumber() const {return fNumber;}
224 Int_t GetLength(Int_t id) const {return fComp[id].fLength;}
225 ULong_t GetMethod(Int_t id) const {return fComp[id].fMethod;}
226 Int_t GetNewType(Int_t id) const {return fComp[id].fNewType;}
227 Int_t GetOffset(const char *) const;
228 Int_t GetOffset(Int_t id) const {return fComp[id].fOffset;}
231 Int_t GetSize() const;
232 Int_t GetSizeElements() const;
233 TStreamerElement *GetStreamerElement(const char*datamember, Int_t& offset) const;
235 Int_t GetType(Int_t id) const {return fComp[id].fType;}
236 template <typename T> T GetTypedValue(char *pointer, Int_t i, Int_t j, Int_t len) const;
237 template <typename T> T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const;
238 template <typename T> T GetTypedValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const;
239 template <typename T> T GetTypedValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const;
240 Double_t GetValue(char *pointer, Int_t i, Int_t j, Int_t len) const { return GetTypedValue<Double_t>(pointer, i, j, len); }
241 Double_t GetValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueClones<Double_t>(clones, i, j, k, eoffset); }
242 Double_t GetValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueSTL<Double_t>(cont, i, j, k, eoffset); }
243 Double_t GetValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueSTLP<Double_t>(cont, i, j, k, eoffset); }
244 void ls(Option_t *option="") const;
245 Bool_t MatchLegacyCheckSum(UInt_t checksum) const;
247 void *New(void *obj = 0);
248 void *NewArray(Long_t nElements, void* ary = 0);
249 void Destructor(void* p, Bool_t dtorOnly = kFALSE);
250 void DeleteArray(void* p, Bool_t dtorOnly = kFALSE);
251 void PrintValue(const char *name, char *pointer, Int_t i, Int_t len, Int_t lenmax=1000) const;
252 void PrintValueClones(const char *name, TClonesArray *clones, Int_t i, Int_t eoffset, Int_t lenmax=1000) const;
253 void PrintValueSTL(const char *name, TVirtualCollectionProxy *cont, Int_t i, Int_t eoffset, Int_t lenmax=1000) const;
254
255 template <class T>
256 Int_t ReadBuffer(TBuffer &b, const T &arrptr, TCompInfo *const*const compinfo, Int_t first, Int_t last, Int_t narr=1,Int_t eoffset=0,Int_t mode=0);
257 template <class T>
258 Int_t ReadBufferSkip(TBuffer &b, const T &arrptr, const TCompInfo *compinfo,Int_t kase, TStreamerElement *aElement, Int_t narr, Int_t eoffset);
259 template <class T>
260 Int_t ReadBufferConv(TBuffer &b, const T &arrptr, const TCompInfo *compinfo,Int_t kase, TStreamerElement *aElement, Int_t narr, Int_t eoffset);
261 template <class T>
262 Int_t ReadBufferArtificial(TBuffer &b, const T &arrptr, TStreamerElement *aElement, Int_t narr, Int_t eoffset);
263
266 void SetCheckSum(UInt_t checksum) {fCheckSum = checksum;}
267 void SetClass(TClass *cl);
270 void TagFile(TFile *fFile);
271private:
272 // Try to remove those functions from the public interface.
273 Int_t WriteBuffer(TBuffer &b, char *pointer, Int_t first);
277public:
278 virtual void Update(const TClass *oldClass, TClass *newClass);
279
280 // \brief Generate the TClass and TStreamerInfo for the requested pair.
281 // This creates a TVirtualStreamerInfo for the pair and trigger the BuildCheck/Old to
282 // provokes the creation of the corresponding TClass. This relies on the dictionary for
283 // std::pair<const int, int> to already exist (or the interpreter information being available)
284 // as it is used as a template.
285 virtual TVirtualStreamerInfo *GenerateInfoForPair(const std::string &pairclassname, bool silent, size_t hint_pair_offset, size_t hint_pair_size);
286 virtual TVirtualStreamerInfo *GenerateInfoForPair(const std::string &firstname, const std::string &secondname, bool silent, size_t hint_pair_offset, size_t hint_pair_size);
287
288 virtual TVirtualCollectionProxy *GenEmulatedProxy(const char* class_name, Bool_t silent);
289 virtual TClassStreamer *GenEmulatedClassStreamer(const char* class_name, Bool_t silent);
290 virtual TVirtualCollectionProxy *GenExplicitProxy( const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl );
291 virtual TClassStreamer *GenExplicitClassStreamer( const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl );
292
294
295public:
296 // For access by the StreamerInfoActions.
297 template <class T>
298 Int_t WriteBufferAux (TBuffer &b, const T &arr, TCompInfo *const*const compinfo, Int_t first, Int_t last, Int_t narr,Int_t eoffset,Int_t mode);
299
300 //WARNING this class version must be the same as TVirtualStreamerInfo
301 ClassDef(TStreamerInfo,9) //Streamer information for one class version
302};
303
304
305#endif
#define b(i)
Definition: RSha256.hxx:100
int Int_t
Definition: RtypesCore.h:43
short Version_t
Definition: RtypesCore.h:63
unsigned int UInt_t
Definition: RtypesCore.h:44
const Bool_t kFALSE
Definition: RtypesCore.h:90
unsigned long ULong_t
Definition: RtypesCore.h:53
long Long_t
Definition: RtypesCore.h:52
bool Bool_t
Definition: RtypesCore.h:61
double Double_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:89
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
XFontStruct * id
Definition: TGX11.cxx:108
char name[80]
Definition: TGX11.cxx:109
int type
Definition: TGX11.cxx:120
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
ECheckSum
Definition: TClass.h:108
An array of clone (identical) objects.
Definition: TClonesArray.h:32
All ROOT classes may have RTTI (run time type identification) support added.
Definition: TDataMember.h:31
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:53
A doubly linked list.
Definition: TList.h:44
Abstract base class for accessing the data-members of a class.
An array of TObjects.
Definition: TObjArray.h:37
Int_t GetEntriesFast() const
Definition: TObjArray.h:64
TObject * At(Int_t idx) const
Definition: TObjArray.h:166
Mother of all ROOT objects.
Definition: TObject.h:37
void Update(const TClass *oldcl, TClass *newcl)
Update the TClass pointer cached in this object.
TClass * fClass
Not Owned.
Definition: TStreamerInfo.h:60
TMemberStreamer * fStreamer
Not Owned.
Definition: TStreamerInfo.h:63
TStreamerElement * fElem
Not Owned.
Definition: TStreamerInfo.h:58
TClass * fNewClass
Not Owned.
Definition: TStreamerInfo.h:61
char * operator[](UInt_t idx) const
Definition: TStreamerInfo.h:85
TVirtualCollectionProxy * fProxy
Definition: TStreamerInfo.h:91
TPointerCollectionAdapter(TVirtualCollectionProxy *proxy)
Definition: TStreamerInfo.h:82
Describe Streamer information for one class version.
Definition: TStreamerInfo.h:46
Int_t fNVirtualInfoLoc
! Number of virtual info location to update.
Int_t fOnFileClassVersion
!Class version identifier as stored on file.
Definition: TStreamerInfo.h:97
TObjArray * GetElements() const
TStreamerElement * GetStreamerElement(const char *datamember, Int_t &offset) const
Return the StreamerElement of "datamember" inside our class or any of its base classes.
void SetClassVersion(Int_t vers)
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.
void Clear(Option_t *)
If opt contains 'built', reset this StreamerInfo as if Build or BuildOld was never called on it (usef...
void AddWriteAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo)
TStreamerElement * GetElem(Int_t id) const
Int_t fNfulldata
!number of elements
void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)
Recursively mark streamer infos for writing to a file.
Int_t GetSize() const
Return total size of all persistent elements of the class (with offsets).
TCompInfo * fComp
![fNslots with less than fElements->GetEntries()*1.5 used] Compiled info
Int_t GetOffset(Int_t id) const
TStreamerInfoActions::TActionSequence * GetWriteMemberWiseActions(Bool_t forCollection)
Int_t GetNumber() const
Int_t WriteBufferSTL(TBuffer &b, TVirtualCollectionProxy *cont, Int_t nc)
Write for STL container. ('first' is an id between -1 and fNfulldata).
void Compile()
loop on the TStreamerElement list regroup members with same type Store predigested information into l...
T GetTypedValue(char *pointer, Int_t i, Int_t j, Int_t len) const
Return value of element i in object at pointer.
TStreamerInfoActions::TActionSequence * fWriteMemberWiseVecPtr
! List of write action resulting from the compilation for use in member wise streaming.
Double_t GetValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
void * NewArray(Long_t nElements, void *ary=0)
An array of emulated objects is created at address ary, if ary is null, we allocate memory for the ar...
TStreamerInfoActions::TActionSequence * fReadText
! List of text read action resulting from the compilation, used for JSON.
void DeleteArray(void *p, Bool_t dtorOnly=kFALSE)
Destroy an array of emulated objects, with optional delete.
TVirtualStreamerInfo * NewInfo(TClass *cl)
Int_t GetElementOffset(Int_t id) const
Double_t GetValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
void AddReadTextAction(TStreamerInfoActions::TActionSequence *readSequence, Int_t index, TCompInfo *compinfo)
Add a read text action for the given element.
TCompInfo ** fCompFull
![fElements->GetEntries()]
Int_t GetNelement() const
Int_t ReadBuffer(TBuffer &b, const T &arrptr, TCompInfo *const *const compinfo, Int_t first, Int_t last, Int_t narr=1, Int_t eoffset=0, Int_t mode=0)
Deserialize information from buffer b into object at pointer if (arrayMode & 1) ptr is a pointer to a...
TObjArray * fElements
Array of TStreamerElements.
void InsertArtificialElements(std::vector< const ROOT::TSchemaRule * > &rules)
Insert new members as expressed in the array of TSchemaRule(s).
ULong_t GetMethod(Int_t id) const
TStreamerInfo & operator=(const TStreamerInfo &)=delete
void PrintValue(const char *name, char *pointer, Int_t i, Int_t len, Int_t lenmax=1000) const
print value of element i in object at pointer The function may be called in two ways: -method1 len < ...
Int_t GetDataMemberOffset(TDataMember *dm, TMemberStreamer *&streamer) const
Compute data member offset.
@ kArtificial
Cache the value in memory than is not part of the object but is accessible via a SchemaRule.
@ kNeedObjectForVirtualBaseClass
@ kUChar
Equal to TDataType's kchar.
TClass * GetActualClass(const void *obj) const
Assuming that obj points to (the part of) an object that is of the type described by this streamerInf...
T GetTypedValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
Return value of element i in object number j in a TClonesArray and eventually element k in a sub-arra...
void AddReadMemberWiseVecPtrAction(TStreamerInfoActions::TActionSequence *readSequence, Int_t index, TCompInfo *compinfo)
Add a read action for the given element.
void TagFile(TFile *fFile)
Mark the classindex of the current file as using this TStreamerInfo.
TClass * GetClass() const
void ls(Option_t *option="") const
List the TStreamerElement list and also the precomputed tables if option contains the string "incOrig...
T GetTypedValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
Return value of element i in object number j in a TClonesArray and eventually element k in a sub-arra...
Int_t GetOffset(const char *) const
Return the offset of the data member as indicated by this StreamerInfo.
void Destructor(void *p, Bool_t dtorOnly=kFALSE)
Emulated destructor for this class.
TStreamerInfoActions::TActionSequence * fReadMemberWise
! List of read action resulting from the compilation for use in member wise streaming.
void CallShowMembers(const void *obj, TMemberInspector &insp, Bool_t isTransient) const
Emulated a call ShowMembers() on the obj of this class type, passing insp and parent.
TStreamerInfoActions::TActionSequence * GetReadObjectWiseActions()
Int_t GetType(Int_t id) const
Int_t ReadBufferConv(TBuffer &b, const T &arrptr, const TCompInfo *compinfo, Int_t kase, TStreamerElement *aElement, Int_t narr, Int_t eoffset)
Convert elements of a TClonesArray.
Int_t fClassVersion
Class version identifier.
Definition: TStreamerInfo.h:96
TStreamerElement * GetElement(Int_t id) const
Int_t fNdata
!number of optimized elements
TStreamerInfo()
Default ctor.
TStreamerInfoActions::TActionSequence * fReadMemberWiseVecPtr
! List of read action resulting from the compilation for use in member wise streaming.
TStreamerInfoActions::TActionSequence * fReadObjectWise
! List of read action resulting from the compilation.
Int_t GetLength(Int_t id) const
TStreamerInfo(const TStreamerInfo &)=delete
Int_t ReadBufferClones(TBuffer &b, TClonesArray *clones, Int_t nc, Int_t first, Int_t eoffset)
Read for TClonesArray.
TStreamerElement * GetStreamerElementReal(Int_t i, Int_t j) const
Obsolete: this routine is obsolete and should not longer be used.
void * New(void *obj=0)
An emulated object is created at address obj, if obj is null we allocate memory for the object.
TClass * fClass
!pointer to class
Bool_t MatchLegacyCheckSum(UInt_t checksum) const
Return true if the checksum passed as argument is one of the checksum value produced by the older che...
TCompInfo ** fCompOpt
![fNdata]
TStreamerInfoActions::TActionSequence * GetReadTextActions()
Int_t GetNewType(Int_t id) const
void SetCheckSum(UInt_t checksum)
Int_t GetOnFileClassVersion() const
virtual Bool_t BuildFor(const TClass *cl)
Check if we can build this for foreign class - do we have some rules to do that.
UInt_t fCheckSum
Checksum of original class.
Definition: TStreamerInfo.h:95
virtual TVirtualStreamerInfo * GenerateInfoForPair(const std::string &pairclassname, bool silent, size_t hint_pair_offset, size_t hint_pair_size)
Int_t GetSizeElements() const
Return total size of all persistent elements of the class use GetSize if you want to get the real siz...
static std::atomic< Int_t > fgCount
Number of TStreamerInfo instances.
void AddWriteTextAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo)
TStreamerInfoActions::TActionSequence * GetWriteTextActions()
static TStreamerElement * GetCurrentElement()
static function returning a pointer to the current TStreamerElement fgElement points to the current T...
T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
UInt_t GenerateIncludes(FILE *fp, char *inclist, const TList *extrainfos)
Add to the header file, the #include need for this class.
virtual TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)
Generate emulated class streamer for a given collection class.
void ComputeSize()
Compute total size of all persistent elements of the class.
void AddReadAction(TStreamerInfoActions::TActionSequence *readSequence, Int_t index, TCompInfo *compinfo)
Add a read action for the given element.
void AddWriteMemberWiseVecPtrAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo)
This is for streaming via a TClonesArray (or a vector of pointers of this type).
Int_t fNumber
!Unique identifier
Definition: TStreamerInfo.h:98
void BuildCheck(TFile *file=0, Bool_t load=kTRUE)
Check if built and consistent with the class dictionary.
void PrintValueSTL(const char *name, TVirtualCollectionProxy *cont, Int_t i, Int_t eoffset, Int_t lenmax=1000) const
Print value of element i in a TClonesArray.
Int_t WriteBuffer(TBuffer &b, char *pointer, Int_t first)
General Write.
TStreamerInfoActions::TActionSequence * fWriteObjectWise
! List of write action resulting from the compilation.
Int_t ReadBufferArtificial(TBuffer &b, const T &arrptr, TStreamerElement *aElement, Int_t narr, Int_t eoffset)
Handle Artificial StreamerElement.
void Build(Bool_t isTransient=kFALSE)
Build the I/O data structure for the current class version.
Bool_t CompareContent(TClass *cl, TVirtualStreamerInfo *info, Bool_t warn, Bool_t complete, TFile *file)
Return True if the current StreamerInfo in cl or info is equivalent to this TStreamerInfo.
void SetOnFileClassVersion(Int_t vers)
Int_t fSize
!size of the persistent class
Definition: TStreamerInfo.h:99
static T GetTypedValueAux(Int_t type, void *ladd, int k, Int_t len)
Get the value from inside a collection.
void GenerateDeclaration(FILE *fp, FILE *sfp, const TList *subClasses, Bool_t top=kTRUE)
Write the Declaration of class.
static void PrintValueAux(char *ladd, Int_t atype, TStreamerElement *aElement, Int_t aleng, Int_t *count)
print value of element in object at pointer, type atype, leng aleng or *count The function may be cal...
Int_t WriteBufferClones(TBuffer &b, TClonesArray *clones, Int_t nc, Int_t first, Int_t eoffset)
Write for ClonesArray ('first' is an id between -1 and fNfulldata).
TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
TStreamerInfoActions::TActionSequence * GetWriteObjectWiseActions()
Int_t ReadBufferSkip(TBuffer &b, const T &arrptr, const TCompInfo *compinfo, Int_t kase, TStreamerElement *aElement, Int_t narr, Int_t eoffset)
Skip an element.
void BuildEmulated(TFile *file)
Create an Emulation TStreamerInfo object.
Int_t GetClassVersion() const
TStreamerInfoActions::TActionSequence * fWriteMemberWise
! List of write action resulting from the compilation for use in member wise streaming.
virtual TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent)
Generate emulated collection proxy for a given class.
void BuildOld()
rebuild the TStreamerInfo structure
Int_t fNslots
!total numbrer of slots in fComp.
Int_t WriteBufferAux(TBuffer &b, const T &arr, TCompInfo *const *const compinfo, Int_t first, Int_t last, Int_t narr, Int_t eoffset, Int_t mode)
The object at pointer is serialized to the buffer b if (arrayMode & 1) ptr is a pointer to array of p...
virtual TVirtualCollectionProxy * GenExplicitProxy(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl)
Generate proxy from static functions.
virtual TClassStreamer * GenExplicitClassStreamer(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl)
Generate class streamer from static functions.
Version_t fOldVersion
! Version of the TStreamerInfo object read from the file
Version_t GetOldVersion() const
void DestructorImpl(void *p, Bool_t dtorOnly)
Internal part of the destructor.
virtual ~TStreamerInfo()
TStreamerInfo dtor.
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class
Int_t GetNdata() const
TCompInfo TCompInfo_t
Definition: TStreamerInfo.h:73
TStreamerInfoActions::TActionSequence * fWriteText
! List of text write action resulting for the compilation, used for JSON.
void SetClass(TClass *cl)
Replace the TClass this streamerInfo is pointing to (belongs to)
Int_t WriteBufferSTLPtrs(TBuffer &b, TVirtualCollectionProxy *cont, Int_t nc, Int_t first, Int_t eoffset)
Write for STL container.
ULong_t * fVirtualInfoLoc
![fNVirtualInfoLoc] Location of the pointer to the TStreamerInfo inside the object (when emulated)
UInt_t GetCheckSum() const
TStreamerInfoActions::TActionSequence * GetReadMemberWiseActions(Bool_t forCollection)
void PrintValueClones(const char *name, TClonesArray *clones, Int_t i, Int_t eoffset, Int_t lenmax=1000) const
Print value of element i in a TClonesArray.
Double_t GetValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
Double_t GetValue(char *pointer, Int_t i, Int_t j, Int_t len) const
Int_t GenerateHeaderFile(const char *dirname, const TList *subClasses=0, const TList *extrainfos=0)
Generate header file for the class described by this TStreamerInfo the function is called by TFile::M...
Basic string class.
Definition: TString.h:131
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
Definition: TVirtualArray.h:27
virtual void * At(UInt_t idx)=0
Abstract Interface class describing Streamer information for one class.
double T(double x)
Definition: ChebyshevPol.h:34
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: StringConv.hxx:21
Definition: file.py:1
Definition: first.py:1