diff --git a/tree/tree/inc/TBranchPrecisionCascade.h b/tree/tree/inc/TBranchPrecisionCascade.h index 345e64615c035..90b75332964b2 100644 --- a/tree/tree/inc/TBranchPrecisionCascade.h +++ b/tree/tree/inc/TBranchPrecisionCascade.h @@ -54,6 +54,8 @@ class TBranchPrecisionCascade : public TNamed char *RetrieveCascade(TTree &tree, Int_t basketnumber); + void Print(Option_t *option="") const; + ClassDef(TBranchPrecisionCascade, 3); }; diff --git a/tree/tree/src/TBranchPrecisionCascade.cxx b/tree/tree/src/TBranchPrecisionCascade.cxx index 435cb0e1c72e4..927bdf924b5ce 100644 --- a/tree/tree/src/TBranchPrecisionCascade.cxx +++ b/tree/tree/src/TBranchPrecisionCascade.cxx @@ -23,6 +23,7 @@ supplemental parts of the precision cascades for a specific branch. #include "TStorage.h" #include "TTree.h" #include "TFile.h" +#include namespace ROOT { namespace Detail { @@ -116,5 +117,14 @@ char *TBranchPrecisionCascade::RetrieveCascade(TTree &tree, Int_t basketnumber) return basket->GetBuffer(); } +//////////////////////////////////////////////////////////////////////////////// +/// Print the object's information. +void TBranchPrecisionCascade::Print(Option_t * /* option = "" */) const +{ + std::cout << "TBranchPrecisionCascade: " << GetName() + << "\tlevel: " << fCascadeLevel + << "\tBasket Size (approx): " << (fBasketBytes ? *fBasketBytes : 0) << std::endl; +} + } // Details } // ROOT \ No newline at end of file diff --git a/tree/tree/src/TTreePrecisionCascade.cxx b/tree/tree/src/TTreePrecisionCascade.cxx index 7200534514f14..1043013ad5116 100644 --- a/tree/tree/src/TTreePrecisionCascade.cxx +++ b/tree/tree/src/TTreePrecisionCascade.cxx @@ -69,6 +69,8 @@ void TTreePrecisionCascade::Print(Option_t * /* option = "" */) const << "\tTTree uniqueID: " << fTreeRef.GetUniqueID() << "\tTTree pid: " << fTreeRef.GetPID()->GetUniqueID() << "\tlevel: " << fCascadeLevel << std::endl; + for (auto b : fBranches) + if (b) b->Print(); } // Create a new TBranchPrecisionCascade