ROOT  6.06/09
Reference Guide
TBufferSQL.cxx
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Philippe Canal and al. 08/2004
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 /** \class TBufferSQL
13 Implement TBuffer for a SQL backend.
14 */
15 
16 #include <stdio.h>
17 #include "Riostream.h"
18 #include "TError.h"
19 
20 #include "TBasketSQL.h"
21 #include "TBufferSQL.h"
22 #include "TSQLResult.h"
23 #include "TSQLRow.h"
24 #include <stdlib.h>
25 
27 
28 ////////////////////////////////////////////////////////////////////////////////
29 /// Constructor.
30 
31 TBufferSQL::TBufferSQL(TBuffer::EMode mode, std::vector<Int_t> *vc,
32  TString *insert_query, TSQLRow ** r) :
33  TBufferFile(mode),
34  fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r)
35 {
36  fIter = fColumnVec->begin();
37 }
38 
39 ////////////////////////////////////////////////////////////////////////////////
40 /// Constructor.
41 
42 TBufferSQL::TBufferSQL(TBuffer::EMode mode, Int_t bufsiz, std::vector<Int_t> *vc,
43  TString *insert_query, TSQLRow ** r) :
44  TBufferFile(mode,bufsiz),
45  fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r)
46 {
47  fIter = fColumnVec->begin();
48 }
49 
50 ////////////////////////////////////////////////////////////////////////////////
51 /// Constructor.
52 
53 TBufferSQL::TBufferSQL(TBuffer::EMode mode, Int_t bufsiz, std::vector<Int_t> *vc,
54  TString *insert_query, TSQLRow ** r,
55  void *buf, Bool_t adopt) :
56  TBufferFile(mode,bufsiz,buf,adopt),
57  fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r)
58 {
59  fIter = fColumnVec->begin();
60 }
61 
62 ////////////////////////////////////////////////////////////////////////////////
63 /// Constructor.
64 
65 TBufferSQL::TBufferSQL() : TBufferFile(), fColumnVec(0),fInsertQuery(0),fRowPtr(0)
66 {
67 }
68 
69 ////////////////////////////////////////////////////////////////////////////////
70 /// Destructor.
71 
73 {
74  delete fColumnVec;
75 }
76 
77 ////////////////////////////////////////////////////////////////////////////////
78 /// Operator>>
79 
81 {
82  b = (Bool_t)atoi((*fRowPtr)->GetField(*fIter));
83 
84  if (fIter != fColumnVec->end()) ++fIter;
85 }
86 
87 ////////////////////////////////////////////////////////////////////////////////
88 /// Operator>>
89 
91 {
92  c = (Char_t)atoi((*fRowPtr)->GetField(*fIter));
93 
94  if (fIter != fColumnVec->end()) ++fIter;
95 }
96 
97 ////////////////////////////////////////////////////////////////////////////////
98 /// Operator>>
99 
101 {
102  h = (Short_t)atoi((*fRowPtr)->GetField(*fIter));
103 
104  if (fIter != fColumnVec->end()) ++fIter;
105 }
106 
107 ////////////////////////////////////////////////////////////////////////////////
108 /// Operator>>
109 
111 {
112  i = atoi((*fRowPtr)->GetField(*fIter));
113 
114  if (fIter != fColumnVec->end()) ++fIter;
115 }
116 
117 ////////////////////////////////////////////////////////////////////////////////
118 /// Operator>>
119 
121 {
122  f = atof((*fRowPtr)->GetField(*fIter));
123 
124  if (fIter != fColumnVec->end()) ++fIter;
125 }
126 
127 ////////////////////////////////////////////////////////////////////////////////
128 /// Operator>>
129 
131 {
132  l = atol((*fRowPtr)->GetField(*fIter));
133 
134  if (fIter != fColumnVec->end()) ++fIter;
135 }
136 
137 ////////////////////////////////////////////////////////////////////////////////
138 /// Operator>>
139 
141 {
142  d = atof((*fRowPtr)->GetField(*fIter));
143 
144  if (fIter != fColumnVec->end()) ++fIter;
145 }
146 
147 ////////////////////////////////////////////////////////////////////////////////
148 /// Operator<<
149 
151 {
152  (*fInsertQuery) += b;
153  (*fInsertQuery) += ",";
154  if (fIter != fColumnVec->end()) ++fIter;
155 }
156 
157 ////////////////////////////////////////////////////////////////////////////////
158 /// Operator<<
159 
161 {
162  (*fInsertQuery) += c;
163  (*fInsertQuery) += ",";
164  if (fIter != fColumnVec->end()) ++fIter;
165 }
166 
167 ////////////////////////////////////////////////////////////////////////////////
168 /// Operator<<
169 
171 {
172  (*fInsertQuery) += h;
173  (*fInsertQuery) += ",";
174  if (fIter != fColumnVec->end()) ++fIter;
175 }
176 
177 ////////////////////////////////////////////////////////////////////////////////
178 /// Operator<<
179 
181 {
182  (*fInsertQuery) += i;
183  (*fInsertQuery) += ",";
184  if (fIter != fColumnVec->end()) ++fIter;
185 }
186 
187 ////////////////////////////////////////////////////////////////////////////////
188 /// Operator<<
189 
191 {
192  (*fInsertQuery) += l;
193  (*fInsertQuery) += ",";
194  if (fIter != fColumnVec->end()) ++fIter;
195 }
196 
197 ////////////////////////////////////////////////////////////////////////////////
198 /// Operator<<
199 
201 {
202  (*fInsertQuery) += f;
203  (*fInsertQuery) += ",";
204  if (fIter != fColumnVec->end()) ++fIter;
205 }
206 
207 ////////////////////////////////////////////////////////////////////////////////
208 /// Operator<<
209 
211 {
212  (*fInsertQuery) += d;
213  (*fInsertQuery) += ",";
214  if (fIter != fColumnVec->end()) ++fIter;
215 }
216 
217 ////////////////////////////////////////////////////////////////////////////////
218 /// Operator>>
219 
221 {
222  uc = (UChar_t)atoi((*fRowPtr)->GetField(*fIter));
223 
224  if (fIter != fColumnVec->end()) ++fIter;
225 }
226 
227 ////////////////////////////////////////////////////////////////////////////////
228 /// Operator>>
229 
231 {
232  us = (UShort_t)atoi((*fRowPtr)->GetField(*fIter));
233 
234  if (fIter != fColumnVec->end()) ++fIter;
235 }
236 
237 ////////////////////////////////////////////////////////////////////////////////
238 /// Operator>>
239 
241 {
242  TString val = (*fRowPtr)->GetField(*fIter);
243  Int_t code = sscanf(val.Data(), "%u",&ui);
244  if(code == 0) Error("operator>>(UInt_t&)","Error reading UInt_t");
245 
246  if (fIter != fColumnVec->end()) ++fIter;
247 }
248 
249 ////////////////////////////////////////////////////////////////////////////////
250 /// Operator>>
251 
253 {
254  TString val = (*fRowPtr)->GetField(*fIter);
255  Int_t code = sscanf(val.Data(), "%lu",&ul);
256  if(code == 0) Error("operator>>(ULong_t&)","Error reading ULong_t");
257 
258  if (fIter != fColumnVec->end()) ++fIter;
259 }
260 
261 ////////////////////////////////////////////////////////////////////////////////
262 /// Operator>>
263 
265 {
266  TString val = (*fRowPtr)->GetField(*fIter);
267  Int_t code = sscanf(val.Data(), "%lld",&ll);
268  if(code == 0) Error("operator>>(ULong_t&)","Error reading Long64_t");
269 
270  if (fIter != fColumnVec->end()) ++fIter;
271 }
272 
273 ////////////////////////////////////////////////////////////////////////////////
274 /// Operator>>
275 
277 {
278  TString val = (*fRowPtr)->GetField(*fIter);
279  Int_t code = sscanf(val.Data(), "%llu",&ull);
280  if(code == 0) Error("operator>>(ULong_t&)","Error reading ULong64_t");
281 
282  if (fIter != fColumnVec->end()) ++fIter;
283 }
284 
285 ////////////////////////////////////////////////////////////////////////////////
286 /// Operator>>
287 
289 {
290  strcpy(str,(*fRowPtr)->GetField(*fIter)); // Legacy interface, we have no way to know the user's buffer size ....
291  if (fIter != fColumnVec->end()) ++fIter;
292 }
293 
294 ////////////////////////////////////////////////////////////////////////////////
295 /// Read a TString
296 
298 {
300 }
301 
302 ////////////////////////////////////////////////////////////////////////////////
303 /// Write a TString
304 
306 {
308 }
309 
310 ////////////////////////////////////////////////////////////////////////////////
311 /// Read a std::string
312 
313 void TBufferSQL::ReadStdString(std::string &s)
314 {
316 }
317 
318 ////////////////////////////////////////////////////////////////////////////////
319 /// Write a std::string
320 
321 void TBufferSQL::WriteStdString(const std::string &s)
322 {
324 }
325 
326 // Method to send to database.
327 
328 ////////////////////////////////////////////////////////////////////////////////
329 /// Operator<<
330 
332 {
333  (*fInsertQuery) += uc;
334  (*fInsertQuery) += ",";
335  ++fIter;
336 }
337 
338 ////////////////////////////////////////////////////////////////////////////////
339 /// Operator<<
340 
342 {
343  (*fInsertQuery) += us;
344  (*fInsertQuery) += ",";
345  ++fIter;
346 }
347 
348 ////////////////////////////////////////////////////////////////////////////////
349 /// Operator<<
350 
352 {
353  (*fInsertQuery) += ui;
354  (*fInsertQuery) += ",";
355  ++fIter;
356 }
357 
358 ////////////////////////////////////////////////////////////////////////////////
359 /// Operator<<
360 
362 {
363  (*fInsertQuery) += ul;
364  (*fInsertQuery) += ",";
365  ++fIter;
366 }
367 
368 ////////////////////////////////////////////////////////////////////////////////
369 /// Operator<<
370 
372 {
373  (*fInsertQuery) += ll;
374  (*fInsertQuery) += ",";
375  ++fIter;
376 }
377 
378 ////////////////////////////////////////////////////////////////////////////////
379 /// Operator<<
380 
382 {
383  (*fInsertQuery) += ull;
384  (*fInsertQuery) += ",";
385  ++fIter;
386 }
387 
388 ////////////////////////////////////////////////////////////////////////////////
389 /// Operator<<
390 
392 {
393  (*fInsertQuery) += "\"";
394  (*fInsertQuery) += str;
395  (*fInsertQuery) += "\",";
396  ++fIter;
397 }
398 
399 ////////////////////////////////////////////////////////////////////////////////
400 /// WriteFastArray SQL implementation.
401 
403 {
404  for(int i=0; i<n; ++i) {
405  (*fInsertQuery) += b[i];
406  (*fInsertQuery) += ",";
407  ++fIter;
408  }
409 }
410 
411 ////////////////////////////////////////////////////////////////////////////////
412 /// WriteFastArray SQL implementation.
413 
415 {
416  for(int i=0; i<n; ++i) {
417  (*fInsertQuery) += (Short_t)c[i];
418  (*fInsertQuery) += ",";
419  ++fIter;
420  }
421 }
422 
423 ////////////////////////////////////////////////////////////////////////////////
424 /// WriteFastArray SQL implementation.
425 
427 {
428  (*fInsertQuery) += "\"";
429  (*fInsertQuery) += c;
430  (*fInsertQuery) += "\",";
431  ++fIter;
432 }
433 
434 ////////////////////////////////////////////////////////////////////////////////
435 /// WriteFastArray SQL implementation.
436 
438 {
439  for(int i=0; i<n; ++i) {
440  (*fInsertQuery) += uc[i];
441  (*fInsertQuery) += ",";
442  ++fIter;
443  }
444 }
445 
446 ////////////////////////////////////////////////////////////////////////////////
447 /// WriteFastArray SQL implementation.
448 
450 {
451  for(int i=0; i<n; ++i) {
452  (*fInsertQuery) += h[i];
453  (*fInsertQuery) += ",";
454  ++fIter;
455  }
456 }
457 
458 ////////////////////////////////////////////////////////////////////////////////
459 /// WriteFastArray SQL implementation.
460 
462 {
463  for(int i=0; i<n; ++i) {
464  (*fInsertQuery) += us[i];
465  (*fInsertQuery) += ",";
466  ++fIter;
467  }
468 }
469 
470 ////////////////////////////////////////////////////////////////////////////////
471 /// WriteFastArray SQL implementation.
472 
474 {
475  // std::cerr << "Column: " <<*fIter << " i:" << *ii << std::endl;
476  for(int i=0; i<n; ++i) {
477  (*fInsertQuery) += ii[i];
478  (*fInsertQuery) += ",";
479  ++fIter;
480  }
481 }
482 
483 ////////////////////////////////////////////////////////////////////////////////
484 /// WriteFastArray SQL implementation.
485 
487 {
488  for(int i=0; i<n; ++i) {
489  (*fInsertQuery) += ui[i];
490  (*fInsertQuery) += ",";
491  ++fIter;
492  }
493 }
494 
495 ////////////////////////////////////////////////////////////////////////////////
496 /// WriteFastArray SQL implementation.
497 
499 {
500  for(int i=0; i<n; ++i) {
501  (*fInsertQuery)+= l[i];
502  (*fInsertQuery)+= ",";
503  ++fIter;
504  }
505 }
506 
507 ////////////////////////////////////////////////////////////////////////////////
508 /// WriteFastArray SQL implementation.
509 
511 {
512  for(int i=0; i<n; ++i) {
513  (*fInsertQuery) += ul[i];
514  (*fInsertQuery) += ",";
515  ++fIter;
516  }
517 }
518 
519 ////////////////////////////////////////////////////////////////////////////////
520 /// WriteFastArray SQL implementation.
521 
523 {
524  for(int i=0; i<n; ++i) {
525  (*fInsertQuery) += l[i];
526  (*fInsertQuery) += ",";
527  ++fIter;
528  }
529 }
530 
531 ////////////////////////////////////////////////////////////////////////////////
532 /// WriteFastArray SQL implementation.
533 
535 {
536  for(int i=0; i<n; ++i) {
537  (*fInsertQuery) += ul[i];
538  (*fInsertQuery) += ",";
539  ++fIter;
540  }
541 }
542 
543 ////////////////////////////////////////////////////////////////////////////////
544 /// WriteFastArray SQL implementation.
545 
547 {
548  for(int i=0; i<n; ++i) {
549  (*fInsertQuery) += f[i];
550  (*fInsertQuery) += ",";
551  ++fIter;
552  }
553 }
554 
555 ////////////////////////////////////////////////////////////////////////////////
556 /// WriteFastArray SQL implementation.
557 
559 {
560  for(int i=0; i<n; ++i) {
561  (*fInsertQuery) += d[i];
562  (*fInsertQuery )+= ",";
563  ++fIter;
564  }
565 }
566 
567 ////////////////////////////////////////////////////////////////////////////////
568 /// WriteFastArray SQL implementation.
569 
571 {
572  Fatal("riteFastArray(void*, const TClass*, Int_t, TMemberStreamer *)","Not implemented yet");
573 }
574 
575 ////////////////////////////////////////////////////////////////////////////////
576 /// WriteFastArray SQL implementation.
577 
579 {
580  Fatal("WriteFastArray(void **, const TClass*, Int_t, Bool_t, TMemberStreamer*)","Not implemented yet");
581  return 0;
582 }
583 
584 ////////////////////////////////////////////////////////////////////////////////
585 /// ReadFastArray SQL implementation.
586 
588 {
589  for(int i=0; i<n; ++i) {
590  b[i] = (Bool_t)atoi((*fRowPtr)->GetField(*fIter));
591  ++fIter;
592  }
593 }
594 
595 ////////////////////////////////////////////////////////////////////////////////
596 /// ReadFastArray SQL implementation.
597 
599 {
600  for(int i=0; i<n; ++i) {
601  c[i] = (Char_t)atoi((*fRowPtr)->GetField(*fIter));
602  ++fIter;
603  }
604 }
605 
606 ////////////////////////////////////////////////////////////////////////////////
607 /// ReadFastArray SQL implementation.
608 
610 {
611  strcpy(c,((*fRowPtr)->GetField(*fIter)));
612  ++fIter;
613 }
614 
615 ////////////////////////////////////////////////////////////////////////////////
616 /// ReadFastArray SQL implementation.
617 
619 {
620  for(int i=0; i<n; ++i) {
621  uc[i] = (UChar_t)atoi((*fRowPtr)->GetField(*fIter));
622  ++fIter;
623  }
624 }
625 
626 ////////////////////////////////////////////////////////////////////////////////
627 /// ReadFastArray SQL implementation.
628 
630 {
631  for(int i=0; i<n; ++i) {
632  s[i] = (Short_t)atoi((*fRowPtr)->GetField(*fIter));
633  ++fIter;
634  }
635 }
636 
637 ////////////////////////////////////////////////////////////////////////////////
638 /// ReadFastArray SQL implementation.
639 
641 {
642  for(int i=0; i<n; ++i) {
643  us[i] = (UShort_t)atoi((*fRowPtr)->GetField(*fIter));
644  ++fIter;
645  }
646 }
647 
648 ////////////////////////////////////////////////////////////////////////////////
649 /// ReadFastArray SQL implementation.
650 
652 {
653  for(int i=0; i<n; ++i) {
654  in[i] = atoi((*fRowPtr)->GetField(*fIter));
655  ++fIter;
656  }
657 }
658 
659 ////////////////////////////////////////////////////////////////////////////////
660 /// ReadFastArray SQL implementation.
661 
663 {
664  for(int i=0; i<n; ++i) {
665  ui[i] = atoi((*fRowPtr)->GetField(*fIter));
666  ++fIter;
667  }
668 }
669 
670 ////////////////////////////////////////////////////////////////////////////////
671 /// ReadFastArray SQL implementation.
672 
674 {
675  for(int i=0; i<n; ++i) {
676  l[i] = atol((*fRowPtr)->GetField(*fIter));
677  ++fIter;
678  }
679 }
680 
681 ////////////////////////////////////////////////////////////////////////////////
682 /// ReadFastArray SQL implementation.
683 
685 {
686  for(int i=0; i<n; ++i) {
687  (*this) >> ul[i];
688  }
689 }
690 
691 ////////////////////////////////////////////////////////////////////////////////
692 /// ReadFastArray SQL implementation.
693 
695 {
696  for(int i=0; i<n; ++i) {
697  (*this) >> ll[i];
698  }
699 }
700 
701 ////////////////////////////////////////////////////////////////////////////////
702 /// ReadFastArray SQL implementation.
703 
705 {
706  for(int i=0; i<n; ++i) {
707  (*this) >> ull[i];
708  }
709 }
710 
711 ////////////////////////////////////////////////////////////////////////////////
712 /// ReadFastArray SQL implementation.
713 
715 {
716  for(int i=0; i<n; ++i) {
717  f[i] = atof((*fRowPtr)->GetField(*fIter));
718  ++fIter;
719  }
720 }
721 
722 ////////////////////////////////////////////////////////////////////////////////
723 /// ReadFastArray SQL implementation.
724 
726 {
727  for(int i=0; i<n; ++i) {
728  d[i] = atof((*fRowPtr)->GetField(*fIter));
729  ++fIter;
730  }
731 }
732 
733 ////////////////////////////////////////////////////////////////////////////////
734 /// ReadFastArray SQL implementation.
735 
737 {
738  Fatal("ReadFastArrayFloat16(Float_t *, Int_t , TStreamerElement *)","Not implemented yet");
739 }
740 
741 ////////////////////////////////////////////////////////////////////////////////
742 /// Read array of Float16_t from buffer
743 
744 void TBufferSQL::ReadFastArrayWithFactor(Float_t *, Int_t , Double_t /* factor */, Double_t /* minvalue */)
745 {
746  Fatal("ReadFastArrayWithFactor(Float_t *, Int_t, Double_t, Double_t)","Not implemented yet");
747 }
748 
749 ////////////////////////////////////////////////////////////////////////////////
750 /// Read array of Float16_t from buffer
751 
753 {
754  Fatal("ReadFastArrayWithNbits(Float_t *, Int_t , Int_t )","Not implemented yet");
755 }
756 
757 ////////////////////////////////////////////////////////////////////////////////
758 /// Read array of Double32_t from buffer
759 
760 void TBufferSQL::ReadFastArrayWithFactor(Double_t *, Int_t , Double_t /* factor */, Double_t /* minvalue */)
761 {
762  Fatal("ReadFastArrayWithFactor(Double_t *, Int_t, Double_t, Double_t)","Not implemented yet");
763 }
764 
765 ////////////////////////////////////////////////////////////////////////////////
766 /// Read array of Double32_t from buffer
767 
769 {
770  Fatal("ReadFastArrayWithNbits(Double_t *, Int_t , Int_t )","Not implemented yet");
771 }
772 
773 ////////////////////////////////////////////////////////////////////////////////
774 /// ReadFastArray SQL implementation.
775 
777 {
778  Fatal("ReadFastArrayDouble32(Double_t *, Int_t , TStreamerElement *)","Not implemented yet");
779 }
780 
781 ////////////////////////////////////////////////////////////////////////////////
782 /// ReadFastArray SQL implementation.
783 
784 void TBufferSQL::ReadFastArray(void *, const TClass *, Int_t, TMemberStreamer *, const TClass *)
785 {
786  Fatal("ReadFastArray(void *, const TClass *, Int_t, TMemberStreamer *, const TClass *)","Not implemented yet");
787 }
788 
789 ////////////////////////////////////////////////////////////////////////////////
790 /// ReadFastArray SQL implementation.
791 
793 {
794  Fatal("ReadFastArray(void **, const TClass *, Int_t, Bool_t, TMemberStreamer *, const TClass *)","Not implemented yet");
795 }
796 
797 ////////////////////////////////////////////////////////////////////////////////
798 /// Reset Offset.
799 
801 {
802  fIter = fColumnVec->begin();
803 }
804 
805 #if 0
806 ////////////////////////////////////////////////////////////////////////////////
807 
808 void TBufferSQL::insert_test(const char* dsn, const char* usr,
809  const char* pwd, const TString& tblname)
810 {
811  TString str;
812  TString select = "select * from ";
813  TString sql;
814  TSQLStatement* stmt;
815  sql = select + "ins";
816 
817  con = gSQLDriverManager->GetConnection(dsn,usr,pwd);
818 
819  if(!con)
820  printf("\n\n\nConnection NOT Successful\n\n\n");
821  else
822  printf("\n\n\nConnection Sucessful\n\n\n");
823 
824  stmt = con->CreateStatement(0, odbc::ResultSet::CONCUR_READ_ONLY);
825 
826  ptr = stmt->ExecuteQuery(sql.Data());
827  if(!ptr) printf("No recorSet found!");
828 
829  ptr->Next();
830  ptr->MoveToInsertRow();
831  std::cerr << "IsAfterLast(): " << ptr->IsAfterLast() << std::endl;
832  ptr->UpdateInt(1, 5555);
833  ptr->InsertRow();
834  con->Commit();
835 
836  ptr1 = stmt->ExecuteQuery(sql.Data());
837 
838 }
839 #endif
virtual void ReadLong64(Long64_t &l)
Operator>>
Definition: TBufferSQL.cxx:264
virtual void WriteUShort(UShort_t s)
Operator<<.
Definition: TBufferSQL.cxx:341
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
Definition: TBufferFile.h:51
virtual void WriteUChar(UChar_t c)
Operator<<.
Definition: TBufferSQL.cxx:331
long long Long64_t
Definition: RtypesCore.h:69
Implement TBuffer for a SQL backend.
Definition: TBufferSQL.h:34
float Float_t
Definition: RtypesCore.h:53
static byte * ptr1
Definition: gifdecode.c:16
virtual void ReadTString(TString &s)
Read TString from TBuffer.
virtual void WriteChar(Char_t c)
Operator<<.
Definition: TBufferSQL.cxx:160
unsigned short UShort_t
Definition: RtypesCore.h:36
virtual void ReadStdString(std::string &s)
Read a std::string.
Definition: TBufferSQL.cxx:313
TH1 * h
Definition: legend2.C:5
virtual void WriteCharP(const Char_t *c)
Operator<<.
Definition: TBufferSQL.cxx:391
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void ResetOffset()
Reset Offset.
Definition: TBufferSQL.cxx:800
virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue)
Read array of Float16_t from buffer.
Definition: TBufferSQL.cxx:744
virtual void WriteShort(Short_t s)
Operator<<.
Definition: TBufferSQL.cxx:170
virtual void ReadUChar(UChar_t &c)
Operator>>
Definition: TBufferSQL.cxx:220
std::vector< Int_t >::const_iterator fIter
Definition: TBufferSQL.h:37
const char * Data() const
Definition: TString.h:349
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Definition: TObject.cxx:946
virtual void ReadLong(Long_t &l)
Operator>>
Definition: TBufferSQL.cxx:130
virtual void ReadChar(Char_t &c)
Operator>>
Definition: TBufferSQL.cxx:90
virtual void ReadCharP(Char_t *c)
Operator>>
Definition: TBufferSQL.cxx:288
virtual void ReadInt(Int_t &i)
Operator>>
Definition: TBufferSQL.cxx:110
virtual void ReadUShort(UShort_t &s)
Operator>>
Definition: TBufferSQL.cxx:230
virtual void ReadFloat(Float_t &f)
Operator>>
Definition: TBufferSQL.cxx:120
virtual void WriteStdString(const std::string &s)
Write a std::string.
Definition: TBufferSQL.cxx:321
virtual void WriteFastArray(const Bool_t *b, Int_t n)
WriteFastArray SQL implementation.
Definition: TBufferSQL.cxx:402
virtual void WriteFastArrayString(const Char_t *c, Int_t n)
WriteFastArray SQL implementation.
Definition: TBufferSQL.cxx:426
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:918
virtual void ReadTString(TString &s)
Read a TString.
Definition: TBufferSQL.cxx:297
virtual void WriteTString(const TString &s)
Write TString to TBuffer.
virtual void WriteFloat(Float_t f)
Operator<<.
Definition: TBufferSQL.cxx:200
ROOT::R::TRInterface & r
Definition: Object.C:4
virtual void ReadStdString(std::string &s)
Read std::string from TBuffer.
virtual void ReadShort(Short_t &s)
Operator>>
Definition: TBufferSQL.cxx:100
TBufferSQL()
Constructor.
Definition: TBufferSQL.cxx:65
virtual void WriteInt(Int_t i)
Operator<<.
Definition: TBufferSQL.cxx:180
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void WriteLong(Long_t l)
Operator<<.
Definition: TBufferSQL.cxx:190
std::vector< Int_t > * fColumnVec
Definition: TBufferSQL.h:39
short Short_t
Definition: RtypesCore.h:35
TLine * l
Definition: textangle.C:4
virtual void WriteLong64(Long64_t l)
Operator<<.
Definition: TBufferSQL.cxx:371
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
virtual void ReadFastArray(Bool_t *, Int_t)
ReadFastArray SQL implementation.
Definition: TBufferSQL.cxx:587
ClassImp(TBufferSQL)
long Long_t
Definition: RtypesCore.h:50
virtual void ReadULong(ULong_t &l)
Operator>>
Definition: TBufferSQL.cxx:252
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0)
ReadFastArray SQL implementation.
Definition: TBufferSQL.cxx:736
double f(double x)
virtual void WriteBool(Bool_t b)
Operator<<.
Definition: TBufferSQL.cxx:150
double Double_t
Definition: RtypesCore.h:55
virtual void ReadUInt(UInt_t &i)
Operator>>
Definition: TBufferSQL.cxx:240
unsigned long long ULong64_t
Definition: RtypesCore.h:70
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
unsigned long ULong_t
Definition: RtypesCore.h:51
virtual void ReadFastArrayString(Char_t *, Int_t)
ReadFastArray SQL implementation.
Definition: TBufferSQL.cxx:609
virtual void WriteUInt(UInt_t i)
Operator<<.
Definition: TBufferSQL.cxx:351
~TBufferSQL()
Destructor.
Definition: TBufferSQL.cxx:72
char Char_t
Definition: RtypesCore.h:29
virtual void WriteULong(ULong_t l)
Operator<<.
Definition: TBufferSQL.cxx:361
virtual void ReadDouble(Double_t &d)
Operator>>
Definition: TBufferSQL.cxx:140
virtual void WriteDouble(Double_t d)
Operator<<.
Definition: TBufferSQL.cxx:210
virtual void WriteStdString(const std::string &s)
Write std::string to TBuffer.
virtual void WriteULong64(ULong64_t l)
Operator<<.
Definition: TBufferSQL.cxx:381
virtual void WriteTString(const TString &s)
Write a TString.
Definition: TBufferSQL.cxx:305
virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits)
Read array of Float16_t from buffer.
Definition: TBufferSQL.cxx:752
virtual void ReadBool(Bool_t &b)
Operator>>
Definition: TBufferSQL.cxx:80
unsigned char UChar_t
Definition: RtypesCore.h:34
virtual void ReadULong64(ULong64_t &l)
Operator>>
Definition: TBufferSQL.cxx:276
const Int_t n
Definition: legend1.C:16
virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0)
ReadFastArray SQL implementation.
Definition: TBufferSQL.cxx:776