StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMatrix.cc
1 #include "StMatrix.hh"
2 #ifdef __ROOT__
3 #include "TBuffer.h"
4 #include "TClass.h"
5 ClassImpT(StMatrix,float);
6 //________________________________________________________________________________
7 template <> void StMatrix<float>::Streamer(TBuffer &R__b)
8 {
9  if (R__b.IsReading()) {
10  UInt_t R__s, R__c;
11  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
12  if (R__v > 2){Class()->ReadBuffer(R__b, this, R__v, R__s, R__c); return;}
13  if (mElement) delete [] mElement;
14  mElement = 0;
15  R__b.ReadArray(mElement); // allocates memory if mElement = 0
16  R__b >> mRow;
17  R__b >> mCol;
18  R__b >> mSize;
19  }
20  else Class()->WriteBuffer(R__b,this);
21 }
22 //________________________________________________________________________________
23 template <> void StMatrix<double>::Streamer(TBuffer &R__b)
24 {
25  if (R__b.IsReading()) {
26  UInt_t R__s, R__c;
27  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
28  if (R__v > 2){Class()->ReadBuffer(R__b, this, R__v, R__s, R__c); return;}
29  if (mElement) delete [] mElement;
30  mElement = 0;
31  R__b.ReadArray(mElement); // allocates memory if mElement = 0
32  R__b >> mRow;
33  R__b >> mCol;
34  R__b >> mSize;
35  }
36  else Class()->WriteBuffer(R__b,this);
37 }
38 #endif