TString rootString; t->Branch("rootString","TString",&rootString, 1600, 0);which is 'natural' as it uses the legacy syntax (branch_name,class_name, user_data) but did not work because 'rootString' is an object rather than a pointer to an object. (However the simplier form:
t->Branch("rootString",&rootString, 1600, 0);works/worked fine).
*Br 17 :fH : TH1F* * *Entries : 20 : Total Size= 19334 bytes File Size = 1671 * *Baskets : 2 : Basket Size= 16000 bytes Compression= 11.29 * *............................................................................* *Br 18 :fTriggerBits : TBits * *Entries : 20 : Total Size= 1398 bytes File Size = 400 * *Baskets : 1 : Basket Size= 16000 bytes Compression= 2.23 * *............................................................................* *Br 19 :fIsValid : Bool_t * *Entries : 20 : Total Size= 582 bytes File Size = 92 * *Baskets : 1 : Basket Size= 16000 bytes Compression= 1.00 *
// ******TreeCache statistics for file: cms2.root ****** // Number of branches in the cache ...: 1093 // Cache Efficiency ..................: 0.997372 // Cache Efficiency Rel...............: 1.000000 // Learn entries......................: 100 // Reading............................: 72761843 bytes in 7 transactions // Readahead..........................: 256000 bytes with overhead = 0 bytes // Average transaction................: 10394.549000 Kbytes // Number of blocks in current cache..: 210, total size: 6280352This function can be called directly from TTree: T->PrintCacheStats();
tree->Branch("JET1", &JET1, "njets/I:et[njets]/F:pt[njets]/F"); tree->BranchBranch("JET2", &JET2, "njets/I:et[njets]/F:pt[njets]/F"); ... tree->Scan("njets/I:et[JETS1.njets]/F:pt[JETS1.njets]");