56 void RemovePrefix(
TString& str,
const char* prefix) {
58 if (str.
Length() && prefix && strlen(prefix)) {
59 if (!str.
Index(prefix)) {
60 str.
Remove(0, strlen(prefix));
85 for (
Int_t i = 0; i < nbranches; ++i) {
88 case 31: br->
SetType(41);
break;
110 return CanSelfReference(inside);
115 const static TClassRef stringClass(
"std::string");
160 , fReadActionSequence(0)
161 , fFillActionSequence(0)
211 Init(tree, 0, bname,sinfo,
id,pointer,basketsize,splitlevel,btype);
254 Init(parent ? parent->
GetTree() : 0, parent, bname,sinfo,
id,pointer,basketsize,splitlevel,btype);
273 if (
fTree == 0)
return;
365 if (hasCustomStreamer) {
418 if (splitlevel > 0) {
439 if (!strcmp(name, clOfElement->
GetName())) {
466 Unroll(name, clOfElement, clOfElement, pointer, basketsize, splitlevel+splitSTLP, 0);
467 if (strchr(bname,
'.')) {
500 char **ppointer = (
char**)(pointer);
541 Unroll(name, clOfClones, clOfClones, pointer, basketsize, splitlevel+splitSTLP, 31);
548 TClass* contCl = elementClass;
593 Unroll(name, valueClass, valueClass, pointer, basketsize, splitlevel+splitSTLP, 41);
606 TClass* clm = elementClass;
607 Int_t err =
Unroll(name, clm, clm, pointer, basketsize, splitlevel+splitSTLP, 0);
666 Init(tree, 0, bname, clones, basketsize, splitlevel, compress);
693 Init(parent ? parent->
GetTree() : 0, parent, bname, clones, basketsize, splitlevel, compress);
736 if (basketsize < 100) basketsize = 100;
756 Error(
"Init",
"Missing class object of the TClonesArray %s\n",clones->
GetName());
768 std::string branchname = name + std::string(
"_");
770 leaf->
SetName(branchname.c_str());
772 Unroll(name, clonesClass, clonesClass, 0, basketsize, splitlevel, 31);
815 Init(tree, 0, bname, cont, basketsize, splitlevel, compress);
841 Init(parent ? parent->
GetTree() : 0, parent, bname, cont, basketsize, splitlevel, compress);
853 if (name[name.
Length()-1]==
'.') {
895 if (basketsize < 100) {
936 Unroll(name, valueClass, valueClass, 0, basketsize, splitlevel, 41);
1015 if (nbranches > 0) {
1016 TList persistentBranches;
1019 while((branch=(
TBranch*)iB())) {
1020 if (branch->
IsFolder()) persistentBranches.
Add(branch);
1046 mempos=strMember.
First(
'[');
1051 }
else persistentBranches.
Add(branch);
1054 persistentBranches.
Browse(b);
1075 pos = mothername.
First(
'[');
1081 if (mothername(len-1) !=
'.') {
1086 TString doublename = mothername;
1088 Int_t isthere = (name.
Index(doublename) == 0);
1093 doublename.
Append(mothername);
1094 isthere = (name.
Index(doublename) == 0);
1130 for (
Int_t i = 0; i < nbranches; ++i) {
1134 }
else if (
fType == 4) {
1137 Error(
"BuildTitle",
"This cannot happen, fType of parent is not 3 or 4!");
1141 const char* fin = strrchr(bre->
GetTitle(),
'.');
1174 if ((stype > 40) && (stype < 61)) {
1216 Error(
"Fill",
"attempt to fill branch %s while addresss is not set",
GetName());
1239 Error(
"Fill",
"Failed filling branch:%s, nbytes=%d",
GetName(), nwrite);
1251 Error(
"Fill",
"Failed filling branch:%s, nbytes=%d",
GetName(), nwrite);
1259 for (
Int_t i = 0; i < nbranches; ++i) {
1262 nwrite = branch->
FillImpl(imtHelper);
1264 Error(
"Fill",
"Failed filling branch:%s.%s, nbytes=%d",
GetName(), branch->
GetName(), nwrite);
1277 printf(
"Fill: %lld, branch=%s, nbytes=%d\n", entry,
GetName(), nbytes);
1315 }
else if (
fType == 31) {
1336 Error(
"FillLeaves",
"The branch counter address was zero!");
1342 Error(
"FillLeaves",
"Clonesa: %s, n=%d, sorry not supported yet",
GetName(), n);
1365 for (
Int_t ii = 0; ii <
n; ++ii) {
1375 for (
Int_t ii = 0; ii <
n; ++ii) {
1458 Error(
"FillLeaves",
"Cannot get streamer info for branch '%s'",
GetName());
1489 Error(
"FillLeaves",
"Cannot get streamer info for branch '%s'",
GetName());
1519 Error(
"FillLeaves",
"Cannot get streamer info for branch '%s'",
GetName());
1550 Error(
"FillLeaves",
"Cannot get streamer info for branch '%s'",
GetName());
1605 Error(
"FillLeaves",
"Cannot get streamer info for branch '%s'",
GetName());
1610 char **end = arr +
n;
1687 Error(
"FillLeaves",
"Cannot get streamer info for branch '%s'",
GetName());
1731 Error(
"FillLeaves",
"Cannot get streamer info for branch '%s'",
GetName());
1745 if (name[name.length()-1]==
']') {
1746 std::size_t dim = name.find_first_of(
"[");
1747 if (dim != std::string::npos) {
1751 if (name[name.size()-1] !=
'.') {
1770 if (se && se->
IsBase()) {
1772 UInt_t len = strlen(name);
1778 std::string longnm_parent;
1782 longnm_parent +=
name;
1784 UInt_t namelen = strlen(name);
1788 for(
Int_t i = 0; i < nbranches; ++i) {
1791 const char *brname = branch->
GetName();
1792 UInt_t brlen = strlen(brname);
1793 if (brname[brlen-1]==
']') {
1794 const char *dim = strchr(brname,
'[');
1796 brlen = dim - brname;
1799 if (namelen == brlen
1800 && strncmp(name,brname,brlen) == 0) {
1803 if (brlen == longnm.length()
1804 && strncmp(longnm.c_str(),brname,brlen) == 0) {
1808 if (brlen == longnm_parent.length()
1809 && strncmp(longnm_parent.c_str(),brname,brlen) == 0) {
1813 if (namelen>brlen && name[brlen]==
'.' && strncmp(name,brname,brlen)==0) {
1824 for(
Int_t i = 0; i < nbranches; ++i) {
1830 if (si && br->
GetID() >= 0) {
1832 if (se && se->
IsBase()) {
1854 if (parent==
this || parent->
GetID()<0 )
return 0;
1859 if (! se->
IsBase() )
return 0;
1867 std::string longname( grand_parent->
GetName() );
1873 if ( longname == leafname ) {
1914 if (valueClass == subbe->fInfo->
GetClass()) {
1915 localInfo = subbe->fInfo;
1950 if (targetValueClass && localInfo->
GetClass() != targetValueClass) {
1961 for (
size_t i =0; i < ndata; ++i) {
1976 ename = ename.
Remove(pos);
1984 ids.back().fElement = nextel;
1985 ids.back().fInfo = info;
1992 if (elementClass && (!be || be->
GetType() == -2)) {
2000 if (elementClass == subbe->GetInfo()->
GetClass()) {
2001 nextinfo = subbe->GetInfo();
2002 onfileObject = subbe->GetOnfileObject();
2012 ids.emplace_back(nextinfo, offset + nextel->
GetOffset());
2015 ids.back().fNestedIDs->fOwnOnfileObject =
kTRUE;
2017 ids.back().fNestedIDs->fOnfileObject = onfileObject;
2024 subprefix = ename +
".";
2026 GatherArtificialElements(branches, ids.back().fNestedIDs->fIDs, subprefix, nextinfo, offset + nextel->
GetOffset());
2027 if (ids.back().fNestedIDs->fIDs.empty())
2061 if ( !targetClass ) {
2062 Error(
"InitInfo",
"The target class dictionary is not present!" );
2080 target +=
"@@emulated";
2089 if( targetClass != cl ) {
2106 if( targetClass != cl )
2146 Error(
"InitInfo",
"StreamerInfo is not compiled.");
2169 fOnfileObject =
new TVirtualArray( info->GetElement(0)->GetClassPointer(), arrlen );
2183 for (
Int_t i = 0; i < nbranches; ++i) {
2186 if (
this != subbranch) {
2188 if (!subbranch->
fInfo)
2191 if (subbranch->
fInfo == info)
2193 else if (subbranch->
fInfo ==
nullptr && subbranch->
fBranchClass == currentClass) {
2200 else if (subbranch->
fCheckSum == info->GetCheckSum()) {
2209 Error(
"SetOnfileObject (lambda)",
"2 distincts fOnfileObject are in the hierarchy of %s for type %s",
2214 seenExisting =
kTRUE;
2218 lastbranch = subbranch;
2223 if (lastbranch !=
this)
2232 size_t pos = s.rfind(
'.');
2233 if (pos != std::string::npos) {
2234 s = s.substr(pos+1);
2236 while ((pos = s.rfind(
'[')) != std::string::npos) {
2237 s = s.substr(0, pos);
2244 for (
size_t i = 0; i < ndata; ++i) {
2276 for (
size_t i =
fID+1+(
fNewIDs.size()); i < ndata; ++i) {
2279 std::string ename = nextel->
GetName();
2280 if (ename[0] ==
'*')
2281 ename = ename.substr(1);
2283 while ((pos = ename.rfind(
'[')) != std::string::npos) {
2284 ename = ename.substr(0, pos);
2316 fNewIDs.back().fElement = nextel;
2323 for (
size_t i = 0; i < ndata; ++i) {
2338 SetOnfileObject(
fInfo);
2352 if (prefix[prefix.
Length()-1] !=
'.') {
2365 SetOnfileObject(localInfo);
2396 const char* className = 0;
2441 Fatal(
"GetCollectionProxy",
2442 "Can not create a Collection Proxy of any kind for the class \"%s\" needed by the branch \"%s\" of the TTree \"%s\"!",
2446 "Fixing the collection proxy of the class \"%s\" \n" 2447 "\tneeded by the branch \"%s\" of the TTree \"%s\" to be similar to \"%s\".",
2453 }
else if (
fType == 41) {
2496 if (newInfo != brInfo) {
2505 if (newType.
Length()==0) {
2588 for (
Int_t i = 0; i < nbranches; ++i) {
2610 R__PushCache onfileObject(((
TBufferFile&)b),fOnfileObject,ndata);
2613 char **end = arr +
fNdata;
2616 }
else if (
fType == 4) {
2623 R__PushCache onfileObject(((
TBufferFile&)b),fOnfileObject,ndata);
2655 Info(
"GetEntry",
"%lld, branch=%s, nbytes=%d", entry,
GetName(), nbytes);
2673 if ((type == -1) || (
fID == -1)) {
2682 if (!expectedClass) {
2692 Error(
"GetExpectedType",
"Did not find the type for %s",
GetName());
2705 return "TBranchElement-folder";
2707 return "TBranchElement-leaf";
2768 const char *types[20] = {
2791 return types[itype];
2800 template <
typename T>
2820 }
else if (fOnfileObject) {
2851 }
else if (
fType <= 2) {
2876 }
else if (
fType == 41) {
2912 }
else if (fOnfileObject) {
2929 }
else if (
fType == 4) {
2932 }
else if (
fType == 31) {
2937 }
else if (
fType == 41) {
2942 }
else if (
fType <= 2) {
2957 }
else if (
fType == 41) {
2959 }
else if (prID < 0) {
2964 char **val = (
char**)(
object+
GetInfoImp()->TStreamerInfo::GetElementOffset(prID));
3019 Warning(
"InitializeOffsets",
"No branch class set for branch: %s",
GetName());
3036 Int_t localOffset = 0;
3049 Warning(
"InitializeOffsets",
"Streamer info for branch: %s has no elements array!",
GetName());
3056 Warning(
"InitializeOffsets",
"Cannot get streamer element for branch: %s!",
GetName());
3077 Error(
"InitializeOffsets",
"Could not find class for branch: %s",
GetName());
3091 stlParentName = br->
GetName();
3100 for (
Int_t subBranchIdx = 0; subBranchIdx < nbranches; ++subBranchIdx) {
3101 bool alternateElement =
false;
3105 if (subBranch == 0) {
3119 Warning(
"InitializeOffsets",
"No streamer info for branch: %s subbranch: %s",
GetName(), subBranch->
GetName());
3124 Warning(
"InitializeOffsets",
"No elements array for branch: %s subbranch: %s",
GetName(), subBranch->
GetName());
3130 if (!subBranchElement) {
3131 Warning(
"InitializeOffsets",
"No streamer element for branch: %s subbranch: %s",
GetName(), subBranch->
GetName());
3145 typedef TStreamerInfoActions::ActionContainer_t::iterator iterator;
3148 iter != end; ++iter) {
3153 subBranchElement =
e;
3154 alternateElement =
true;
3161 localOffset = subBranchElement->
GetOffset();
3169 && CanSelfReference(subBranchElement->
GetClass()))
3185 Warning(
"InitializeOffsets",
"Branch '%s' has no mother!",
GetName());
3191 if (motherName.Length() && strchr(motherName.Data(),
'.')) {
3195 if (motherName.Length() && (motherName[motherName.Length()-1] ==
'.')) {
3196 motherDotAtEnd =
kTRUE;
3200 if ((subBranch->
fType == 1) || (subBranchElement && subBranchElement->
IsBase())) {
3208 isBaseSubBranch =
kTRUE;
3212 if ((subBranch->
fType == 31) || (subBranch->
fType == 41)) {
3214 isContDataMember =
kTRUE;
3239 if (motherDotAtEnd) {
3241 dataName.
Remove(0, motherName.Length());
3243 if (!stlParentNameUpdated && stlParentName.
Length()) {
3244 stlParentName.
Remove(0, motherName.Length());
3245 stlParentNameUpdated =
kTRUE;
3247 }
else if (motherDot) {
3261 if (dataName.Length() == motherName.Length()) {
3262 dataName.Remove(0, motherName.Length());
3264 if (!stlParentNameUpdated && stlParentName.
Length()) {
3265 stlParentName.
Remove(0, motherName.Length());
3270 if (dataName.Length() > motherName.Length()) {
3271 dataName.
Remove(0, motherName.Length() + 1);
3272 if (!stlParentNameUpdated && stlParentName.
Length()) {
3273 stlParentName.
Remove(0, motherName.Length());
3278 stlParentNameUpdated =
kTRUE;
3279 if (isBaseSubBranch) {
3283 if (pattern.Length() <= dataName.Length()) {
3284 if (!strcmp(dataName.Data() + (dataName.Length() - pattern.Length()), pattern.Data())) {
3288 dataName.
Remove(dataName.Length() - pattern.Length());
3292 if (dataName.Length()) {
3293 if (dataName[0] ==
'.') {
3303 if (motherDotAtEnd) {
3305 parentName.
Remove(0, motherName.Length());
3306 }
else if (motherDot) {
3320 if (parentName.
Length() == motherName.Length()) {
3321 parentName.
Remove(0, motherName.Length());
3325 if (parentName.
Length() > motherName.Length()) {
3326 parentName.
Remove(0, motherName.Length() + 1);
3339 if (pattern.Length() <= parentName.
Length()) {
3340 if (!strcmp(parentName.
Data() + (parentName.
Length() - pattern.Length()), pattern.Data())) {
3344 parentName.
Remove(parentName.
Length() - pattern.Length());
3356 RemovePrefix(dataName, parentName);
3360 if (dataName.Length()) {
3361 if (dataName[0] ==
'.') {
3362 dataName.Remove(0, 1);
3367 if (dataName.Length()) {
3368 if (dataName[dataName.Length()-1] ==
'.') {
3369 dataName.Remove(dataName.Length() - 1, 1);
3385 if (dataName.Length()) {
3410 target +=
"@@emulated";
3428 Warning(
"InitializeOffsets",
"subBranch: '%s' has no parent class, and cannot get class for clones class: '%s'!", subBranch->
GetName(),
GetClonesName());
3432 Warning(
"InitializeOffsets",
"subBranch: '%s' has no parent class! Assuming parent class is: '%s'.", subBranch->
GetName(), pClass->
GetName());
3436 Warning(
"InitializeOffsets",
"subBranch: '%s' has no parent class! Assuming parent class is: '%s'.", subBranch->
GetName(), pClass ? pClass->
GetName() :
"unknowned class");
3441 pClass = branchClass;
3446 if (renamed && pClass) {
3447 if (pClass == branchClass) {
3459 if( dynamic_cast<TBranchSTL*>(
fParent) && stlParentName.
Length() )
3461 if( !strncmp( stlParentName.
Data(), dataName.Data(), stlParentName.
Length()-1 )
3462 && dataName[ stlParentName.
Length() ] ==
'.' )
3463 dataName.Remove( 0, stlParentName.
Length()+1 );
3470 if (alternateElement) {
3471 Ssiz_t dotpos = dataName.Last(
'.');
3472 Ssiz_t endpos = dataName.Length();
3473 if (dotpos !=
kNPOS) ++dotpos;
else dotpos = 0;
3474 dataName.Replace(dotpos,endpos-dotpos,subBranchElement->
GetFullName());
3495 Error(
"InitializeOffsets",
3496 "Could not find the real data member '%s' when constructing the branch '%s' [Likely missing ShowMember].",
3501 Info(
"InitializeOffsets",
3502 "TTree created with an older schema, some data might not be copied in 'slow-cloning' mode; fast-cloning should have the correct result. '%s' is missing when constructing the branch '%s'. ",
3506 Fatal(
"InitializeOffsets",
3507 "Could not find the real data member '%s' when constructing the branch '%s' [Likely an internal error, please report to the developers].",
3515 if (isBaseSubBranch) {
3518 Warning(
"InitializeOffsets",
"Could not find the data member name for branch '%s' with parent branch '%s', assuming offset is zero!", subBranch->
GetName(),
GetName());
3526 if (isContDataMember) {
3540 if (isBaseSubBranch) {
3547 subBranch->
SetOffset(offset - localOffset);
3557 }
else if (isSplit) {
3558 if (isBaseSubBranch) {
3569 if (isBaseSubBranch) {
3609 if (nbranches >= 1) {
3613 return browsables && browsables->
GetSize();
3628 if (basket &&
fTree) {
3641 bufbegin = entryOffset[entry-first];
3644 bufnext = entryOffset[entry+1-first];
3648 if (bufnext == bufbegin) {
3666 for(
auto &cursor : ids) {
3667 auto id = cursor.fElemID;
3670 else if (cursor.fNestedIDs) {
3671 Printf(
" Within subobject of type %s offset = %d", cursor.fNestedIDs->fInfo->GetName(), cursor.fNestedIDs->fOffset);
3672 PrintElements(cursor.fNestedIDs->fInfo, cursor.fNestedIDs->fIDs);
3680 if (strncmp(option,
"debugAddress",strlen(
"debugAddress"))==0) {
3681 if (strlen(option)==strlen(
"debugAddress")) {
3682 Printf(
"%-24s %-16s %2s %4s %-16s %-16s %8s %8s %s\n",
3683 "Branch Name",
"Streamer Class",
"ID",
"Type",
"Class",
"Parent",
"pOffset",
"fOffset",
"fObject");
3692 Printf(
"%-16s %2d %4d %-16s %-16s %8x %8x %s\n",
3697 for (
Int_t i = 0; i < nbranches; ++i) {
3699 subbranch->
Print(
"debugAddressSub");
3703 if (strncmp(option,
"debugInfo",strlen(
"debugInfo"))==0) {
3715 Printf(
" With elements:");
3719 Printf(
" with read actions:");
3721 Printf(
" with write actions:");
3729 Printf(
" with read actions:");
3731 Printf(
" with write actions:");
3734 TString suboption =
"debugInfoSub";
3735 suboption += (option+strlen(
"debugInfo"));
3736 for (
Int_t i = 0; i < nbranches; ++i) {
3738 subbranch->
Print(suboption);
3751 Printf(
"*............................................................................*");
3756 for (
Int_t i=0;i<nbranches;i++) {
3758 branch->
Print(option);
3778 }
else if (fOnfileObject) {
3815 }
else if (
fType <= 2) {
3832 }
else if (
fType == 3) {
3834 }
else if (
fType == 31) {
3839 }
else if (
fType == 41) {
3856 Fatal(
"ReadLeaves",
"The ReadLeaves function has not been configured for %s",
GetName());
3871 if ((n[0] < 0) || (n[0] >
fMaximum)) {
3876 Error(
"ReadLeaves",
"Incorrect size read for the container in %s\nThe size read is %d when the maximum is %d\nThe size is reset to 0 for this entry (%lld)",
GetName(), n[0],
fMaximum,
GetReadEntry());
3888 for (
Int_t i=0; i<nbranches; i++) {
3905 if (atype > 54)
return;
3914 if (!len_where)
return;
3919 for( k=0; k<
n; k++) {
3920 char **where = &(((
char**)
fAddress)[k]);
3924 case 1: {length = ((
Char_t*) len_where)[k];
break;}
3925 case 2: {length = ((
Short_t*) len_where)[k];
break;}
3926 case 3: {length = ((
Int_t*) len_where)[k];
break;}
3927 case 4: {length = ((
Long_t*) len_where)[k];
break;}
3929 case 6: {length = ((
Int_t*) len_where)[k];
break;}
3931 case 11: {length = ((
UChar_t*) len_where)[k];
break;}
3932 case 12: {length = ((
UShort_t*) len_where)[k];
break;}
3933 case 13: {length = ((
UInt_t*) len_where)[k];
break;}
3934 case 14: {length = ((
ULong_t*) len_where)[k];
break;}
3935 case 15: {length = ((
UInt_t*) len_where)[k];
break;}
3936 case 16: {length = ((
Long64_t*) len_where)[k];
break;}
3937 case 17: {length = ((
ULong64_t*)len_where)[k];
break;}
3938 case 18: {length = ((
Bool_t*) len_where)[k];
break;}
3942 if (length <= 0)
continue;
3943 if (isArray == 0)
continue;
3989 for (
Int_t ii=0;ii<
n;ii++) {
3998 for (
Int_t ii=0;ii<
n;ii++) {
4005 }
else if (
fType <= 2) {
4025 loc = counter.
Last(
']');
4029 countname += counter;
4035 Warning(
"ReadLeaves",
"Missing fBranchCount for %s. Data will not be read correctly by the MakeClass mode.",
GetName());
4061 for (
Int_t ii=0;ii<
n;ii++) {
4070 for (
Int_t ii=0;ii<
n;ii++) {
4125 Error(
"ReadLeaves",
"Incorrect size read for the container in %s\n\tThe size read is %d while the maximum is %d\n\tThe size is reset to 0 for this entry (%lld)",
GetName(), n,
fMaximum,
GetReadEntry());
4131 R__PushCache onfileObject(((
TBufferFile&)b),fOnfileObject,1);
4159 for (
Int_t i = 0; i < nbranches; ++i) {
4187 if( !
fNdata || *(
void**)proxy->
At( 0 ) != 0 )
4192 void **el = (
void**)proxy->
At( i );
4194 *el = elClass->
New();
4198 proxy->
Commit(alternate);
4224 if (info == 0)
return;
4256 if (info == 0)
return;
4287 if (info == 0)
return;
4320 Error(
"ReadLeaves",
"Incorrect size read for the container in %s\n\tThe size read is %d while the maximum is %d\n\tThe size is reset to 0 for this entry (%lld)",
GetName(), n,
fMaximum,
GetReadEntry());
4359 if (info==0)
return;
4367 char **end = arr +
fNdata;
4389 R__PushCache onfileObject(((
TBufferFile&)b),fOnfileObject,1);
4441 R__PushCache onfileObject(((
TBufferFile&)b),fOnfileObject,1);
4476 R__PushCache onfileObject(((
TBufferFile&)b),fOnfileObject,1);
4497 R__PushCache onfileObject(((
TBufferFile&)b),fOnfileObject,1);
4506 Fatal(
"FillLeaves",
"The FillLeaves function has not been configured for %s",
GetName());
4529 }
else if (
fType == 4) {
4534 Warning(
"ReleaseObject",
"Cannot delete allocated STL container because I do not have a proxy! branch: %s",
GetName());
4538 if (needDelete &&
fID >= 0) {
4545 proxy->
Clear(
"force");
4570 proxy->
Clear(
"force");
4574 proxy->
Clear(
"force");
4595 for (
Int_t i = 0; i < nbranches; ++i) {
4597 branch->
Reset(option);
4610 for (
Int_t i = 0; i < nbranches; ++i) {
4632 for (
Int_t i = 0; i < nbranches; ++i) {
4658 for (
Int_t i = 0; i < nb; ++i) {
4684 for (
Int_t i = 0; i < nbranches; ++i) {
4822 if (
Long_t(addr) == -1) {
4914 if (clm == content) {
4920 Warning(
"SetAddress",
"The type of the %s was changed from TClonesArray to %s but we do not have a TVirtualCollectionProxy for that container type!",
GetName(), newType->
GetName());
4946 }
else if (
fType == 4) {
4958 for (
Int_t i = 0; i < nbranches; ++i) {
4991 for (
Int_t i = 0; i < nbranches; ++i) {
5019 Error(
"SetAddress",
"For %s, we can not convert %s into %s\n",
5152 Error(
"SetAddress",
"Embedded TClonesArray given a zero address for branch '%s'",
GetName());
5168 Error(
"SetAddress",
"Embedded pointer to a TClonesArray given a zero address for branch '%s'",
GetName());
5172 }
else if (
fType == 4) {
5199 Error(
"SetAddress",
"Failed to allocate STL container for branch '%s'",
GetName());
5216 Error(
"SetAddress",
"Failed to allocate STL container for branch '%s'",
GetName());
5235 Error(
"SetAddress",
"Embedded STL container given a zero address for branch '%s'",
GetName());
5248 Error(
"SetAddress",
"Failed to allocate STL container for branch '%s'",
GetName());
5256 Error(
"SetAddress",
"Embedded pointer to an STL container given a zero address for branch '%s'",
GetName());
5260 }
else if (
fType == 41) {
5266 }
else if (
fID < 0) {
5286 Error(
"SetAddress",
"I have no TClass for branch %s, so I cannot allocate an I/O buffer!",
GetName());
5313 for (
Int_t i = 0; i < nbranches; ++i) {
5336 for (
Int_t i = 0; i < nbranches; ++i) {
5352 if (leafOfCounter && leaf) {
5355 if (!leafOfCounter) {
5356 Warning(
"SetBranchCount",
"Counter branch %s for branch %s has no leaves!", brOfCounter->
GetName(),
GetName());
5359 Warning(
"SetBranchCount",
"Branch %s has no leaves!",
GetName());
5378 for (
Int_t i = 0; i < nbranches; ++i) {
5430 if (actionSequence)
delete actionSequence;
5460 TClass *originalClass =
nullptr;
5479 }
else if (
fType == 31) {
5504 }
else if (
fType == 4) {
5506 }
else if (
fType == 41) {
5516 }
else if (
fType == 3) {
5518 }
else if (
fType == 31) {
5520 }
else if (
fType < 0) {
5522 }
else if (
fType == 0 &&
fID == -1) {
5525 if (hasCustomStreamer) {
5533 }
else if (
fType <= 2) {
5560 TClass *originalClass =
nullptr;
5579 }
else if (
fType == 31) {
5604 }
else if (
fType == 4) {
5606 }
else if (
fType == 41) {
5618 }
else if (
fType == 3) {
5620 }
else if (
fType == 31) {
5622 }
else if (
fType < 0) {
5624 }
else if (
fType <=2) {
5646 if (name == 0)
return;
5656 for (
Int_t i = 0; i < nbranches; ++i) {
5753 void TBranchElement::Streamer(
TBuffer& R__b)
5818 else if (
fType == 4) {
5849 const char* motherFileName = treeFileName;
5850 if (mother && (mother !=
this)) {
5876 char* dot = (
char*) strchr(name,
'.');
5877 Int_t nch = strlen(name);
5879 if (nch && (name[nch-1] ==
'.')) {
5898 char* pointer = (
char*) (objptr + element->GetOffset());
5905 TClass* clbase = element->GetClassPointer();
5922 bname.
Form(
"%s%s", name, element->GetFullName());
5939 bname.
Form(
"%s.%s", name, element->GetFullName());
5945 bname.
Form(
"%s", element->GetFullName());
5949 element->GetClass()->GetCollectionProxy() &&
5950 element->GetClass()->GetCollectionProxy()->HasPointers() )
5952 TBranchSTL* brSTL =
new TBranchSTL(
this, bname, element->GetClass()->GetCollectionProxy(), bufsize, splitlevel-1, sinfo,
id );
6035 for (
Int_t elemID = 0; elemID < ndata; ++elemID) {
6057 if ((btype == 31) || (btype == 41)) {
6069 unroll =
Unroll(name, clParent, clOfBase, ptr + offset, basketsize, splitlevel+splitSTLP, btype);
6128 Int_t subSplitlevel = splitlevel-1;
6129 if (btype == 31 || btype == 41 || elem->
CannotSplit()) {
6144 Int_t unroll =
Unroll(branchname, clParent, elemClass, ptr + offset, basketsize, splitlevel-1+splitSTLP, btype);
6156 splitSTLP &&
fType != 4 )
6161 basketsize, splitlevel - 1+splitSTLP, sinfo, elemID );
6169 Int_t subSplitlevel = splitlevel - 1;
6170 if ((btype == 31) || (btype == 41) || elem->
CannotSplit()) {
6174 TBranchElement* branch =
new TBranchElement(
this, branchname, sinfo, elemID, ptr + offset, basketsize, subSplitlevel+splitSTLP, btype);
Bool_t HasRuleWithSourceClass(const TString &source) const
Return True if we have any rule whose source class is 'source'.
Describe Streamer information for one class version.
TClassRef fTargetClass
! Reference to the target in-memory class
virtual const char * GetName() const
Returns name of object.
Int_t GetDefaultEntryOffsetLen() const
virtual Bool_t IsTransient() const
Return kTRUE if the element represent an entity that is not written to the disk (transient members...
void SetBufferOffset(Int_t offset=0)
virtual Int_t GetCollectionType() const =0
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Int_t Unroll(const char *name, TClass *cltop, TClass *cl, char *ptr, Int_t basketsize, Int_t splitlevel, Int_t btype)
Split class cl into sub-branches of this branch.
void FillLeavesAssociativeCollectionMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual void WriteFloat16(Float_t *f, TStreamerElement *ele=0)=0
We are the owner of fOnfileObject.
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method). ...
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
TStreamerInfo * BuildStreamerInfo(TClass *cl, void *pointer=0, Bool_t canOptimize=kTRUE)
Build StreamerInfo for class cl.
TBranchElement * fBranchCount2
pointer to secondary branchcount branch
TVirtualCollectionProxy * GetCollectionProxy()
Return the collection proxy describing the branch content, if any.
const char * GetTypeNameBasic() const
Return type name of this element in case the type name is not a standard basic type, return the basic type name known to CINT.
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
TStreamerInfoActions::TIDs fNewIDs
! Nested List of the serial number of all the StreamerInfo to be used.
virtual void * Allocate(UInt_t n, Bool_t forceDelete)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
T GetTypedValue(char *pointer, Int_t i, Int_t j, Int_t len) const
Return value of element i in object at pointer.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TVirtualStreamerInfo * fInfo
TStreamerInfo form which the action is derived.
void PrintValue(Int_t i) const
Prints values of leaves.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
virtual void SetAddress(void *add)
Set address of this branch.
static SequencePtr WriteMemberWiseActionsCollectionCreator(TStreamerInfo *info, TVirtualCollectionProxy *collectionProxy, TClass *)
virtual TLeaf * FindLeaf(const char *name)
Find the leaf corresponding to the name 'searchname'.
ActionContainer_t fActions
Int_t fOffset
Offset of this branch.
virtual Int_t GetProperties() const
virtual Int_t GetExpectedType(TClass *&clptr, EDataType &type)
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
Namespace for new ROOT classes and functions.
virtual void ResetInitInfo(bool recurse)
Reset offset and StremerInfo information from this branch.
Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
TStreamerElement * GetStreamerElement(const char *datamember, Int_t &offset) const
Return the StreamerElement of "datamember" inside our class or any of its base classes.
void CreateIterators(void *collection, TVirtualCollectionProxy *proxy)
#define R__unlikely(expr)
std::vector< TIDNode > TIDs
virtual TClass * GetClass() const =0
Int_t GetNevBufSize() const
Long64_t fEntries
Number of entries.
virtual void InitInfo()
Init the streamer info for the branch class, try to compensate for class code unload/reload and schem...
TVirtualStreamerInfo * GetConversionStreamerInfo(const char *onfile_classname, Int_t version) const
Return a Conversion StreamerInfo from the class 'classname' for version number 'version' to this clas...
Double_t GetValue(Int_t i, Int_t len, Bool_t subarr=kFALSE) const
virtual TClass * GetValueClass() const =0
All ROOT classes may have RTTI (run time type identification) support added.
R__EXTERN TVirtualMutex * gInterpreterMutex
TString & ReplaceAll(const TString &s1, const TString &s2)
TString fParentName
Name of parent class.
virtual void WriteDouble32(Double_t *d, TStreamerElement *ele=0)=0
ReadLeaves_t fReadLeaves
! Pointer to the ReadLeaves implementation to use.
TStreamerElement * GetElement(Int_t id) const
const char * GetIconName() const
Return icon name depending on type of branch element.
T GetTypedValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
Return value of element i in object number j in a TClonesArray and eventually element k in a sub-arra...
virtual void SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
virtual void Reset(Option_t *option="")
Reset a Branch.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual void SetName(const char *name)
Set the name of the TNamed.
TBranch * GetSubBranch(const TBranch *br) const
Find the parent branch of child.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual Int_t GetEntries() const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
virtual void Commit(void *)=0
virtual TLeaf * FindLeaf(const char *name)
Find the leaf corresponding to the name 'searchname'.
Buffer base class used for serializing objects.
void FillLeavesCollectionMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
void SetName(const char *new_name)
Bool_t IsFolder() const
Return kTRUE if more than one leaf or browsables, kFALSE otherwise.
virtual TClass * GetCollectionClass() const
TStreamerInfo * GetInfo() const
Get streamer info for the branch class.
void FillLeavesCustomStreamer(TBuffer &b)
Write leaves into i/o buffers for this branch.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Long64_t GetDebugMin() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Int_t WriteTObject(const TObject *obj, const char *name=0, Option_t *="", Int_t=0)
See TDirectoryFile::WriteTObject for details.
void PrintValueClones(const char *name, TClonesArray *clones, Int_t i, Int_t eoffset, Int_t lenmax=1000) const
Print value of element i in a TClonesArray.
static void PrintElements(const TStreamerInfo *info, const TStreamerInfoActions::TIDs &ids)
Print branch parameters.
UInt_t fElemId
Identifier of the TStreamerElement.
TObjArray fBaskets
-> List of baskets of this branch
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
virtual void SetAddress(void *addobj)
Point this branch at an object.
static void R__CleanName(std::string &name)
Remove trailing dimensions and make sure there is a trailing dot.
Short_t Min(Short_t a, Short_t b)
virtual void SetTargetClass(const char *name)
Set the name of the class of the in-memory object into which the data will loaded.
static SequencePtr ReadMemberWiseActionsViaProxyGetter(TStreamerInfo *info, TVirtualCollectionProxy *collectionProxy, TClass *)
const char * GetClassName()
virtual void Clear(const char *opt="")=0
R__EXTERN TVirtualMutex * gROOTMutex
virtual void * New() const
virtual void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force)=0
void SetReadActionSequence()
Set the sequence of actions needed to read the data out of the buffer.
Int_t fNleaves
! Number of leaves
Int_t GetNelement() const
void ReadLeavesCollectionSplitVectorPtrMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
TObjArray fLeaves
-> List of leaves of this branch
TString & Prepend(const char *cs)
Long64_t * fBasketSeek
[fMaxBaskets] Addresses of baskets on file
TObject * At(Int_t idx) const
The addressing set have been called for this branch.
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill the basket buffer.
UInt_t fCheckSum
CheckSum of class.
void FillLeavesCollectionSplitVectorPtrMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual EDataType GetType() const =0
void SetupAddressesImpl()
If the branch address is not set, we set all addresses starting with the top level parent branch...
virtual Int_t GetMaximum() const
Return maximum count value of the branchcount if any.
TObject ** GetObjectRef() const
TStreamerInfoActions::TActionSequence * fFillActionSequence
! Set of actions to be executed to write the data to the basket.
void CreateIterators(void *collection, TVirtualCollectionProxy *proxy)
void PrintValue(const char *name, char *pointer, Int_t i, Int_t len, Int_t lenmax=1000) const
print value of element i in object at pointer The function may be called in two ways: -method1 len < ...
Bool_t fInit
! Initialization flag for branch assignment
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual TStreamerElement * GetElement(Int_t id) const =0
TClass * GetClass() const
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
void ReadLeavesClones(TBuffer &b)
Read leaves into i/o buffers for this branch.
Int_t * fBasketBytes
[fMaxBaskets] Length of baskets on file
virtual TList * GetBrowsables()
Returns (and, if 0, creates) browsable objects for this branch See TVirtualBranchBrowsable::FillListO...
TActionSequence * CreateSubSequence(const std::vector< Int_t > &element_ids, size_t offset)
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
virtual Bool_t CannotSplit() const
Returns true if the element cannot be split, false otherwise.
TStreamerInfo * FindOnfileInfo(TClass *valueClass, const TObjArray &branches) const
void ReadLeavesCustomStreamer(TBuffer &b)
Read leaves into i/o buffers for this branch.
void FillLeavesCollection(TBuffer &b)
Write leaves into i/o buffers for this branch.
#define R__LOCKGUARD_IMT(mutex)
void ReadLeavesMemberBranchCount(TBuffer &b)
Read leaves into i/o buffers for this branch.
Int_t fWriteBasket
Last basket number written.
Int_t fNdata
! Number of data in this branch
static SequencePtr ConversionReadMemberWiseActionsViaProxyGetter(TStreamerInfo *info, TVirtualCollectionProxy *collectionProxy, TClass *originalClass)
char * GetObjectAt(UInt_t ind) const
friend class TClonesArray
static SequencePtr WriteMemberWiseActionsCollectionGetter(TStreamerInfo *info, TVirtualCollectionProxy *, TClass *)
TVirtualArray * fOnfileObject
! Place holder for the onfile representation of data members.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
void SetFillActionSequence()
Set the sequence of actions needed to write the data out from the buffer.
TStreamerInfoActions::TActionSequence * fReadActionSequence
! Set of actions to be executed to extract the data from the basket.
virtual void SetAddress(void *addr)
Set Address.
virtual Bool_t IsWritable() const
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual Long64_t GetReadEntry() const
Int_t fMaximum
Maximum entries for a TClonesArray or variable array.
TVirtualStreamerInfo * GetStreamerInfoAbstractEmulated(Int_t version=0) const
For the case where the requestor class is emulated and this class is abstract, returns a pointer to t...
void ReadLeavesCollectionSplitPtrMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
void BuildTitle(const char *name)
Set branch and leaf name and title in the case of a container sub-branch.
virtual void ResetDeleteObject()
Release ownership of any allocated objects.
void FillLeavesClones(TBuffer &b)
Write leaves into i/o buffers for this branch.
static SequencePtr WriteMemberWiseActionsGetter(TStreamerInfo *info, TVirtualCollectionProxy *, TClass *)
void FillLeavesClonesMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
virtual void SetBasketSize(Int_t buffsize)
Reset the basket size for all sub-branches of this branch element.
Bool_t IsAutoDelete() const
Return kTRUE if an existing object in a TBranchObject must be deleted.
void ReadLeavesMemberCounter(TBuffer &b)
Read leaves into i/o buffers for this branch.
TString & Append(const char *cs)
Int_t * fBranchOffset
! Sub-Branch offsets with respect to current transient class
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE) const
Long_t GetThisOffset() const
TVirtualCollectionProxy * fCollProxy
! collection interface (if any)
virtual Bool_t SetMakeClass(Bool_t decomposeObj=kTRUE)
Set the branch in a mode where the object are decomposed (Also known as MakeClass mode)...
virtual void Browse(TBrowser *b)
Browse the branch content.
Version_t fClassVersion
Version number of class.
TObjArray * GetListOfBranches()
Ssiz_t First(char c) const
Find first occurrence of a character c.
Int_t fMaxBaskets
Maximum number of Baskets so far.
T GetTypedValue(Int_t i, Int_t len, Bool_t subarr=kFALSE) const
void FillLeavesMemberCounter(TBuffer &b)
Write leaves into i/o buffers for this branch.
void FillLeavesMemberBranchCount(TBuffer &b)
Write leaves into i/o buffers for this branch.
TString fClassName
Class name of referenced object.
virtual void ls(Option_t *option="") const
Print the content of the element.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of a BranchElement and return total number of bytes.
const TObjArray * GetStreamerInfos() const
virtual void SetAddress(void *add=0)
A branch containing and managing a TRefTable for TRef autoloading.
void SetFillLeavesPtr()
Set the FillLeaves pointer to execute the expected operations.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch after a Merge operation (drop data but keep customizations)
Bool_t IsMissingCollection() const
Detect a collection written using a zero pointer in old versions of root.
virtual TFile * GetFile() const
virtual const char * GetClonesName() const
Int_t fSplitLevel
Branch split level.
static SequencePtr ReadMemberWiseActionsCollectionGetter(TStreamerInfo *info, TVirtualCollectionProxy *, TClass *)
R__ALWAYS_INLINE Bool_t IsZombie() const
TString fClonesName
Name of class in TClonesArray (if any)
virtual void ResetAddress()
Set branch address to zero and free all allocated memory.
void ReadLeavesClonesMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
T GetTypedValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
Return value of element i in object number j in a TClonesArray and eventually element k in a sub-arra...
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
Need to pushd/pop fOnfileObject.
void FillLeavesMakeClass(TBuffer &b)
Write leaves into i/o buffers for this branch.
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
static SequencePtr ReadMemberWiseActionsGetter(TStreamerInfo *info, TVirtualCollectionProxy *, TClass *)
Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
Using a TBrowser one can browse all ROOT objects.
Bool_t IsCompiled() const
void(TBranch::* ReadLeaves_t)(TBuffer &b)
Int_t fID
element serial number in fInfo
void SetupInfo()
Set the value of fInfo.
void SetParentClass(TClass *clparent)
void ValidateAddress() const
virtual char * GetAddress() const
Get the branch address.
virtual const char * GetTypeName() const
Return type name of element in the branch.
static SequencePtr WriteMemberWiseActionsViaProxyGetter(TStreamerInfo *, TVirtualCollectionProxy *collectionProxy, TClass *)
Small helper class to generically acquire and release iterators.
TClass * GetClass() const
Int_t fBasketSize
Initial Size of Basket Buffer.
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
void ReadLeavesCollection(TBuffer &b)
Read leaves into i/o buffers for this branch.
friend class TLeafElement
virtual void SetupAddresses()
If the branch address is not set, we set all addresses starting with the top level parent branch...
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
UInt_t GetCheckSum() const
virtual void SetType(Int_t btype)
virtual void MapObject(const TObject *obj, UInt_t offset=1)
Add object to the fMap container.
virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object)=0
Basic data type descriptor (datatype information is obtained from CINT).
char * GetObject() const
Return a pointer to our object.
TClassRef fParentClass
! Reference to class definition in fParentName
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
virtual Bool_t HasPointers() const =0
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
TBranchElement * fBranchCount
pointer to primary branchcount branch
Int_t fStreamerType
branch streamer type
TClass * GetParentClass()
Return a pointer to the parent class of the branch element.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
FillLeaves_t fFillLeaves
! Pointer to the FillLeaves implementation to use.
virtual void * GetValuePointer() const
Returns pointer to first data element of this branch.
void SetActionSequence(TClass *originalClass, TStreamerInfo *localInfo, TStreamerInfoActions::TActionSequence::SequenceGetter_t create, TStreamerInfoActions::TActionSequence *&actionSequence)
Set the sequence of actions needed to read the data out of the buffer.
Int_t GetEntriesFast() const
void SetReadLeavesPtr()
Set the ReadLeaves pointer to execute the expected operations.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TClass * GetCurrentClass()
Return a pointer to the current type of the data member corresponding to branch element.
void ReadLeavesImpl(TBuffer &b)
Unconfiguration Read Leave function.
Manages buffers for branches of a Tree.
void Init(TTree *tree, TBranch *parent, const char *name, TStreamerInfo *sinfo, Int_t id, char *pointer, Int_t basketsize=32000, Int_t splitlevel=0, Int_t btype=0)
Init when the branch object is not a TClonesArray nor an STL container.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
TClassRef fCurrentClass
! Reference to current (transient) class definition
The TRealData class manages the effective list of all data members for a given class.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
Bool_t CanIgnoreTObjectStreamer()
The ROOT global object gROOT contains a list of all defined classes.
TClassRef fBranchClass
! Reference to class definition in fClassName
Bool_t fInInitInfo
! True during the 2nd part of InitInfo (cut recursion).
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
virtual TBranchRef * GetBranchRef() const
const char * GetFileName() const
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
static SequencePtr ReadMemberWiseActionsCollectionCreator(TStreamerInfo *info, TVirtualCollectionProxy *collectionProxy, TClass *)
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) const
virtual void WriteFastArray(const Bool_t *b, Int_t n)=0
A TLeaf for the general case when using the branches created via a TStreamerInfo (i.e.
virtual Int_t GetLenStatic() const
Return the fixed length of this leaf.
A Branch for the case of an object.
virtual void SetRequestedEntry(Long64_t entry)
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
static const Ssiz_t kNPOS
virtual void ReadFloat16(Float_t *f, TStreamerElement *ele=0)=0
TString & Remove(Ssiz_t pos)
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
void SetBranchCount(TBranchElement *bre)
Set the branch counter for this branch.
virtual Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection)=0
Int_t fSTLtype
! STL container type
Version_t GetClassVersion() const
virtual void MapObject(const TObject *obj, UInt_t offset=1)=0
TObject * UncheckedAt(Int_t i) const
virtual TVirtualArray * PopDataCache()
Pop and Return the 'current' data cache area from the list of area to be used for temporarily store '...
void Print(Option_t *="") const
This method must be overridden when a class wants to print itself.
virtual Int_t GetMaximum() const
Int_t fReadBasket
! Current basket number when reading
virtual void ResetAddress()
Reset the address of the branch.
virtual TObjArray * GetElements() const =0
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Bool_t IsFolder() const
Return kTRUE if more than one leaf, kFALSE otherwise.
void FillLeavesMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
Describe directory structure in memory.
TDirectory * GetDirectory() const
virtual Bool_t IsaPointer() const
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any. ...
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
Int_t IndexOf(const TObject *obj) const
unsigned long long ULong64_t
TList * GetListOfRealData() const
void SetBranchCount2(TBranchElement *bre)
TStreamerInfo * GetInfoImp() const
Get streamer info for the branch class.
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
virtual void SetObject(void *objadd)
Set object this branch is pointing to.
const char * GetCountName() const
More explicit alias for kMakeClass.
Int_t fBranchID
! ID number assigned by a TRefTable.
TBranchElement()
Default and I/O constructor.
virtual void * At(UInt_t idx)=0
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static constexpr double s
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual Int_t SetParent(const TObject *obj, Int_t branchID)
Set the current parent branch.
#define R__LOCKGUARD(mutex)
TTree * fTree
! Pointer to Tree header
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
TObjArray * GetListOfLeaves()
virtual void PushDataCache(TVirtualArray *)
Push a new data cache area onto the list of area to be used for temporarily store 'missing' data memb...
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
TClassRef fClonesClass
! Reference to class definition in fClonesName
virtual void SetOffset(Int_t offset)
Set offset of the object (to which the data member represented by this branch belongs) inside its con...
Bool_t IsPersistent() const
We are the owner of fObject.
TClass * GetClass() const
void ReadLeavesMakeClass(TBuffer &b)
Read leaves into i/o buffers for this branch.
Mother of all ROOT objects.
TObjArray * GetElements() const
virtual void ReadDouble32(Double_t *d, TStreamerElement *ele=0)=0
A Branch handling STL collection of pointers (vectors, lists, queues, sets and multisets) while stori...
SequencePtr(*)(TStreamerInfo *info, TVirtualCollectionProxy *collectionProxy, TClass *originalClass) SequenceGetter_t
virtual UInt_t Size() const =0
Bool_t fInitOffsets
! Initialization flag to not endlessly recalculate offsets
TClassRef is used to implement a permanent reference to a TClass object.
Int_t GetClassVersion() const
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Long64_t GetEntries() const
virtual void Print(Option_t *option="") const
Print TBranch parameters.
An array of clone (identical) objects.
Long64_t * fBasketEntry
[fMaxBaskets] Table of first entry in each basket
virtual ~TBranchElement()
Destructor.
static void SwitchContainer(TObjArray *)
Modify the container type of the branches.
void FillLeavesCollectionSplitPtrMember(TBuffer &b)
Write leaves into i/o buffers for this branch.
const char * GetTypeName() const
virtual void ExpandCreateFast(Int_t n)
Expand or shrink the array to n elements and create the clone objects by calling their default ctor...
virtual void Add(TObject *obj)
const char * GetCountName() const
TClass * GetNewClass() const
virtual void Reset(Option_t *option="")
Reset a Branch.
void FillLeavesImpl(TBuffer &b)
Unconfiguration Fill Leave function.
TVirtualCollectionIterators * fWriteIterators
! holds the read (non-staging) iterators when the branch is of fType==4 and associative containers...
Bool_t IsVersioned() const
void(TBranch::* FillLeaves_t)(TBuffer &b)
Long64_t fReadEntry
! Current entry number when reading
Long64_t GetReadEntry() const
virtual TClass * GetClass() const
TVirtualCollectionIterators * fIterators
! holds the iterators when the branch is of fType==4.
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
TBranch * fMother
! Pointer to top-level parent branch in the tree.
Int_t GetEntries() const
Return the number of objects in array (i.e.
Bool_t GetMakeClass() const
Return whether this branch is in a mode where the object are decomposed or not (Also known as MakeCla...
virtual const char * GetParentName() const
void PrintValueSTL(const char *name, TVirtualCollectionProxy *cont, Int_t i, Int_t eoffset, Int_t lenmax=1000) const
Print value of element i in a TClonesArray.
void SetSize(UInt_t size)
char * fObject
! Pointer to object at *fAddress
A TTree object has a header with a name and a title.
Int_t fEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
TDataMember * GetDataMember(const char *datamember) const
Return pointer to datamember object with name "datamember".
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
TObjArray fBranches
-> List of Branches of this branch
Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
A TTree is a list of TBranches.
Abstract Interface class describing Streamer information for one class.
Int_t fCompress
Compression level and algorithm.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void Print(Option_t *option="") const
Print TBranch parameters.
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Base class of the Configurations.
TBranch * fParent
! Pointer to parent branch.
TVirtualCollectionPtrIterators * fPtrIterators
! holds the iterators when the branch is of fType==4 and it is a split collection of pointers...
void CopyCollectionProxy(const TVirtualCollectionProxy &)
Copy the argument.
Int_t GetStreamerType() const
TStreamerInfo * fInfo
! Pointer to StreamerInfo
TRealData * GetRealData(const char *name) const
Return pointer to TRealData element with name "name".
void ReadLeavesMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
TBranch * GetMother() const
Get our top-level parent branch in the tree.
virtual void InitializeOffsets()
Initialize the base class subobjects offsets of our sub-branches and set fOffset if we are a containe...
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual const char * GetName() const
Return name of this collection.
Int_t GetCompressionSettings() const
TRangeDynCast is an adaptater class that allows the typed iteration through a TCollection.
virtual const char * GetTitle() const
Returns title of object.
TClass * GetClass() const
virtual TObjArray * GetListOfLeaves()
virtual TVirtualCollectionProxy * Generate() const =0
void ReadLeavesCollectionMember(TBuffer &b)
Read leaves into i/o buffers for this branch.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
void ReleaseObject()
Delete any object we may have allocated on a previous call to SetAddress.
void AddToOffset(Int_t delta)
const char * Data() const
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the automatic delete bit.
char * fAddress
! Address of 1st leaf (variable or object)