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