Warning, /include/Geant4/tools/wroot/infos is written in an unsupported language. File is not indexed.
0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003
0004 #ifndef tools_wroot_infos
0005 #define tools_wroot_infos
0006
0007 #include "info"
0008
0009 namespace tools {
0010 namespace wroot {
0011
0012 inline void scs(unsigned int& a_cs,const std::string& a_s) {
0013 size_t l = a_s.size();
0014 for(size_t i=0;i<l;i++) a_cs = a_cs*3+a_s[i];
0015 }
0016
0017 inline void acs(unsigned int& a_cs,int a_n,int* a_dims) {
0018 for(int i=0;i<a_n;i++) a_cs = a_cs*3+(unsigned int)a_dims[i];
0019 }
0020
0021 inline void fill_vec(obj_list<streamer_info>& a_infos,const std::string& a_type,streamer__info::Type a_si_type) {
0022 unsigned int check = 196608;
0023 streamer_info* info = new streamer_info(std::string("vector<")+a_type+">",4,check);
0024 a_infos.push_back(info);
0025 info->add(new streamer_STL("This","Used to call the proper TStreamerInfo case",0,a_si_type,std::string("vector<")+a_type+">"));
0026 }
0027
0028 inline int size_VIRTUAL() {return 4;}
0029
0030 inline int size_TObject() {return 12;}
0031 inline int size_TNamed() {return 28;}
0032
0033 inline void fill_infos_core(obj_list<streamer_info>& a_infos,std::ostream& a_out) {
0034
0035 // sizeof(TString) = 8 (4 (virtual ~) + 1 + 3 (align))
0036 // sizeof(TObject) = 12
0037 // sizeof(TNamed) = 28
0038 // sizeof(TObjArray) = 40
0039 // sizeof(TArray) = 8
0040 // sizeof(TArrayI) = 12
0041 // sizeof(TArrayD) = 12
0042 // sizeof(TArrayF) = 12
0043
0044 const int size_POINTER = 4;
0045 //const int size_OBJECT_POINTER = 4;
0046 //const int size_COUNTER = 4;
0047
0048 const int size_TArray = 8;
0049
0050 short TArray_version = 1;
0051
0052 short TObject_version = 1;
0053 {unsigned int check = 0;
0054 //this :
0055 scs(check,"TObject");
0056 //members :
0057 scs(check,"fUniqueID");
0058 scs(check,"UInt_t");
0059
0060 scs(check,"fBits");
0061 scs(check,"UInt_t");
0062
0063 streamer_info* info = new streamer_info("TObject",1,check);
0064 a_infos.push_back(info);
0065 // Elements :
0066 int ofs = size_VIRTUAL();
0067 info->add(new streamer_uint(ofs,"fUniqueID","object unique identifier"));
0068 info->add(new streamer_uint(ofs,"fBits","bit field status word"));
0069 if(ofs!=size_TObject()) {
0070 a_out << "tools::wroot::fill_infos :"
0071 << " TObject " << ofs << " (" << size_TObject() << " expected.)"
0072 << std::endl;
0073 }}
0074
0075 short TNamed_version = 1;
0076 {unsigned int check = 0;
0077 //this :
0078 scs(check,"TNamed");
0079 //base :
0080 scs(check,"TObject");
0081 //members :
0082 scs(check,"fName");
0083 scs(check,"TString");
0084
0085 scs(check,"fTitle");
0086 scs(check,"TString");
0087
0088 streamer_info* info = new streamer_info("TNamed",1,check);
0089 a_infos.push_back(info);
0090 // Elements :
0091 int ofs = 0;
0092 info->add(new streamer_base("TObject","Basic ROOT object",ofs,TObject_version));ofs += size_TObject();
0093 info->add(new streamer_string(ofs,"fName","object identifier"));
0094 info->add(new streamer_string(ofs,"fTitle","object title"));
0095 if(ofs!=size_TNamed()){
0096 a_out << "tools::wroot::fill_infos :"
0097 << " TNamed " << ofs << " (" << size_TNamed() << " expected.)"
0098 << std::endl;
0099 }}
0100
0101 {unsigned int check = 0;
0102 //this :
0103 scs(check,"TStreamerInfo");
0104 //bases :
0105 scs(check,"TNamed");
0106 //members :
0107 scs(check,"fCheckSum");
0108 scs(check,"UInt_t");
0109
0110 scs(check,"fClassVersion");
0111 scs(check,"Int_t");
0112
0113 scs(check,"fElements");
0114 scs(check,"TObjArray*");
0115
0116 streamer_info* info = new streamer_info("TStreamerInfo",2,check);
0117 a_infos.push_back(info);
0118 // Elements :
0119 info->add(new streamer_base("TNamed","The basis for a named object (name, title)",0,TNamed_version));//28
0120 info->add(new streamer_uint("fCheckSum","checksum of original class",28));//4
0121 info->add(new streamer_int("fClassVersion","Class version identifier",32));//4
0122 //40 = 2*int+4*int_p+2*ulong_p+bool+p (bool=4 !)
0123 info->add(new streamer_object_pointer("fElements","Array of TStreamerElements",76,"TObjArray*"));//4
0124
0125 //80
0126 }
0127
0128 short TStreamerElement_version = 2;
0129 {unsigned int check = 0;
0130 //this :
0131 scs(check,"TStreamerElement");
0132 //bases :
0133 scs(check,"TNamed");
0134 //members :
0135 scs(check,"fType");
0136 scs(check,"Int_t");
0137
0138 scs(check,"fSize");
0139 scs(check,"Int_t");
0140
0141 scs(check,"fArrayLength");
0142 scs(check,"Int_t");
0143
0144 scs(check,"fArrayDim");
0145 scs(check,"Int_t");
0146
0147 scs(check,"fMaxIndex");
0148 scs(check,"Int_t");
0149 int dim = 5;
0150 acs(check,1,&dim);
0151
0152 scs(check,"fTypeName");
0153 scs(check,"TString");
0154 //Should be : 2369818458U
0155
0156 streamer_info* info = new streamer_info("TStreamerElement",2,check);
0157 a_infos.push_back(info);
0158 // Elements :
0159 info->add(new streamer_base("TNamed","The basis for a named object (name, title)",0,TNamed_version));
0160 info->add(new streamer_int("fType","element type",28));
0161 info->add(new streamer_int("fSize","sizeof element",32));
0162 info->add(new streamer_int("fArrayLength","cumulative size of all array dims",36));
0163 info->add(new streamer_int("fArrayDim","number of array dimensions",40));
0164
0165 {streamer_element* elem = new streamer_int("fMaxIndex","Maximum array index for array dimension \"dim\"",44);
0166 info->add(elem);
0167 elem->setArrayDimension(1);
0168 elem->setMaxIndex(0,5);}
0169
0170 info->add(new streamer_string("fTypeName","Data type name of data member",72));}
0171
0172 {unsigned int check = 0;
0173 //this :
0174 scs(check,"TStreamerBase");
0175 //bases :
0176 scs(check,"TStreamerElement");
0177 //members :
0178 scs(check,"fBaseVersion");
0179 scs(check,"Int_t");
0180 //Should be : 2671078514U
0181
0182 streamer_info* info = new streamer_info("TStreamerBase",3,check);
0183 a_infos.push_back(info);
0184 // Elements :
0185 info->add(new streamer_base("TStreamerElement","base class for one element (data member) to be Streamed",0,TStreamerElement_version));
0186 info->add(new streamer_int("fBaseVersion","version number of the base class",88));}
0187
0188 {unsigned int check = 0;
0189 //this :
0190 scs(check,"TStreamerString");
0191 //bases :
0192 scs(check,"TStreamerElement");
0193 //Should be : 2525579865U
0194
0195 streamer_info* info = new streamer_info("TStreamerString",2,check);
0196 a_infos.push_back(info);
0197 // Elements :
0198 info->add(new streamer_base("TStreamerElement","base class for one element (data member) to be Streamed",0,TStreamerElement_version));}
0199
0200 {unsigned int check = 0;
0201 //this :
0202 scs(check,"TStreamerBasicType");
0203 //bases :
0204 scs(check,"TStreamerElement");
0205 //Should be : 3001875966U;
0206
0207 streamer_info* info = new streamer_info("TStreamerBasicType",2,check);
0208 a_infos.push_back(info);
0209 // Elements :
0210 info->add(new streamer_base("TStreamerElement","base class for one element (data member) to be Streamed",0,TStreamerElement_version));}
0211
0212 {unsigned int check = 0;
0213 //this :
0214 scs(check,"TStreamerBasicPointer");
0215 //bases :
0216 scs(check,"TStreamerElement");
0217 //members :
0218 scs(check,"fCountVersion");
0219 scs(check,"Int_t");
0220
0221 scs(check,"fCountName");
0222 scs(check,"TString");
0223
0224 scs(check,"fCountClass");
0225 scs(check,"TString");
0226 //Should be : 1587298059U
0227
0228 streamer_info* info = new streamer_info("TStreamerBasicPointer",2,check);
0229 a_infos.push_back(info);
0230 // Elements :
0231 info->add(new streamer_base("TStreamerElement","base class for one element (data member) to be Streamed",0,TStreamerElement_version));
0232 info->add(new streamer_int("fCountVersion","version number of the class with the counter",88));
0233 info->add(new streamer_string("fCountName","name of data member holding the array count",92));
0234 info->add(new streamer_string("fCountClass","name of the class with the counter",100));}
0235
0236 {unsigned int check = 0;
0237 //this :
0238 scs(check,"TStreamerObject");
0239 //bases :
0240 scs(check,"TStreamerElement");
0241 //Should be : 2177456715U
0242
0243 streamer_info* info = new streamer_info("TStreamerObject",2,check);
0244 a_infos.push_back(info);
0245 // Elements :
0246 info->add(new streamer_base("TStreamerElement","base class for one element (data member) to be Streamed",0,TStreamerElement_version));}
0247
0248 {unsigned int check = 0;
0249 //this :
0250 scs(check,"TStreamerObjectPointer");
0251 //bases :
0252 scs(check,"TStreamerElement");
0253 //Should be : 720556968U
0254
0255 streamer_info* info = new streamer_info("TStreamerObjectPointer",2,check);
0256 a_infos.push_back(info);
0257 // Elements :
0258 info->add(new streamer_base("TStreamerElement","base class for one element (data member) to be Streamed",0,TStreamerElement_version));}
0259
0260 {unsigned int check = 0;
0261 //this :
0262 scs(check,"TStreamerObjectAny");
0263 //bases :
0264 scs(check,"TStreamerElement");
0265 //Should be : 3108880127U
0266
0267 streamer_info* info = new streamer_info("TStreamerObjectAny",2,check);
0268 a_infos.push_back(info);
0269 // Elements :
0270 info->add(new streamer_base("TStreamerElement","base class for one element (data member) to be Streamed",0,TStreamerElement_version));}
0271
0272 {unsigned int check = 0;
0273 //this :
0274 scs(check,"TArray");
0275 //members :
0276 scs(check,"fN");
0277 scs(check,"Int_t");
0278
0279 streamer_info* info = new streamer_info("TArray",1,check);
0280 a_infos.push_back(info);
0281
0282 // Elements :
0283 int ofs = 0;
0284 ofs += size_VIRTUAL();
0285 info->add(new streamer_int(ofs,"fN","Number of array elements"));
0286 //size_TArray = ofs; //8
0287 }
0288
0289 {unsigned int check = 0;
0290 //this :
0291 scs(check,"TArrayI");
0292 //base :
0293 scs(check,"TArray");
0294 //members :
0295 scs(check,"fArray");
0296 scs(check,"Int_t*");
0297
0298 streamer_info* info = new streamer_info("TArrayI",1,check);
0299 a_infos.push_back(info);
0300
0301 // Elements :
0302 int offset = 0;
0303 info->add(new streamer_base("TArray","Abstract array base class",offset,TArray_version));offset += size_TArray;
0304 info->add(new streamer_basic_pointer("fArray","[fN] Array of fN integers",offset,streamer__info::INT,"fN","TArray",1,"Int_t*"));offset += size_POINTER;
0305
0306 //12
0307 }
0308
0309 {unsigned int check = 0;
0310 //this :
0311 scs(check,"TArrayD");
0312 //base :
0313 scs(check,"TArray");
0314 //members :
0315 scs(check,"fArray");
0316 scs(check,"Double_t*");
0317
0318 streamer_info* info = new streamer_info("TArrayD",1,check);
0319 a_infos.push_back(info);
0320
0321 // Elements :
0322 int offset = 0;
0323 info->add(new streamer_base("TArray","Abstract array base class",offset,TArray_version));offset += size_TArray; //8
0324 info->add(new streamer_basic_pointer("fArray","[fN] Array of fN integers",offset,streamer__info::DOUBLE,"fN","TArray",1,"Double_t*"));offset += size_POINTER;
0325
0326 //12
0327 }
0328
0329 {unsigned int check = 0;
0330 //this :
0331 scs(check,"TArrayF");
0332 //base :
0333 scs(check,"TArray");
0334 //members :
0335 scs(check,"fArray");
0336 scs(check,"Float_t*");
0337
0338 streamer_info* info = new streamer_info("TArrayF",1,check);
0339 a_infos.push_back(info);
0340
0341 // Elements :
0342 int offset = 0;
0343 info->add(new streamer_base("TArray","Abstract array base class",offset,TArray_version));offset += size_TArray;
0344 info->add(new streamer_basic_pointer("fArray","[fN] Array of fN integers",offset,streamer__info::FLOAT,"fN","TArray",1,"Float_t*"));offset += size_POINTER;
0345
0346 //12
0347 }
0348
0349 fill_vec(a_infos,"char",streamer__info::CHAR);
0350 fill_vec(a_infos,"short",streamer__info::SHORT);
0351 fill_vec(a_infos,"int",streamer__info::INT);
0352 fill_vec(a_infos,"unsigned char",streamer__info::UNSIGNED_CHAR);
0353 fill_vec(a_infos,"unsigned short",streamer__info::UNSIGNED_SHORT);
0354 fill_vec(a_infos,"unsigned int",streamer__info::UNSIGNED_INT);
0355 fill_vec(a_infos,"float",streamer__info::FLOAT);
0356 fill_vec(a_infos,"double",streamer__info::DOUBLE);
0357 fill_vec(a_infos,"bool",streamer__info::BOOL);
0358
0359 }
0360
0361 inline void fill_infos_cont(obj_list<streamer_info>& a_infos,std::ostream&) {
0362
0363 // sizeof(TString) = 8 (4 (virtual ~) + 1 + 3 (align))
0364 // sizeof(TObject) = 12
0365
0366 short TObject_version = 1;
0367
0368 const int size_POINTER = 4;
0369 const int size_BOOL = 4;
0370
0371 int size_TCollection = 0;
0372 short TCollection_version = 3;
0373 {unsigned int check = 0;
0374 //this :
0375 scs(check,"TCollection");
0376 //base :
0377 scs(check,"TObject");
0378 //members :
0379 scs(check,"fName");
0380 scs(check,"TString");
0381
0382 scs(check,"fSize");
0383 scs(check,"Int_t");
0384
0385 streamer_info* info = new streamer_info("TCollection",TCollection_version,check);
0386 a_infos.push_back(info);
0387 // Elements :
0388 int ofs = 0;
0389 info->add(new streamer_base("TObject","Basic ROOT object",ofs,TObject_version));ofs += size_TObject();
0390 info->add(new streamer_string(ofs,"fName","name of the collection"));
0391 info->add(new streamer_int(ofs,"fSize","number of elements in collection"));
0392 size_TCollection = ofs;
0393 }
0394
0395 int size_TSeqCollection = 0;
0396 short TSeqCollection_version = 0;
0397 {unsigned int check = 0;
0398 //this :
0399 scs(check,"TSeqCollection");
0400 //base :
0401 scs(check,"TCollection");
0402 //members :
0403 scs(check,"fSorted");
0404 scs(check,"Bool_t");
0405
0406 streamer_info* info = new streamer_info("TSeqCollection",TSeqCollection_version,check);
0407 a_infos.push_back(info);
0408 // Elements :
0409 int ofs = 0;
0410 info->add(new streamer_base("TCollection","Collection abstract base class",ofs,TCollection_version));ofs += size_TCollection;
0411 info->add(new streamer_bool(ofs,"fSorted"," true if collection has been sorted"));
0412 size_TSeqCollection = ofs;
0413 }
0414
0415 //int size_TList = 0;
0416 short TList_version = 4;
0417 {unsigned int check = 0;
0418 //this :
0419 scs(check,"TList");
0420 //base :
0421 scs(check,"TSeqCollection");
0422 //members :
0423
0424 streamer_info* info = new streamer_info("TList",TList_version,check);
0425 a_infos.push_back(info);
0426 // Elements :
0427 int ofs = 0;
0428 info->add(new streamer_base("TSeqCollection","Sequenceable collection abstract base class",ofs,TSeqCollection_version));ofs += size_TSeqCollection;
0429 ofs += size_POINTER; //!*fFirst
0430 ofs += size_POINTER; //!*fLast
0431 ofs += size_POINTER; //!*fCache
0432 ofs += size_BOOL; //!fAscending
0433 //size_TList = ofs;
0434 }
0435 }
0436
0437 inline int size_TAttLine() {return 10;} //12?
0438 inline int size_TAttFill() {return 8;}
0439 inline int size_TAttMarker() {return 12;}
0440
0441 inline void fill_infos_graf(obj_list<streamer_info>& a_infos,std::ostream& a_out) {
0442
0443 //sizeof(Font_t) = 2
0444 //sizeof(Style_t) = 2
0445 //sizeof(Marker_t) = 2
0446 //sizeof(Width_t) = 2
0447 //sizeof(Size_t) = 4
0448
0449 const int size_SHORT = 2;
0450 const int size_FLOAT = 4;
0451
0452 {unsigned int check = 0;
0453 //this :
0454 scs(check,"TAttLine");
0455 //members :
0456 scs(check,"fLineColor");
0457 scs(check,"Color_t");
0458
0459 scs(check,"fLineStyle");
0460 scs(check,"Style_t");
0461
0462 scs(check,"fLineWidth");
0463 scs(check,"Width_t");
0464
0465 //Should be : 1369587346U
0466
0467 // Beurk ; but the ROOT TTree compells indirectly the below.
0468 streamer_info* info = new streamer_info("TAttLine",1,check);
0469 a_infos.push_back(info);
0470 // Elements :
0471 int ofs = size_VIRTUAL();
0472 info->add(new streamer_basic_type("fLineColor","line color",ofs,streamer__info::SHORT,"Color_t"));ofs += size_SHORT;
0473 info->add(new streamer_basic_type("fLineStyle","line style",ofs,streamer__info::SHORT,"Style_t"));ofs += size_SHORT;
0474 info->add(new streamer_basic_type("fLineWidth","line width",ofs,streamer__info::SHORT,"Width_t"));ofs += size_SHORT;
0475 //2 (alignement ???)
0476 if(ofs!=size_TAttLine()) {
0477 a_out << "tools::wroot::fill_infos :"
0478 << " TAttLine " << ofs << " (" << size_TAttLine() << " expected.)"
0479 << std::endl;
0480 }}
0481
0482 {unsigned int check = 0;
0483 //this :
0484 scs(check,"TAttFill");
0485 //members :
0486 scs(check,"fFillColor");
0487 scs(check,"Color_t");
0488
0489 scs(check,"fFillStyle");
0490 scs(check,"Style_t");
0491
0492 //Should be : 1204118360U
0493 streamer_info* info = new streamer_info("TAttFill",1,check);
0494 a_infos.push_back(info);
0495 // Elements :
0496 int ofs = size_VIRTUAL();
0497 info->add(new streamer_basic_type("fFillColor","fill area color",ofs,streamer__info::SHORT,"Color_t"));ofs += size_SHORT;
0498 info->add(new streamer_basic_type("fFillStyle","fill area style",ofs,streamer__info::SHORT,"Style_t"));ofs += size_SHORT;
0499 if(ofs!=size_TAttFill()) {
0500 a_out << "tools::wroot::fill_infos :"
0501 << " TAttFill " << ofs << " (" << size_TAttFill() << " expected.)"
0502 << std::endl;
0503 }}
0504
0505 {unsigned int check = 0;
0506 //this :
0507 scs(check,"TAttMarker");
0508 //members :
0509 scs(check,"fMarkerColor");
0510 scs(check,"Color_t");
0511
0512 scs(check,"fMarkerStyle");
0513 scs(check,"Style_t");
0514
0515 scs(check,"fMarkerSize");
0516 scs(check,"Size_t");
0517
0518 //Should be 4207747460U
0519
0520 streamer_info* info = new streamer_info("TAttMarker",1,check);
0521 a_infos.push_back(info);
0522 // Elements :
0523 int ofs = size_VIRTUAL();
0524 info->add(new streamer_basic_type("fMarkerColor","Marker color index",ofs,streamer__info::SHORT,"Color_t"));ofs += size_SHORT;
0525 info->add(new streamer_basic_type("fMarkerStyle","Marker style",ofs,streamer__info::SHORT,"Style_t"));ofs += size_SHORT;
0526 info->add(new streamer_basic_type("fMarkerSize","Marker size",ofs,streamer__info::FLOAT,"Size_t"));ofs += size_FLOAT;
0527 if(ofs!=size_TAttMarker()) {
0528 a_out << "tools::wroot::fill_infos :"
0529 << " TAttMarker " << ofs << " (" << size_TAttMarker() << " expected.)"
0530 << std::endl;
0531 }}
0532
0533 }
0534
0535 inline int size_TBranch() {return 264;} //256?
0536 inline int size_TLeaf() {return 60;} //52?
0537 inline int size_TTree() {return 254;} //240?
0538
0539 inline void fill_infos_tree(obj_list<streamer_info>& a_infos,std::ostream& a_out) {
0540
0541 const int size_CHAR = 1;
0542 const int size_INT = 4;
0543 const int size_POINTER = 4;
0544 const int size_COUNTER = 4;
0545
0546 const int size_TObjArray = 40;
0547 const int size_TArrayD = 12;
0548 const int size_TArrayI = 12;
0549
0550 short TNamed_version = 1;
0551
0552 short TAttLine_version = 1;
0553 short TAttFill_version = 1;
0554 short TAttMarker_version = 1;
0555 short TBranch_version = 8;
0556 short TLeaf_version = 2;
0557
0558 {unsigned int check = 0;
0559 //this :
0560 scs(check,"TTree");
0561 //bases :
0562 scs(check,"TNamed");
0563 scs(check,"TAttLine");
0564 scs(check,"TAttFill");
0565 scs(check,"TAttMarker");
0566 //members :
0567 scs(check,"fEntries");
0568 scs(check,"Stat_t");
0569
0570 scs(check,"fTotBytes");
0571 scs(check,"Stat_t");
0572
0573 scs(check,"fZipBytes");
0574 scs(check,"Stat_t");
0575
0576 scs(check,"fSavedBytes");
0577 scs(check,"Stat_t");
0578
0579 scs(check,"fTimerInterval");
0580 scs(check,"Int_t");
0581
0582 scs(check,"fScanField");
0583 scs(check,"Int_t");
0584
0585 scs(check,"fUpdate");
0586 scs(check,"Int_t");
0587
0588 scs(check,"fMaxEntryLoop");
0589 scs(check,"Int_t");
0590
0591 scs(check,"fMaxVirtualSize");
0592 scs(check,"Int_t");
0593
0594 scs(check,"fAutoSave");
0595 scs(check,"Int_t");
0596
0597 scs(check,"fEstimate");
0598 scs(check,"Int_t");
0599
0600 scs(check,"fBranches");
0601 scs(check,"TObjArray");
0602
0603 scs(check,"fLeaves");
0604 scs(check,"TObjArray");
0605
0606 //scs(check,"fAliases");
0607 //scs(check,"TList*");
0608
0609 scs(check,"fIndexValues");
0610 scs(check,"TArrayD");
0611
0612 scs(check,"fIndex");
0613 scs(check,"TArrayI");
0614
0615 //scs(check,"fFriends");
0616 //scs(check,"TList*");
0617 //Should be : 3245044844U //3.00.06
0618 //Should be : FIXME //3.10.02
0619
0620 streamer_info* info = new streamer_info("TTree",5,check);
0621 a_infos.push_back(info);
0622
0623 // Elements :
0624 int ofs = 0;
0625 info->add(new streamer_base("TNamed","The basis for a named object (name, title)",ofs,TNamed_version));ofs += size_TNamed();
0626 info->add(new streamer_base("TAttLine","Line attributes",ofs,TAttLine_version));ofs += size_TAttLine();
0627 info->add(new streamer_base("TAttFill","Fill area attributes",ofs,TAttFill_version));ofs += size_TAttFill();
0628 info->add(new streamer_base("TAttMarker","Marker attributes",ofs,TAttMarker_version));ofs += size_TAttMarker();
0629
0630 info->add(new streamer_stat_t(ofs,"fEntries","Number of entries"));
0631 info->add(new streamer_stat_t(ofs,"fTotBytes","Total number of bytes in all branches before compression"));
0632 info->add(new streamer_stat_t(ofs,"fZipBytes","Total number of bytes in all branches after compression"));
0633 info->add(new streamer_stat_t(ofs,"fSavedBytes","Number of autosaved bytes"));
0634
0635 info->add(new streamer_int(ofs,"fTimerInterval","Timer interval in milliseconds"));
0636 info->add(new streamer_int(ofs,"fScanField","Number of runs before prompting in Scan"));
0637 info->add(new streamer_int(ofs,"fUpdate","Update frequency for EntryLoop"));
0638 info->add(new streamer_int(ofs,"fMaxEntryLoop","Maximum number of entries to process"));
0639 info->add(new streamer_int(ofs,"fMaxVirtualSize","Maximum total size of buffers kept in memory"));
0640 info->add(new streamer_int(ofs,"fAutoSave","Autosave tree when fAutoSave bytes produced"));
0641 info->add(new streamer_int(ofs,"fEstimate","Number of entries to estimate histogram limits"));
0642 ofs += size_INT; //!fChainOffset
0643 ofs += size_INT; //!fReadEntry
0644 ofs += size_INT; //!fTotalBuffers
0645 ofs += size_INT; //!fPacketSize
0646 ofs += size_INT; //!fNfill
0647 ofs += size_POINTER; //!*fDirectory
0648 info->add(new streamer_object("fBranches","List of Branches",ofs,"TObjArray"));ofs += size_TObjArray;
0649 info->add(new streamer_object("fLeaves","Direct pointers to individual branch leaves",ofs,"TObjArray"));ofs += size_TObjArray;
0650 ofs += size_POINTER; //!*fEventList
0651 info->add(new streamer_object_any("fIndexValues","Sorted index values",ofs,"TArrayD"));ofs += size_TArrayD;
0652 info->add(new streamer_object_any("fIndex","Index of sorted values",ofs,"TArrayI"));ofs += size_TArrayI;
0653 ofs += size_POINTER; //!*fPlayer
0654
0655 if(ofs!=size_TTree()) {
0656 a_out << "tools::wroot::fill_infos :"
0657 << " TTree " << ofs << " (" << size_TTree() << " expected.)"
0658 << std::endl;
0659 }
0660
0661 //info->add(new streamer_object_pointer("fAliases","List of aliases for expressions based on the tree branches.",offset,"TList*"));offset += size_OBJECT_POINTER;
0662 //info->add(new streamer_object_pointer("fFriends","pointer to list of friend elements",offset,"TList*"));offset += size_OBJECT_POINTER;
0663 }
0664
0665 //---------------------------------------------------------------------
0666 {unsigned int check = 0;
0667 //this :
0668 scs(check,"TBranch");
0669 //bases :
0670 scs(check,"TNamed");
0671 scs(check,"TAttFill");
0672 //members :
0673 scs(check,"fCompress");
0674 scs(check,"Int_t");
0675
0676 scs(check,"fBasketSize");
0677 scs(check,"Int_t");
0678
0679 scs(check,"fEntryOffsetLen");
0680 scs(check,"Int_t");
0681
0682 scs(check,"fWriteBasket");
0683 scs(check,"Int_t");
0684
0685 scs(check,"fEntryNumber");
0686 scs(check,"Int_t");
0687
0688 scs(check,"fOffset");
0689 scs(check,"Int_t");
0690
0691 scs(check,"fMaxBaskets");
0692 scs(check,"Int_t");
0693
0694 scs(check,"fSplitLevel");
0695 scs(check,"Int_t");
0696
0697 scs(check,"fEntries");
0698 scs(check,"Stat_t");
0699
0700 scs(check,"fTotBytes");
0701 scs(check,"Stat_t");
0702
0703 scs(check,"fZipBytes");
0704 scs(check,"Stat_t");
0705
0706 scs(check,"fBranches");
0707 scs(check,"TObjArray");
0708
0709 scs(check,"fLeaves");
0710 scs(check,"TObjArray");
0711
0712 scs(check,"fBaskets");
0713 scs(check,"TObjArray");
0714
0715 scs(check,"fBasketBytes");
0716 scs(check,"Int_t*");
0717
0718 scs(check,"fBasketEntry");
0719 scs(check,"Int_t*");
0720
0721 scs(check,"fBasketSeek");
0722 scs(check,"Seek_t*");
0723
0724 scs(check,"fFileName");
0725 scs(check,"TString");
0726 //Should be : 2056727376U (6 3.00.06)
0727 //Should be : FIXME (7 3.03.01)
0728
0729 streamer_info* info = new streamer_info("TBranch",8,check);
0730 a_infos.push_back(info);
0731 // Elements :
0732 int ofs = 0;
0733 info->add(new streamer_base("TNamed","The basis for a named object (name, title)",ofs,TNamed_version));ofs += size_TNamed();
0734 info->add(new streamer_base("TAttFill","Fill area attributes",ofs,TAttFill_version));ofs += size_TAttFill();
0735 info->add(new streamer_int(ofs,"fCompress","(=1 branch is compressed, 0 otherwise)"));
0736 info->add(new streamer_int(ofs,"fBasketSize","Initial Size of Basket Buffer"));
0737 info->add(new streamer_int(ofs,"fEntryOffsetLen","Initial Length of fEntryOffset table in the basket buffers"));
0738 info->add(new streamer_int(ofs,"fWriteBasket","Last basket number written"));
0739 info->add(new streamer_int(ofs,"fEntryNumber","Current entry number (last one filled in this branch)"));
0740 info->add(new streamer_int(ofs,"fOffset","Offset of this branch"));
0741 info->add(new streamer_basic_type("fMaxBaskets","Maximum number of Baskets so far",ofs,streamer__info::COUNTER,"Int_t"));ofs += size_COUNTER;
0742 info->add(new streamer_int(ofs,"fSplitLevel","Branch split level")); //3.03.01
0743 ofs += size_INT; //!fNLeaves
0744 ofs += size_INT; //!fReadBasket
0745 ofs += size_INT; //!fReadEntry
0746 info->add(new streamer_stat_t(ofs,"fEntries","Number of entries"));
0747 info->add(new streamer_stat_t(ofs,"fTotBytes","Total number of bytes in all leaves before compression"));
0748 info->add(new streamer_stat_t(ofs,"fZipBytes","Total number of bytes in all leaves after compression"));
0749 info->add(new streamer_object("fBranches","-> List of Branches of this branch",ofs,"TObjArray"));ofs += size_TObjArray;
0750 info->add(new streamer_object("fLeaves","-> List of leaves of this branch",ofs,"TObjArray"));ofs += size_TObjArray;
0751 info->add(new streamer_object("fBaskets","-> List of baskets of this branch",ofs,"TObjArray"));ofs += size_TObjArray;
0752 ofs += size_INT; //!fNBasketRAM
0753 ofs += size_POINTER; //!*fBasketRAM
0754 info->add(new streamer_basic_pointer("fBasketBytes","[fMaxBaskets] Length of baskets on file",ofs,streamer__info::INT,"fMaxBaskets","TBranch",6,"Int_t*"));ofs += size_POINTER;
0755 info->add(new streamer_basic_pointer("fBasketEntry","[fMaxBaskets] Table of first entry in eack basket",ofs,streamer__info::INT,"fMaxBaskets","TBranch",6,"Int_t*"));ofs += size_POINTER;
0756 info->add(new streamer_basic_pointer("fBasketSeek","[fMaxBaskets] Addresses of baskets on file",ofs,streamer__info::INT,"fMaxBaskets","TBranch",6,"Seek_t*"));ofs += size_POINTER;
0757 ofs += size_POINTER; //!*fTree
0758 ofs += size_POINTER; //!*fAddress
0759 ofs += size_POINTER; //!*fDirectory
0760 info->add(new streamer_string(ofs,"fFileName","Name of file where buffers are stored (\"\" if in same file as Tree header)"));
0761 if(ofs!=size_TBranch()) {
0762 a_out << "tools::wroot::fill_infos :"
0763 << " TBranch " << ofs << " (" << size_TBranch() << " expected.)"
0764 << std::endl;
0765 }}
0766
0767 {unsigned int check = 0;
0768 //this :
0769 scs(check,"TBranchObject");
0770 //bases :
0771 scs(check,"TBranch");
0772 //members :
0773 scs(check,"fClassName");
0774 scs(check,"TString");
0775
0776 //Should be : 2857878535U
0777
0778 streamer_info* info = new streamer_info("TBranchObject",1,check);
0779 a_infos.push_back(info);
0780 // Elements :
0781 int ofs = 0;
0782 info->add(new streamer_base("TBranch","Branch descriptor",ofs,TBranch_version));ofs += size_TBranch();
0783 info->add(new streamer_string(ofs,"fClassName","Class name of referenced object"));
0784 }
0785
0786 //---------------------------------------------------------------------
0787 {unsigned int check = 0;
0788 //this :
0789 scs(check,"TBranchElement");
0790 //bases :
0791 scs(check,"TBranch");
0792 //members :
0793 scs(check,"fClassName");
0794 scs(check,"TString");
0795
0796 scs(check,"fClassVersion");
0797 scs(check,"Int_t");
0798
0799 scs(check,"fID");
0800 scs(check,"Int_t");
0801
0802 scs(check,"fType");
0803 scs(check,"Int_t");
0804
0805 scs(check,"fStreamerType");
0806 scs(check,"Int_t");
0807
0808 streamer_info* info = new streamer_info("TBranchElement",1,check);
0809 a_infos.push_back(info);
0810 // Elements :
0811 int offset = 0;
0812 info->add(new streamer_base("TBranch","Branch descriptor",offset,TBranch_version));offset += size_TBranch();
0813 info->add(new streamer_string(offset,"fClassName","Class name of referenced object"));
0814 info->add(new streamer_int(offset,"fClassVersion","Version number of class"));
0815 info->add(new streamer_int(offset,"fID","element serial number in fInfo"));
0816 info->add(new streamer_int(offset,"fType","branch type"));
0817 info->add(new streamer_int(offset,"fStreamerType","branch streamer type"));
0818
0819 }
0820
0821 {unsigned int check = 0;
0822 //this :
0823 scs(check,"TLeaf");
0824 //bases :
0825 scs(check,"TNamed");
0826 //members :
0827 scs(check,"fLen");
0828 scs(check,"Int_t");
0829
0830 scs(check,"fLenType");
0831 scs(check,"Int_t");
0832
0833 scs(check,"fOffset");
0834 scs(check,"Int_t");
0835
0836 scs(check,"fIsRange");
0837 scs(check,"Bool_t");
0838
0839 scs(check,"fIsUnsigned");
0840 scs(check,"Bool_t");
0841
0842 scs(check,"fLeafCount");
0843 scs(check,"TLeaf*");
0844
0845 //Should be : 727988519U
0846
0847 streamer_info* info = new streamer_info("TLeaf",2,check);
0848 a_infos.push_back(info);
0849
0850 // Elements :
0851 int ofs = 0;
0852 info->add(new streamer_base("TNamed","The basis for a named object (name, title)",ofs,TNamed_version));ofs += size_TNamed();
0853 ofs += size_INT; //!fNdata
0854 info->add(new streamer_int(ofs,"fLen","Number of fixed length elements"));
0855 info->add(new streamer_int(ofs,"fLenType","Number of bytes for this data type"));
0856 info->add(new streamer_int(ofs,"fOffset","Offset in ClonesArray object (if one)"));
0857 info->add(new streamer_bool(ofs,"fIsRange","(=kTRUE if leaf has a range, kFALSE otherwise)"));
0858 info->add(new streamer_bool(ofs,"fIsUnsigned","(=kTRUE if unsigned, kFALSE otherwise)"));
0859 info->add(new streamer_object_pointer("fLeafCount","Pointer to Leaf count if variable length",ofs,"TLeaf*"));ofs += size_POINTER;
0860 ofs += size_POINTER; //!*fBranch
0861 if(ofs!=size_TLeaf()) {
0862 a_out << "tools::wroot::fill_infos :"
0863 << " TLeaf " << ofs << " (" << size_TLeaf() << " expected.)"
0864 << std::endl;
0865 }}
0866
0867 {unsigned int check = 0;
0868 //this :
0869 scs(check,"TLeafS");
0870 //bases :
0871 scs(check,"TLeaf");
0872 //members :
0873 scs(check,"fMinimum");
0874 scs(check,"Short_t");
0875
0876 scs(check,"fMaximum");
0877 scs(check,"Short_t");
0878
0879 //Should be : FIXME
0880
0881 streamer_info* info = new streamer_info("TLeafS",1,check);
0882 a_infos.push_back(info);
0883 // Elements :
0884 int ofs = 0;
0885 info->add(new streamer_base("TLeaf","Leaf: description of a Branch data type",ofs,TLeaf_version));ofs += size_TLeaf();
0886 info->add(new streamer_short(ofs,"fMinimum","Minimum value if leaf range is specified"));
0887 info->add(new streamer_short(ofs,"fMaximum","Maximum value if leaf range is specified"));
0888
0889 }
0890
0891 {unsigned int check = 0;
0892 //this :
0893 scs(check,"TLeafI");
0894 //bases :
0895 scs(check,"TLeaf");
0896 //members :
0897 scs(check,"fMinimum");
0898 scs(check,"Int_t");
0899
0900 scs(check,"fMaximum");
0901 scs(check,"Int_t");
0902
0903 //Should be : 3495201397U
0904
0905 streamer_info* info = new streamer_info("TLeafI",1,check);
0906 a_infos.push_back(info);
0907
0908 // Elements :
0909 int ofs = 0;
0910 info->add(new streamer_base("TLeaf","Leaf: description of a Branch data type",ofs,TLeaf_version));ofs += size_TLeaf();
0911 info->add(new streamer_int(ofs,"fMinimum","Minimum value if leaf range is specified"));
0912 info->add(new streamer_int(ofs,"fMaximum","Maximum value if leaf range is specified"));
0913 //size_TLeafI = ofs;
0914 }
0915
0916 {unsigned int check = 0;
0917 //name :
0918 scs(check,"TLeafF");
0919 //bases :
0920 scs(check,"TLeaf");
0921 //members :
0922 scs(check,"fMinimum");
0923 scs(check,"Float_t");
0924
0925 scs(check,"fMaximum");
0926 scs(check,"Float_t");
0927
0928 //Should be 1366318032U
0929
0930 streamer_info* info = new streamer_info("TLeafF",1,check);
0931 a_infos.push_back(info);
0932
0933 // Elements :
0934 int ofs = 0;
0935 info->add(new streamer_base("TLeaf","Leaf: description of a Branch data type",ofs,TLeaf_version));ofs += size_TLeaf();
0936 info->add(new streamer_float(ofs,"fMinimum","Minimum value if leaf range is specified"));
0937 info->add(new streamer_float(ofs,"fMaximum","Maximum value if leaf range is specified"));
0938 //size_TLeafF = ofs;
0939 }
0940
0941 {unsigned int check = 0;
0942 //this :
0943 scs(check,"TLeafD");
0944 //bases :
0945 scs(check,"TLeaf");
0946 //members :
0947 scs(check,"fMinimum");
0948 scs(check,"Double_t");
0949
0950 scs(check,"fMaximum");
0951 scs(check,"Double_t");
0952
0953 //Should be
0954
0955 streamer_info* info = new streamer_info("TLeafD",1,check);
0956 a_infos.push_back(info);
0957
0958 // Elements :
0959 int ofs = 0;
0960 info->add(new streamer_base("TLeaf","Leaf: description of a Branch data type",ofs,TLeaf_version));ofs += size_TLeaf();
0961 info->add(new streamer_double(ofs,"fMinimum","Minimum value if leaf range is specified"));
0962 info->add(new streamer_double(ofs,"fMaximum","Maximum value if leaf range is specified"));
0963
0964 }
0965
0966 {unsigned int check = 0;
0967 //this :
0968 scs(check,"TLeafB");
0969 //bases :
0970 scs(check,"TLeaf");
0971 //members :
0972 scs(check,"fMinimum");
0973 scs(check,"Char_t");
0974
0975 scs(check,"fMaximum");
0976 scs(check,"Char_t");
0977
0978 //Should be : FIXME
0979
0980 streamer_info* info = new streamer_info("TLeafB",1,check);
0981 a_infos.push_back(info);
0982 // Elements :
0983 int ofs = 0;
0984 info->add(new streamer_base("TLeaf","Leaf: description of a Branch data type",ofs,TLeaf_version));ofs += size_TLeaf();
0985 info->add(new streamer_basic_type("fMinimum","Minimum value if leaf range is specified",ofs,streamer__info::CHAR,"Char_t"));ofs += size_CHAR;
0986 info->add(new streamer_basic_type("fMaximum","Maximum value if leaf range is specified",ofs,streamer__info::CHAR,"Char_t"));ofs += size_CHAR;
0987
0988 }
0989
0990 {unsigned int check = 0;
0991 //this :
0992 scs(check,"TLeafC");
0993 //bases :
0994 scs(check,"TLeaf");
0995 //members :
0996 scs(check,"fMinimum");
0997 scs(check,"Int_t");
0998
0999 scs(check,"fMaximum");
1000 scs(check,"Int_t");
1001
1002 //Should be : FIXME
1003
1004 streamer_info* info = new streamer_info("TLeafC",1,check);
1005 a_infos.push_back(info);
1006
1007 // Elements :
1008 int ofs = 0;
1009 info->add(new streamer_base("TLeaf","Leaf: description of a Branch data type",ofs,TLeaf_version));ofs += size_TLeaf();
1010 info->add(new streamer_int(ofs,"fMinimum","Minimum value if leaf range is specified"));
1011 info->add(new streamer_int(ofs,"fMaximum","Maximum value if leaf range is specified"));}
1012
1013 {unsigned int check = 0;
1014 //this :
1015 scs(check,"TLeafObject");
1016 //bases :
1017 scs(check,"TLeaf");
1018 //members :
1019 scs(check,"fVirtual");
1020 scs(check,"Bool_t");
1021
1022 //Should be 2312661809U
1023
1024 streamer_info* info = new streamer_info("TLeafObject",4,check);
1025 a_infos.push_back(info);
1026
1027 // Elements :
1028 int ofs = 0;
1029 info->add(new streamer_base("TLeaf","Leaf: description of a Branch data type",ofs,TLeaf_version));ofs += size_TLeaf();
1030 info->add(new streamer_bool(ofs,"fVirtual","Support for Virtuality"));}
1031
1032 {unsigned int check = 0;
1033 //this :
1034 scs(check,"TLeafElement");
1035 //bases :
1036 scs(check,"TLeaf");
1037 //members :
1038 scs(check,"fID");
1039 scs(check,"Int_t");
1040
1041 scs(check,"fType");
1042 scs(check,"Int_t");
1043
1044 streamer_info* info = new streamer_info("TLeafElement",1,check);
1045 a_infos.push_back(info);
1046
1047 // Elements :
1048 int ofs = 0;
1049 info->add(new streamer_base("TLeaf","Leaf: description of a Branch data type",ofs,TLeaf_version));ofs += size_TLeaf();
1050 ofs += size_POINTER; //!*fAbsAddress
1051 info->add(new streamer_int(ofs,"fID","element serial number in fInfo"));
1052 info->add(new streamer_int(ofs,"fType","leaf type"));
1053 //size_TLeafElement = ofs;
1054 }
1055
1056 }
1057
1058 inline int size_TAttAxis() {return 38;} //40?
1059 inline int size_TAxis() {return 126;} //128?
1060 inline int size_TH1() {return 560;} //568?
1061 inline int size_TH2() {return 592;} //600?
1062 inline int size_TH2D() {return 604;} //612?
1063
1064 inline void fill_infos_histo(obj_list<streamer_info>& a_infos,std::ostream& a_out) {
1065
1066 typedef streamer_basic_type sbt;
1067
1068 const int size_POINTER = 4;
1069
1070 const int size_DOUBLE = 8;
1071 const int size_SHORT = 2;
1072 const int size_INT = 4;
1073
1074 //const int size_TObjArray = 40;
1075 const int size_TArrayD = 12;
1076 const int size_TArrayF = 12;
1077
1078 short TNamed_version = 1;
1079 short TArrayF_version = 1;
1080 short TArrayD_version = 1;
1081
1082 short TAttLine_version = 1;
1083 short TAttFill_version = 1;
1084 short TAttMarker_version = 1;
1085
1086 short TAttAxis_version = 4;
1087
1088
1089 {unsigned int check = 0;
1090 //this :
1091 scs(check,"TAttAxis");
1092 //members :
1093 scs(check,"fNdivisions");
1094 scs(check,"Int_t");
1095
1096 scs(check,"fAxisColor");
1097 scs(check,"Color_t");
1098
1099 scs(check,"fLabelColor");
1100 scs(check,"Color_t");
1101
1102 scs(check,"fLabelFont");
1103 scs(check,"Style_t");
1104
1105 scs(check,"fLabelOffset");
1106 scs(check,"Float_t");
1107
1108 scs(check,"fLabelSize");
1109 scs(check,"Float_t");
1110
1111 scs(check,"fTickLength");
1112 scs(check,"Float_t");
1113
1114 scs(check,"fTitleOffset");
1115 scs(check,"Float_t");
1116
1117 scs(check,"fTitleSize");
1118 scs(check,"Float_t");
1119
1120 scs(check,"fTitleColor");
1121 scs(check,"Color_t");
1122
1123 scs(check,"fTitleFont");
1124 scs(check,"Style_t");
1125
1126 streamer_info* info = new streamer_info("TAttAxis",4,check);
1127 a_infos.push_back(info);
1128 // Elements :
1129 int ofs = size_VIRTUAL();
1130 info->add(new streamer_int(ofs,"fNdivisions","Number of divisions(10000*n3 + 100*n2 + n1)"));
1131 info->add(new sbt("fAxisColor","color of the line axis",ofs,streamer__info::SHORT,"Color_t"));ofs += size_SHORT;
1132 info->add(new sbt("fLabelColor","color of labels",ofs,streamer__info::SHORT,"Color_t"));ofs += size_SHORT;
1133 info->add(new sbt("fLabelFont","font for labels",ofs,streamer__info::SHORT,"Style_t"));ofs += size_SHORT;
1134 info->add(new streamer_float(ofs,"fLabelOffset","offset of labels"));
1135 info->add(new streamer_float(ofs,"fLabelSize","size of labels"));
1136 info->add(new streamer_float(ofs,"fTickLength","length of tick marks"));
1137 info->add(new streamer_float(ofs,"fTitleOffset","offset of axis title"));
1138 info->add(new streamer_float(ofs,"fTitleSize","size of axis title"));
1139 info->add(new sbt("fTitleColor","color of axis title",ofs,streamer__info::SHORT,"Color_t"));ofs += size_SHORT;
1140 info->add(new sbt("fTitleFont","font for axis title",ofs,streamer__info::SHORT,"Style_t"));ofs += size_SHORT;
1141 //uuuu ofs += 2; //alignement ???
1142 if(ofs!=size_TAttAxis()) {
1143 a_out << "tools::wroot::fill_infos :"
1144 << " TAttAxis " << ofs << " (" << size_TAttAxis() << " expected.)"
1145 << std::endl;
1146 }}
1147
1148 {unsigned int check = 0;
1149 //this :
1150 scs(check,"TAxis");
1151 //bases :
1152 scs(check,"TNamed");
1153 scs(check,"TAttAxis");
1154 //members :
1155 scs(check,"fNbins");
1156 scs(check,"Int_t");
1157
1158 scs(check,"fXmin");
1159 scs(check,"Axis_t");
1160
1161 scs(check,"fXmax");
1162 scs(check,"Axis_t");
1163
1164 scs(check,"fXbins");
1165 scs(check,"TArrayD");
1166
1167 scs(check,"fFirst");
1168 scs(check,"Int_t");
1169
1170 scs(check,"fLast");
1171 scs(check,"Int_t");
1172
1173 scs(check,"fTimeDisplay");
1174 scs(check,"Bool_t");
1175
1176 scs(check,"fTimeFormat");
1177 scs(check,"TString");
1178
1179 streamer_info* info = new streamer_info("TAxis",6,check);
1180 a_infos.push_back(info);
1181
1182 // Elements :
1183 int ofs = 0;
1184 info->add(new streamer_base("TNamed","The basis for a named object (name, title)",ofs,TNamed_version));ofs += size_TNamed();
1185 info->add(new streamer_base("TAttAxis","Axis attributes",ofs,TAttAxis_version));ofs += size_TAttAxis();
1186 info->add(new streamer_int(ofs,"fNbins","Number of bins"));
1187 info->add(new sbt("fXmin","low edge of first bin",ofs,streamer__info::DOUBLE,"Axis_t"));ofs += size_DOUBLE;
1188 info->add(new sbt("fXmax","upper edge of last bin",ofs,streamer__info::DOUBLE,"Axis_t"));ofs += size_DOUBLE;
1189 info->add(new streamer_object_any("fXbins","Bin edges array in X",ofs,"TArrayD"));ofs += size_TArrayD;
1190 ofs += size_POINTER; //!*fXlabels
1191 info->add(new streamer_int(ofs,"fFirst","first bin to display"));
1192 info->add(new streamer_int(ofs,"fLast","last bin to display"));
1193 info->add(new streamer_bool(ofs,"fTimeDisplay","on/off displaying time values instead of numerics"));
1194 info->add(new streamer_string(ofs,"fTimeFormat","Date&time format, ex: 09/12/99 12:34:00"));
1195 ofs += size_POINTER; //!*fParent
1196 //v3-05-07 : 124 (stored) + 4 = 128
1197 if(ofs!=size_TAxis()) {
1198 a_out << "tools::wroot::fill_infos :"
1199 << " TAxis " << ofs << " (" << size_TAxis() << " expected.)"
1200 << std::endl;
1201 }}
1202
1203 short TH1_version = 3;
1204 {unsigned int check = 0;
1205 //this :
1206 scs(check,"TH1");
1207 //bases :
1208 scs(check,"TNamed");
1209 scs(check,"TAttLine");
1210 scs(check,"TAttFill");
1211 scs(check,"TAttMarker");
1212 //members :
1213 scs(check,"fNcells");
1214 scs(check,"Int_t");
1215
1216 scs(check,"fXaxis");
1217 scs(check,"TAxis");
1218
1219 scs(check,"fBarOffset");
1220 scs(check,"Short_t");
1221
1222 scs(check,"fBarWidth");
1223 scs(check,"Short_t");
1224
1225 scs(check,"fEntries");
1226 scs(check,"Stat_t");
1227
1228 scs(check,"fTsumw");
1229 scs(check,"Stat_t");
1230
1231 scs(check,"fTsumw2");
1232 scs(check,"Stat_t");
1233
1234 scs(check,"fTsumwx");
1235 scs(check,"Stat_t");
1236
1237 scs(check,"fTsumwx2");
1238 scs(check,"Stat_t");
1239
1240 scs(check,"fMaximum");
1241 scs(check,"Double_t");
1242
1243 scs(check,"fMinimum");
1244 scs(check,"Double_t");
1245
1246 scs(check,"fNormFactor");
1247 scs(check,"Double_t");
1248
1249 scs(check,"fContour");
1250 scs(check,"TArrayD");
1251
1252 scs(check,"fSumw2");
1253 scs(check,"TArrayD");
1254
1255 scs(check,"fOption");
1256 scs(check,"TString");
1257
1258 scs(check,"fFunctions");
1259 scs(check,"TList*");
1260
1261 streamer_info* info = new streamer_info("TH1",TH1_version,check);
1262 a_infos.push_back(info);
1263
1264 int ofs = 0;
1265 info->add(new streamer_base("TNamed","The basis for a named object (name, title)",ofs,TNamed_version));ofs += size_TNamed();
1266 info->add(new streamer_base("TAttLine","Line attributes",ofs,TAttLine_version));ofs += size_TAttLine();
1267 info->add(new streamer_base("TAttFill","Fill area attributes",ofs,TAttFill_version));ofs += size_TAttFill();
1268 info->add(new streamer_base("TAttMarker","Marker attributes",ofs,TAttMarker_version));ofs += size_TAttMarker();
1269 info->add(new streamer_int(ofs,"fNcells","number of bins(1D), cells (2D) +U/Overflows"));
1270 info->add(new streamer_object("fXaxis","X axis descriptor",ofs,"TAxis"));ofs += size_TAxis();
1271 info->add(new streamer_object("fYaxis","Y axis descriptor",ofs,"TAxis"));ofs += size_TAxis();
1272 info->add(new streamer_object("fZaxis","Z axis descriptor",ofs,"TAxis"));ofs += size_TAxis();
1273 info->add(new streamer_short(ofs,"fBarOffset","(1000*offset) for bar charts or legos"));
1274 info->add(new streamer_short(ofs,"fBarWidth","(1000*width) for bar charts or legos"));
1275 info->add(new streamer_stat_t(ofs,"fEntries","Number of entries"));
1276 info->add(new streamer_stat_t(ofs,"fTsumw","Total Sum of weights"));
1277 info->add(new streamer_stat_t(ofs,"fTsumw2","Total Sum of squares of weights"));
1278 info->add(new streamer_stat_t(ofs,"fTsumwx","Total Sum of weight*X"));
1279 info->add(new streamer_stat_t(ofs,"fTsumwx2","Total Sum of weight*X*X"));
1280 info->add(new streamer_double(ofs,"fMaximum","Maximum value for plotting"));
1281 info->add(new streamer_double(ofs,"fMinimum","Minimum value for plotting"));
1282 info->add(new streamer_double(ofs,"fNormFactor","Normalization factor"));
1283 info->add(new streamer_object_any("fContour","Array to display contour levels",ofs,"TArrayD"));ofs += size_TArrayD;
1284 info->add(new streamer_object_any("fSumw2","Array of sum of squares of weights",ofs,"TArrayD"));ofs += size_TArrayD;
1285 info->add(new streamer_string(ofs,"fOption","histogram options"));
1286 info->add(new streamer_object_pointer("fFunctions","->Pointer to list of functions (fits and user)",ofs,"TList*"));ofs += size_POINTER;
1287 ofs += size_POINTER; //!*fDirectory
1288 ofs += size_INT; //!fDimension
1289 ofs += size_POINTER; //!*fIntegral
1290 ofs += size_POINTER; //!*fPainter
1291 //v3-05-07 : 576 = 568 + 2 * 4 = ok
1292 if(ofs!=size_TH1()) {
1293 a_out << "tools::wroot::fill_infos :"
1294 << " TH1 " << ofs << " (" << size_TH1() << " expected.)"
1295 << std::endl;
1296 }}
1297
1298 {unsigned int check = 0;
1299 //this :
1300 scs(check,"TH1F");
1301 //base :
1302 scs(check,"TH1");
1303 scs(check,"TArrayF");
1304
1305 streamer_info* info = new streamer_info("TH1F",1,check);
1306 a_infos.push_back(info);
1307 int ofs = 0;
1308 info->add(new streamer_base("TH1","1-Dim histogram base class",ofs,TH1_version));ofs += size_TH1();
1309 info->add(new streamer_base("TArrayF","Array of floats",ofs,TArrayF_version));ofs += size_TArrayF;
1310 }
1311
1312 int size_TH1D = 0;
1313 short TH1D_version = 1;
1314 {unsigned int check = 0;
1315 //this :
1316 scs(check,"TH1D");
1317 //base :
1318 scs(check,"TH1");
1319 scs(check,"TArrayD");
1320
1321 streamer_info* info = new streamer_info("TH1D",TH1D_version,check);
1322 a_infos.push_back(info);
1323 int ofs = 0;
1324 info->add(new streamer_base("TH1","1-Dim histogram base class",ofs,TH1_version));ofs += size_TH1();
1325 info->add(new streamer_base("TArrayD","Array of doubles",ofs,TArrayD_version));ofs += size_TArrayD;
1326 size_TH1D = ofs; //580
1327
1328 //v3-05-07 : 588 = 576 + 12 = ok
1329 }
1330
1331 {unsigned int check = 0;
1332 //this :
1333 scs(check,"TProfile");
1334 //base :
1335 scs(check,"TH1D");
1336 //members :
1337 scs(check,"fBinEntries");
1338 scs(check,"TArrayD");
1339
1340 scs(check,"fErrorMode");
1341 scs(check,"EErrorType");//FIXME : ok ?
1342
1343 scs(check,"fYmin");
1344 scs(check,"Double_t");
1345
1346 scs(check,"fYmax");
1347 scs(check,"Double_t");
1348
1349 scs(check,"fTsumwy");
1350 scs(check,"Double_t");
1351
1352 scs(check,"fTsumwy2");
1353 scs(check,"Double_t");
1354
1355 streamer_info* info = new streamer_info("TProfile",4,check);
1356 a_infos.push_back(info);
1357
1358 int ofs = 0;
1359 info->add(new streamer_base("TH1D","1-Dim histograms (one double per channel)",ofs,TH1D_version));ofs += size_TH1D;
1360 info->add(new streamer_object_any("fBinEntries","number of entries per bin",ofs,"TArrayD"));ofs += size_TArrayD;
1361 info->add(new streamer_basic_type("fErrorMode","Option to compute errors",ofs,streamer__info::INT,"EErrorType"));ofs += size_INT;
1362 info->add(new streamer_double(ofs,"fYmin","Lower limit in Y (if set)"));
1363 info->add(new streamer_double(ofs,"fYmax","Upper limit in Y (if set)"));
1364 info->add(new streamer_double(ofs,"fTsumwy","Total Sum of weight*Y"));
1365 info->add(new streamer_double(ofs,"fTsumwy2","Total Sum of weight*Y*Y"));
1366 //628
1367
1368 //v3-05-07 : 624 = 612 + 4 + 8 (diff TH1D) = ok
1369 }
1370
1371 short TH2_version = 3;
1372 {unsigned int check = 0;
1373 //this :
1374 scs(check,"TH2");
1375 //bases :
1376 scs(check,"TH1");
1377 //members :
1378 scs(check,"fScalefactor");
1379 scs(check,"Stat_t");
1380
1381 scs(check,"fTsumwy");
1382 scs(check,"Stat_t");
1383
1384 scs(check,"fTsumwy2");
1385 scs(check,"Stat_t");
1386
1387 scs(check,"fTsumwxy");
1388 scs(check,"Stat_t");
1389
1390 streamer_info* info = new streamer_info("TH2",TH2_version,check);
1391 a_infos.push_back(info);
1392
1393 int ofs = 0;
1394 info->add(new streamer_base("TH1","1-Dim histogram base class",ofs,TH1_version));ofs += size_TH1();
1395 info->add(new streamer_stat_t(ofs,"fScalefactor","Scale factor"));
1396 info->add(new streamer_stat_t(ofs,"fTsumwy","Total Sum of weight*Y"));
1397 info->add(new streamer_stat_t(ofs,"fTsumwy2","Total Sum of weight*Y*Y"));
1398 info->add(new streamer_stat_t(ofs,"fTsumwxy","Total Sum of weight*X*Y"));
1399 //v3-05-07 : <to be checked>
1400 if(ofs!=size_TH2()) {
1401 a_out << "tools::wroot::fill_infos :"
1402 << " TH2 " << ofs << " (" << size_TH2() << " expected.)"
1403 << std::endl;
1404 }}
1405
1406 {unsigned int check = 0;
1407 //this :
1408 scs(check,"TH2F");
1409 //base :
1410 scs(check,"TH2");
1411 scs(check,"TArrayF");
1412
1413 streamer_info* info = new streamer_info("TH2F",3,check);
1414 a_infos.push_back(info);
1415
1416 int ofs = 0;
1417 info->add(new streamer_base("TH2","2-Dim histogram base class",ofs,TH2_version));ofs += size_TH2();
1418 info->add(new streamer_base("TArrayF","Array of floats",ofs,TArrayF_version));ofs += size_TArrayF;
1419 //612
1420
1421 }
1422
1423 short TH2D_version = 3;
1424 {unsigned int check = 0;
1425 //this :
1426 scs(check,"TH2D");
1427 //base :
1428 scs(check,"TH2");
1429 scs(check,"TArrayD");
1430
1431 streamer_info* info = new streamer_info("TH2D",TH2D_version,check);
1432 a_infos.push_back(info);
1433
1434 int ofs = 0;
1435 info->add(new streamer_base("TH2","2-Dim histogram base class",ofs,TH2_version));ofs += size_TH2();
1436 info->add(new streamer_base("TArrayD","Array of doubles",ofs,TArrayD_version));ofs += size_TArrayD;
1437 if(ofs!=size_TH2D()) {
1438 a_out << "tools::wroot::fill_infos :"
1439 << " TH2D " << ofs << " (" << size_TH2D() << " expected.)"
1440 << std::endl;
1441 }}
1442
1443 {unsigned int check = 0;
1444 //this :
1445 scs(check,"TProfile2D");
1446 //base :
1447 scs(check,"TH2D");
1448 //members :
1449 scs(check,"fBinEntries");
1450 scs(check,"TArrayD");
1451
1452 scs(check,"fErrorMode");
1453 scs(check,"EErrorType");//FIXME : ok ?
1454
1455 scs(check,"fZmin");
1456 scs(check,"Double_t");
1457
1458 scs(check,"fZmax");
1459 scs(check,"Double_t");
1460
1461 scs(check,"fTsumwz");
1462 scs(check,"Double_t");
1463
1464 scs(check,"fTsumwz2");
1465 scs(check,"Double_t");
1466
1467 streamer_info* info = new streamer_info("TProfile2D",5,check);
1468 a_infos.push_back(info);
1469
1470 int ofs = 0;
1471 info->add(new streamer_base("TH2D","2-Dim histograms (one double per channel)",ofs,TH2D_version));ofs += size_TH2D();
1472 info->add(new streamer_object_any("fBinEntries","number of entries per bin",ofs,"TArrayD"));ofs += size_TArrayD;
1473 info->add(new sbt("fErrorMode","Option to compute errors",ofs,streamer__info::INT,"EErrorType"));ofs += size_INT;
1474 info->add(new streamer_double(ofs,"fZmin","Lower limit in Z (if set)"));
1475 info->add(new streamer_double(ofs,"fZmax","Upper limit in Z (if set)"));
1476 info->add(new streamer_double(ofs,"fTsumwz","Total Sum of weight*Z"));
1477 info->add(new streamer_double(ofs,"fTsumwz2","Total Sum of weight*Z*Z"));
1478 //660
1479
1480 }
1481
1482 int size_TH3 = 0;
1483 short TH3_version = 4;
1484 short TAtt3D_version = 1;
1485 {unsigned int check = 0;
1486 //this :
1487 scs(check,"TH3");
1488 //bases :
1489 scs(check,"TH1");
1490 scs(check,"TAtt3D");
1491 //members :
1492 scs(check,"fTsumwy");
1493 scs(check,"Double_t");
1494 scs(check,"fTsumwy2");
1495 scs(check,"Double_t");
1496 scs(check,"fTsumwxy");
1497 scs(check,"Double_t");
1498
1499 scs(check,"fTsumwz");
1500 scs(check,"Double_t");
1501 scs(check,"fTsumwz2");
1502 scs(check,"Double_t");
1503 scs(check,"fTsumwxz");
1504 scs(check,"Double_t");
1505 scs(check,"fTsumwyz");
1506 scs(check,"Double_t");
1507
1508 streamer_info* info = new streamer_info("TH3",TH3_version,check);
1509 a_infos.push_back(info);
1510
1511 int ofs = 0;
1512 info->add(new streamer_base("TH1","1-Dim histogram base class",ofs,TH1_version));ofs += size_TH1();
1513 info->add(new streamer_base("TAtt3D","3D attributes",ofs,TAtt3D_version));ofs += 0;
1514 info->add(new streamer_double(ofs,"fTsumwy","Total Sum of weight*Y"));
1515 info->add(new streamer_double(ofs,"fTsumwy2","Total Sum of weight*Y*Y"));
1516 info->add(new streamer_double(ofs,"fTsumwxy","Total Sum of weight*X*Y"));
1517
1518 info->add(new streamer_double(ofs,"fTsumwz","Total Sum of weight*Z"));
1519 info->add(new streamer_double(ofs,"fTsumwz2","Total Sum of weight*Z*Z"));
1520 info->add(new streamer_double(ofs,"fTsumwxz","Total Sum of weight*X*Z"));
1521 info->add(new streamer_double(ofs,"fTsumwyz","Total Sum of weight*Y*Z"));
1522 size_TH3 = ofs; //624
1523
1524 //v4-00-02 : <to be checked>
1525 }
1526
1527 {unsigned int check = 0;
1528 //this :
1529 scs(check,"TH3F");
1530 //base :
1531 scs(check,"TH3");
1532 scs(check,"TArrayF");
1533
1534 streamer_info* info = new streamer_info("TH3F",3,check);
1535 a_infos.push_back(info);
1536
1537 int ofs = 0;
1538 info->add(new streamer_base("TH3","3-Dim histogram base class",ofs,TH3_version));ofs += size_TH3;
1539 info->add(new streamer_base("TArrayF","Array of floats",ofs,TArrayF_version));ofs += size_TArrayF;
1540 //636
1541
1542 }
1543
1544 {unsigned int check = 0;
1545 //this :
1546 scs(check,"TH3D");
1547 //base :
1548 scs(check,"TH3");
1549 scs(check,"TArrayD");
1550
1551 streamer_info* info = new streamer_info("TH3D",3,check);
1552 a_infos.push_back(info);
1553
1554 int ofs = 0;
1555 info->add(new streamer_base("TH3","3-Dim histogram base class",ofs,TH3_version));ofs += size_TH3;
1556 info->add(new streamer_base("TArrayD","Array of doubles",ofs,TArrayD_version));ofs += size_TArrayD;
1557 //636
1558
1559 }
1560
1561
1562 }
1563
1564 inline void fill_infos(obj_list<streamer_info>& a_infos,std::ostream& a_out) {
1565
1566 fill_infos_core(a_infos,a_out);
1567 fill_infos_cont(a_infos,a_out);
1568 fill_infos_graf(a_infos,a_out);
1569 fill_infos_tree(a_infos,a_out);
1570 fill_infos_histo(a_infos,a_out);
1571
1572 }
1573
1574 }}
1575
1576 #endif