8 #include "TStreamerInfo.h"
12 #include "TBufferFile.h"
104 arraySize(o.arraySize),
105 paramType(o.paramType),
106 basicType(o.basicType),
107 bytesPerValue(o.bytesPerValue),
108 classVersion(o.classVersion),
110 streamerInfoSize(o.streamerInfoSize)
122 arraySize(sizeof(Int_t)),
125 bytesPerValue(sizeof(Int_t)),
138 arraySize(sizeof(Float_t)),
139 paramType(
"Float_t"),
141 bytesPerValue(sizeof(Float_t)),
154 arraySize(sizeof(Double_t)),
155 paramType(
"Double_t"),
157 bytesPerValue(sizeof(Double_t)),
170 arraySize(sizeof(Int_t)*nValues),
173 bytesPerValue(sizeof(Int_t)),
187 arraySize(sizeof(Float_t)*nValues),
188 paramType(
"Float_t"),
190 bytesPerValue(sizeof(Float_t)),
203 arraySize(sizeof(Double_t)*nValues),
204 paramType(
"Double_t"),
206 bytesPerValue(sizeof(Double_t)),
219 arraySize(strlen(value)),
222 bytesPerValue(sizeof(Char_t)),
236 arraySize(sizeof(Char_t)*nValues),
239 bytesPerValue(sizeof(Char_t)),
252 arraySize(sizeof(UChar_t)*nValues),
253 paramType(
"UChar_t"),
255 bytesPerValue(sizeof(UChar_t)),
288 if (strcmp(t,
"Char_t")==0) {
291 }
else if (strcmp(t,
"Int_t")==0) {
294 }
else if (strcmp(t,
"Float_t")==0) {
297 }
else if (strcmp(t,
"Double_t")==0) {
300 }
else if (strcmp(t,
"Text_t")==0) {
370 std::cout<<GetName()<<
": ";
372 std::cout<<
"\n Class Type: "<<
paramType.Data()<<
"\n Class Version: "
374 }
else if (strcmp(
paramType,
"Text_t")==0) {
376 val.ReplaceAll(
"\n",
"\n ");
377 std::cout<<
paramType<<
"\n "<<val.Data()<<std::endl;
383 std::cout<<
paramType<<
" array, nValues: "<<nParams<<
"\n ";
388 }
else if (strcmp(
paramType,
"Int_t")==0) {
391 }
else if (strcmp(
paramType,
"Float_t")==0) {
394 }
else if (strcmp(
paramType,
"Double_t")==0) {
411 std::cout<<val[
k]<<
" ";
419 std::cout<<std::endl;
426 paramList(new TList()),
527 if (!obj) {
return; }
531 TFile* filesave=gFile;
534 const Int_t bufsize=10000;
536 TBufferFile*
buffer=
new TBufferFile(TBuffer::kWrite,bufsize);
538 buffer->SetParent(paramFile);
539 buffer->MapObject(obj);
540 obj->Streamer(*buffer);
541 Int_t len=buffer->Length();
542 Char_t* buf=
new char[len];
543 memcpy(buf,buffer->Buffer(),len);
545 TArrayC* fClassIndex=paramFile->GetClassIndex();
546 if (fClassIndex&&fClassIndex->fArray[0] != 0) {
547 TIter next(gROOT->GetListOfStreamerInfo());
550 while ((info=(TStreamerInfo*)next())) {
551 Int_t uid=info->GetNumber();
552 if (fClassIndex->fArray[uid]) { list.Add(info); }
554 if (list.GetSize()>0) {
556 fClassIndex->fArray[0]=2;
558 TBufferFile* infoBuffer=
new TBufferFile(TBuffer::kWrite,bufsize);
560 infoBuffer->MapObject(&list);
561 list.Streamer(*infoBuffer);
562 Int_t infolen=infoBuffer->Length();
563 Char_t* infobuf=
new char[infolen];
564 memcpy(infobuf,infoBuffer->Buffer(),infolen);
571 fClassIndex->fArray[0]=0;
590 if (value==0) {
return kFALSE; }
612 if (values==0) {
return kFALSE; }
635 if (values==0) {
return kFALSE; }
659 if (values==0) {
return kFALSE; }
683 if (values==0) {
return kFALSE; }
706 if (value==0) {
return kFALSE; }
711 if (value->GetSize()!=
n) { value->Set(n); }
724 if (value==0) {
return kFALSE; }
728 if (value->GetSize()!=l) { value->Set(l); }
741 if (value==0) {
return kFALSE; }
746 if (value->GetSize()!=
n) { value->Set(n); }
759 if (value==0) {
return kFALSE; }
764 if (value->GetSize()!=
n) { value->Set(n); }
780 if (values) {
delete values; }
781 values=
new UChar_t[l];
798 if (values) {
delete values; }
816 if (values) {
delete values; }
817 values=
new Float_t[
n];
834 if (values) {
delete values; }
835 values=
new Double_t[
n];
849 if (!obj) {
return 0; }
851 if (o!=0 && strcmp(o->
getParamType(),obj->IsA()->GetName())==0) {
858 TFile* filesave=gFile;
864 buf=
new TBufferFile(TBuffer::kRead,len);
866 buf->SetBufferOffset(0);
868 buf->MapObject(&list);
873 while ((info = (TStreamerInfo*)next())) {
874 if (info->IsA() != TStreamerInfo::Class()) {
884 buf=
new TBufferFile(TBuffer::kRead,len);
886 buf->SetBufferOffset(0);