Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TBufferFile.h
Go to the documentation of this file.
1 // @(#)root/io:$Id: 697641b2b52ed3d97bb5bde0fb5d2ff4a2f6c24f $
2 // Author: Rene Brun 17/01/2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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_TBufferFile
13 #define ROOT_TBufferFile
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TBufferFile //
19 // //
20 // The concrete implementation of TBuffer for writing/reading to/from a //
21 // ROOT file or socket. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TBufferIO.h"
26 #include "Bytes.h"
27 
28 #include <vector>
29 
30 #ifdef R__OLDHPACC
31 namespace std {
32  using ::string;
33  using ::vector;
34 }
35 #endif
36 
37 class TVirtualStreamerInfo;
38 class TStreamerInfo;
39 class TStreamerElement;
40 class TClass;
41 class TVirtualArray;
42 namespace TStreamerInfoActions {
43  class TActionSequence;
44 }
45 
46 class TBufferFile : public TBufferIO {
47 
48 protected:
49  typedef std::vector<TStreamerInfo*> InfoList_t;
50 
51  TStreamerInfo *fInfo{nullptr}; ///< Pointer to TStreamerInfo object writing/reading the buffer
52  InfoList_t fInfoStack; ///< Stack of pointers to the TStreamerInfos
53 
54  // Default ctor
55  TBufferFile() {} // NOLINT: not allowed to use = default because of TObject::kIsOnHeap detection, see ROOT-10300
56 
57  // TBuffer objects cannot be copied or assigned
58  TBufferFile(const TBufferFile &) = delete; ///< not implemented
59  void operator=(const TBufferFile &) = delete; ///< not implemented
60 
61  Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss, const char* classname);
62  void CheckCount(UInt_t offset) override;
63  UInt_t CheckObject(UInt_t offset, const TClass *cl, Bool_t readClass = kFALSE);
64 
65  void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse) override;
66 
67 public:
68  enum { kStreamedMemberWise = BIT(14) }; //added to version number to know if a collection has been stored member-wise
69 
70  TBufferFile(TBuffer::EMode mode);
71  TBufferFile(TBuffer::EMode mode, Int_t bufsiz);
72  TBufferFile(TBuffer::EMode mode, Int_t bufsiz, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr);
73  virtual ~TBufferFile();
74 
75  Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss) override;
76  Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const char *classname) override;
77  void SetByteCount(UInt_t cntpos, Bool_t packInVersion = kFALSE) override;
78 
79  void SkipVersion(const TClass *cl = nullptr) override;
80  Version_t ReadVersion(UInt_t *start = nullptr, UInt_t *bcnt = nullptr, const TClass *cl = nullptr) override;
81  Version_t ReadVersionNoCheckSum(UInt_t *start = nullptr, UInt_t *bcnt = nullptr) override;
82  Version_t ReadVersionForMemberWise(const TClass *cl = nullptr) override;
83  UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt = kFALSE) override;
84  UInt_t WriteVersionMemberWise(const TClass *cl, Bool_t useBcnt = kFALSE) override;
85 
86  void *ReadObjectAny(const TClass* cast) override;
87  void SkipObjectAny() override;
88 
89  void IncrementLevel(TVirtualStreamerInfo* info) override;
90  void SetStreamerElementNumber(TStreamerElement*,Int_t) override {}
91  void DecrementLevel(TVirtualStreamerInfo*) override;
92  TVirtualStreamerInfo *GetInfo() override { return (TVirtualStreamerInfo*)fInfo; }
93  void ClassBegin(const TClass*, Version_t = -1) override {}
94  void ClassEnd(const TClass*) override {}
95  void ClassMember(const char*, const char* = 0, Int_t = -1, Int_t = -1) override {}
96 
97  Int_t ReadBuf(void *buf, Int_t max) override;
98  void WriteBuf(const void *buf, Int_t max) override;
99 
100  char *ReadString(char *s, Int_t max) override;
101  void WriteString(const char *s) override;
102 
103  TClass *ReadClass(const TClass *cl = nullptr, UInt_t *objTag = nullptr) override;
104  void WriteClass(const TClass *cl) override;
105 
106  TObject *ReadObject(const TClass *cl) override;
107 
108  using TBufferIO::CheckObject;
109 
110  // basic types and arrays of basic types
111  void ReadFloat16 (Float_t *f, TStreamerElement *ele = nullptr) override;
112  void WriteFloat16(Float_t *f, TStreamerElement *ele = nullptr) override;
113  void ReadDouble32 (Double_t *d, TStreamerElement *ele = nullptr) override;
114  void WriteDouble32(Double_t *d, TStreamerElement *ele = nullptr) override;
115  void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue) override;
116  void ReadWithNbits(Float_t *ptr, Int_t nbits) override;
117  void ReadWithFactor(Double_t *ptr, Double_t factor, Double_t minvalue) override;
118  void ReadWithNbits(Double_t *ptr, Int_t nbits) override;
119 
120  Int_t ReadArray(Bool_t *&b) override;
121  Int_t ReadArray(Char_t *&c) override;
122  Int_t ReadArray(UChar_t *&c) override;
123  Int_t ReadArray(Short_t *&h) override;
124  Int_t ReadArray(UShort_t *&h) override;
125  Int_t ReadArray(Int_t *&i) override;
126  Int_t ReadArray(UInt_t *&i) override;
127  Int_t ReadArray(Long_t *&l) override;
128  Int_t ReadArray(ULong_t *&l) override;
129  Int_t ReadArray(Long64_t *&l) override;
130  Int_t ReadArray(ULong64_t *&l) override;
131  Int_t ReadArray(Float_t *&f) override;
132  Int_t ReadArray(Double_t *&d) override;
133  Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele = nullptr) override;
134  Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele = nullptr) override;
135 
136  Int_t ReadStaticArray(Bool_t *b) override;
137  Int_t ReadStaticArray(Char_t *c) override;
138  Int_t ReadStaticArray(UChar_t *c) override;
139  Int_t ReadStaticArray(Short_t *h) override;
140  Int_t ReadStaticArray(UShort_t *h) override;
141  Int_t ReadStaticArray(Int_t *i) override;
142  Int_t ReadStaticArray(UInt_t *i) override;
143  Int_t ReadStaticArray(Long_t *l) override;
144  Int_t ReadStaticArray(ULong_t *l) override;
145  Int_t ReadStaticArray(Long64_t *l) override;
146  Int_t ReadStaticArray(ULong64_t *l) override;
147  Int_t ReadStaticArray(Float_t *f) override;
148  Int_t ReadStaticArray(Double_t *d) override;
149  Int_t ReadStaticArrayFloat16(Float_t *f, TStreamerElement *ele = nullptr) override;
150  Int_t ReadStaticArrayDouble32(Double_t *d, TStreamerElement *ele = nullptr) override;
151 
152  void ReadFastArray(Bool_t *b, Int_t n) override;
153  void ReadFastArray(Char_t *c, Int_t n) override;
154  void ReadFastArrayString(Char_t *c, Int_t n) override;
155  void ReadFastArray(UChar_t *c, Int_t n) override;
156  void ReadFastArray(Short_t *h, Int_t n) override;
157  void ReadFastArray(UShort_t *h, Int_t n) override;
158  void ReadFastArray(Int_t *i, Int_t n) override;
159  void ReadFastArray(UInt_t *i, Int_t n) override;
160  void ReadFastArray(Long_t *l, Int_t n) override;
161  void ReadFastArray(ULong_t *l, Int_t n) override;
162  void ReadFastArray(Long64_t *l, Int_t n) override;
163  void ReadFastArray(ULong64_t *l, Int_t n) override;
164  void ReadFastArray(Float_t *f, Int_t n) override;
165  void ReadFastArray(Double_t *d, Int_t n) override;
166  void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele = nullptr) override;
167  void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele = nullptr) override;
168  void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue) override;
169  void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits) override;
170  void ReadFastArrayWithFactor(Double_t *ptr, Int_t n, Double_t factor, Double_t minvalue) override;
171  void ReadFastArrayWithNbits(Double_t *ptr, Int_t n, Int_t nbits) override;
172  void ReadFastArray(void *start , const TClass *cl, Int_t n=1, TMemberStreamer *s = nullptr, const TClass* onFileClass = nullptr) override;
173  void ReadFastArray(void **startp, const TClass *cl, Int_t n=1, Bool_t isPreAlloc=kFALSE, TMemberStreamer *s = nullptr, const TClass* onFileClass = nullptr) override;
174 
175  void WriteArray(const Bool_t *b, Int_t n) override;
176  void WriteArray(const Char_t *c, Int_t n) override;
177  void WriteArray(const UChar_t *c, Int_t n) override;
178  void WriteArray(const Short_t *h, Int_t n) override;
179  void WriteArray(const UShort_t *h, Int_t n) override;
180  void WriteArray(const Int_t *i, Int_t n) override;
181  void WriteArray(const UInt_t *i, Int_t n) override;
182  void WriteArray(const Long_t *l, Int_t n) override;
183  void WriteArray(const ULong_t *l, Int_t n) override;
184  void WriteArray(const Long64_t *l, Int_t n) override;
185  void WriteArray(const ULong64_t *l, Int_t n) override;
186  void WriteArray(const Float_t *f, Int_t n) override;
187  void WriteArray(const Double_t *d, Int_t n) override;
188  void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele = nullptr) override;
189  void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele = nullptr) override;
190 
191  void WriteFastArray(const Bool_t *b, Int_t n) override;
192  void WriteFastArray(const Char_t *c, Int_t n) override;
193  void WriteFastArrayString(const Char_t *c, Int_t n) override;
194  void WriteFastArray(const UChar_t *c, Int_t n) override;
195  void WriteFastArray(const Short_t *h, Int_t n) override;
196  void WriteFastArray(const UShort_t *h, Int_t n) override;
197  void WriteFastArray(const Int_t *i, Int_t n) override;
198  void WriteFastArray(const UInt_t *i, Int_t n) override;
199  void WriteFastArray(const Long_t *l, Int_t n) override;
200  void WriteFastArray(const ULong_t *l, Int_t n) override;
201  void WriteFastArray(const Long64_t *l, Int_t n) override;
202  void WriteFastArray(const ULong64_t *l, Int_t n) override;
203  void WriteFastArray(const Float_t *f, Int_t n) override;
204  void WriteFastArray(const Double_t *d, Int_t n) override;
205  void WriteFastArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele = nullptr) override;
206  void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele = nullptr) override;
207  void WriteFastArray(void *start, const TClass *cl, Int_t n=1, TMemberStreamer *s = nullptr) override;
208  Int_t WriteFastArray(void **startp, const TClass *cl, Int_t n=1, Bool_t isPreAlloc=kFALSE, TMemberStreamer *s = nullptr) override;
209 
210  void StreamObject(void *obj, const std::type_info &typeinfo, const TClass* onFileClass = nullptr) override;
211  void StreamObject(void *obj, const char *className, const TClass* onFileClass = nullptr) override;
212  void StreamObject(void *obj, const TClass *cl, const TClass* onFileClass = nullptr) override;
213  void StreamObject(TObject *obj) override;
214 
215  void ReadBool(Bool_t &b) override;
216  void ReadChar(Char_t &c) override;
217  void ReadUChar(UChar_t &c) override;
218  void ReadShort(Short_t &s) override;
219  void ReadUShort(UShort_t &s) override;
220  void ReadInt(Int_t &i) override;
221  void ReadUInt(UInt_t &i) override;
222  void ReadLong(Long_t &l) override;
223  void ReadULong(ULong_t &l) override;
224  void ReadLong64(Long64_t &l) override;
225  void ReadULong64(ULong64_t &l) override;
226  void ReadFloat(Float_t &f) override;
227  void ReadDouble(Double_t &d) override;
228  void ReadCharP(Char_t *c) override;
229  void ReadTString(TString &s) override;
230  void ReadStdString(std::string *s) override;
231  using TBuffer::ReadStdString;
232  void ReadCharStar(char* &s) override;
233 
234  void WriteBool(Bool_t b) override;
235  void WriteChar(Char_t c) override;
236  void WriteUChar(UChar_t c) override;
237  void WriteShort(Short_t s) override;
238  void WriteUShort(UShort_t s) override;
239  void WriteInt(Int_t i) override;
240  void WriteUInt(UInt_t i) override;
241  void WriteLong(Long_t l) override;
242  void WriteULong(ULong_t l) override;
243  void WriteLong64(Long64_t l) override;
244  void WriteULong64(ULong64_t l) override;
245  void WriteFloat(Float_t f) override;
246  void WriteDouble(Double_t d) override;
247  void WriteCharP(const Char_t *c) override;
248  void WriteTString(const TString &s) override;
249  using TBuffer::WriteStdString;
250  void WriteStdString(const std::string *s) override;
251  void WriteCharStar(char *s) override;
252 
253  // Utilities for TClass
254  Int_t ReadClassEmulated(const TClass *cl, void *object, const TClass *onfile_class) override;
255  Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class) override;
256  Int_t ReadClassBuffer(const TClass *cl, void *pointer, Int_t version, UInt_t start, UInt_t count, const TClass *onfile_class) override;
257  Int_t WriteClassBuffer(const TClass *cl, void *pointer) override;
258 
259  // Utilities to streamer using sequences.
260  Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object) override;
261  Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection) override;
262  Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection) override;
263 
264  ClassDefOverride(TBufferFile,0) //concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
265 };
266 
267 
268 //---------------------- TBufferFile inlines ---------------------------------------
269 
270 //______________________________________________________________________________
271 inline void TBufferFile::WriteBool(Bool_t b)
272 {
273  if (fBufCur + sizeof(UChar_t) > fBufMax) AutoExpand(fBufSize+sizeof(UChar_t));
274  tobuf(fBufCur, b);
275 }
276 
277 //______________________________________________________________________________
278 inline void TBufferFile::WriteChar(Char_t c)
279 {
280  if (fBufCur + sizeof(Char_t) > fBufMax) AutoExpand(fBufSize+sizeof(Char_t));
281  tobuf(fBufCur, c);
282 }
283 
284 //______________________________________________________________________________
285 inline void TBufferFile::WriteUChar(UChar_t c)
286 {
287  if (fBufCur + sizeof(UChar_t) > fBufMax) AutoExpand(fBufSize+sizeof(UChar_t));
288  tobuf(fBufCur, (Char_t)c);
289 }
290 
291 //______________________________________________________________________________
292 inline void TBufferFile::WriteShort(Short_t h)
293 {
294  if (fBufCur + sizeof(Short_t) > fBufMax) AutoExpand(fBufSize+sizeof(Short_t));
295  tobuf(fBufCur, h);
296 }
297 
298 //______________________________________________________________________________
299 inline void TBufferFile::WriteUShort(UShort_t h)
300 {
301  if (fBufCur + sizeof(UShort_t) > fBufMax) AutoExpand(fBufSize+sizeof(UShort_t));
302  tobuf(fBufCur, (Short_t)h);
303 }
304 
305 //______________________________________________________________________________
306 inline void TBufferFile::WriteInt(Int_t i)
307 {
308  if (fBufCur + sizeof(Int_t) > fBufMax) AutoExpand(fBufSize+sizeof(Int_t));
309  tobuf(fBufCur, i);
310 }
311 
312 //______________________________________________________________________________
313 inline void TBufferFile::WriteUInt(UInt_t i)
314 {
315  if (fBufCur + sizeof(UInt_t) > fBufMax) AutoExpand(fBufSize+sizeof(UInt_t));
316  tobuf(fBufCur, (Int_t)i);
317 }
318 
319 //______________________________________________________________________________
320 inline void TBufferFile::WriteLong(Long_t l)
321 {
322  if (fBufCur + sizeof(Long_t) > fBufMax) AutoExpand(fBufSize+sizeof(Long_t));
323  tobuf(fBufCur, l);
324 }
325 
326 //______________________________________________________________________________
327 inline void TBufferFile::WriteULong(ULong_t l)
328 {
329  if (fBufCur + sizeof(ULong_t) > fBufMax) AutoExpand(fBufSize+sizeof(ULong_t));
330  tobuf(fBufCur, (Long_t)l);
331 }
332 
333 //______________________________________________________________________________
334 inline void TBufferFile::WriteLong64(Long64_t ll)
335 {
336  if (fBufCur + sizeof(Long64_t) > fBufMax) AutoExpand(fBufSize+sizeof(Long64_t));
337  tobuf(fBufCur, ll);
338 }
339 
340 //______________________________________________________________________________
341 inline void TBufferFile::WriteULong64(ULong64_t ll)
342 {
343  if (fBufCur + sizeof(ULong64_t) > fBufMax) AutoExpand(fBufSize+sizeof(ULong64_t));
344  tobuf(fBufCur, (Long64_t)ll);
345 }
346 
347 //______________________________________________________________________________
348 inline void TBufferFile::WriteFloat(Float_t f)
349 {
350  if (fBufCur + sizeof(Float_t) > fBufMax) AutoExpand(fBufSize+sizeof(Float_t));
351  tobuf(fBufCur, f);
352 }
353 
354 //______________________________________________________________________________
355 inline void TBufferFile::WriteDouble(Double_t d)
356 {
357  if (fBufCur + sizeof(Double_t) > fBufMax) AutoExpand(fBufSize+sizeof(Double_t));
358  tobuf(fBufCur, d);
359 }
360 
361 //______________________________________________________________________________
362 inline void TBufferFile::WriteCharP(const Char_t *c)
363 {
364  WriteString(c);
365 }
366 
367 //______________________________________________________________________________
368 inline void TBufferFile::ReadBool(Bool_t &b)
369 {
370  frombuf(fBufCur, &b);
371 }
372 
373 //______________________________________________________________________________
374 inline void TBufferFile::ReadChar(Char_t &c)
375 {
376  frombuf(fBufCur, &c);
377 }
378 
379 //______________________________________________________________________________
380 inline void TBufferFile::ReadUChar(UChar_t &c)
381 {
382  TBufferFile::ReadChar((Char_t &)c);
383 }
384 
385 //______________________________________________________________________________
386 inline void TBufferFile::ReadShort(Short_t &h)
387 {
388  frombuf(fBufCur, &h);
389 }
390 
391 //______________________________________________________________________________
392 inline void TBufferFile::ReadUShort(UShort_t &h)
393 {
394  TBufferFile::ReadShort((Short_t &)h);
395 }
396 
397 //______________________________________________________________________________
398 inline void TBufferFile::ReadInt(Int_t &i)
399 {
400  frombuf(fBufCur, &i);
401 }
402 
403 //______________________________________________________________________________
404 inline void TBufferFile::ReadUInt(UInt_t &i)
405 {
406  TBufferFile::ReadInt((Int_t &)i);
407 }
408 
409 
410 // in implementation file because special case with old version
411 //______________________________________________________________________________
412 //inline void TBufferFile::ReadLong(Long_t &ll)
413 //{
414 // frombuf(fBufCur, &ll);
415 //}
416 
417 //______________________________________________________________________________
418 inline void TBufferFile::ReadULong(ULong_t &ll)
419 {
420  TBufferFile::ReadLong((Long_t&)ll);
421 }
422 
423 
424 //______________________________________________________________________________
425 inline void TBufferFile::ReadLong64(Long64_t &ll)
426 {
427  frombuf(fBufCur, &ll);
428 }
429 
430 //______________________________________________________________________________
431 inline void TBufferFile::ReadULong64(ULong64_t &ll)
432 {
433  TBufferFile::ReadLong64((Long64_t &)ll);
434 }
435 
436 //______________________________________________________________________________
437 inline void TBufferFile::ReadFloat(Float_t &f)
438 {
439  frombuf(fBufCur, &f);
440 }
441 
442 //______________________________________________________________________________
443 inline void TBufferFile::ReadDouble(Double_t &d)
444 {
445  frombuf(fBufCur, &d);
446 }
447 
448 //______________________________________________________________________________
449 inline void TBufferFile::ReadCharP(Char_t *c)
450 {
451  ReadString(c, -1);
452 }
453 
454 //______________________________________________________________________________
455 inline Int_t TBufferFile::ReadArray(UChar_t *&c)
456  { return TBufferFile::ReadArray((Char_t *&)c); }
457 //______________________________________________________________________________
458 inline Int_t TBufferFile::ReadArray(UShort_t *&h)
459  { return TBufferFile::ReadArray((Short_t *&)h); }
460 //______________________________________________________________________________
461 inline Int_t TBufferFile::ReadArray(UInt_t *&i)
462  { return TBufferFile::ReadArray((Int_t *&)i); }
463 //______________________________________________________________________________
464 inline Int_t TBufferFile::ReadArray(ULong_t *&l)
465  { return TBufferFile::ReadArray((Long_t *&)l); }
466 //______________________________________________________________________________
467 inline Int_t TBufferFile::ReadArray(ULong64_t *&ll)
468  { return TBufferFile::ReadArray((Long64_t *&)ll); }
469 
470 //______________________________________________________________________________
471 inline Int_t TBufferFile::ReadStaticArray(UChar_t *c)
472  { return TBufferFile::ReadStaticArray((Char_t *)c); }
473 //______________________________________________________________________________
474 inline Int_t TBufferFile::ReadStaticArray(UShort_t *h)
475  { return TBufferFile::ReadStaticArray((Short_t *)h); }
476 //______________________________________________________________________________
477 inline Int_t TBufferFile::ReadStaticArray(UInt_t *i)
478  { return TBufferFile::ReadStaticArray((Int_t *)i); }
479 //______________________________________________________________________________
480 inline Int_t TBufferFile::ReadStaticArray(ULong_t *l)
481  { return TBufferFile::ReadStaticArray((Long_t *)l); }
482 //______________________________________________________________________________
483 inline Int_t TBufferFile::ReadStaticArray(ULong64_t *ll)
484  { return TBufferFile::ReadStaticArray((Long64_t *)ll); }
485 
486 //______________________________________________________________________________
487 inline void TBufferFile::ReadFastArray(UChar_t *c, Int_t n)
488  { TBufferFile::ReadFastArray((Char_t *)c, n); }
489 //______________________________________________________________________________
490 inline void TBufferFile::ReadFastArray(UShort_t *h, Int_t n)
491  { TBufferFile::ReadFastArray((Short_t *)h, n); }
492 //______________________________________________________________________________
493 inline void TBufferFile::ReadFastArray(UInt_t *i, Int_t n)
494  { TBufferFile::ReadFastArray((Int_t *)i, n); }
495 //______________________________________________________________________________
496 inline void TBufferFile::ReadFastArray(ULong_t *l, Int_t n)
497  { TBufferFile::ReadFastArray((Long_t *)l, n); }
498 //______________________________________________________________________________
499 inline void TBufferFile::ReadFastArray(ULong64_t *ll, Int_t n)
500  { TBufferFile::ReadFastArray((Long64_t *)ll, n); }
501 
502 //______________________________________________________________________________
503 inline void TBufferFile::WriteArray(const UChar_t *c, Int_t n)
504  { TBufferFile::WriteArray((const Char_t *)c, n); }
505 //______________________________________________________________________________
506 inline void TBufferFile::WriteArray(const UShort_t *h, Int_t n)
507  { TBufferFile::WriteArray((const Short_t *)h, n); }
508 //______________________________________________________________________________
509 inline void TBufferFile::WriteArray(const UInt_t *i, Int_t n)
510  { TBufferFile::WriteArray((const Int_t *)i, n); }
511 //______________________________________________________________________________
512 inline void TBufferFile::WriteArray(const ULong64_t *ll, Int_t n)
513  { TBufferFile::WriteArray((const Long64_t *)ll, n); }
514 
515 //______________________________________________________________________________
516 inline void TBufferFile::WriteFastArray(const UChar_t *c, Int_t n)
517  { TBufferFile::WriteFastArray((const Char_t *)c, n); }
518 //______________________________________________________________________________
519 inline void TBufferFile::WriteFastArray(const UShort_t *h, Int_t n)
520  { TBufferFile::WriteFastArray((const Short_t *)h, n); }
521 //______________________________________________________________________________
522 inline void TBufferFile::WriteFastArray(const UInt_t *i, Int_t n)
523  { TBufferFile::WriteFastArray((const Int_t *)i, n); }
524 //______________________________________________________________________________
525 inline void TBufferFile::WriteFastArray(const ULong64_t *ll, Int_t n)
526  { TBufferFile::WriteFastArray((const Long64_t *)ll, n); }
527 
528 #endif