Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial version of TBranchPrecisionCascade Print #19

Merged
merged 2 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tree/tree/inc/TBranchPrecisionCascade.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class TBranchPrecisionCascade : public TNamed

char *RetrieveCascade(TTree &tree, Int_t basketnumber);

void Print(Option_t *option="") const;

ClassDef(TBranchPrecisionCascade, 3);
};

Expand Down
10 changes: 10 additions & 0 deletions tree/tree/src/TBranchPrecisionCascade.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ supplemental parts of the precision cascades for a specific branch.
#include "TStorage.h"
#include "TTree.h"
#include "TFile.h"
#include <iostream>

namespace ROOT {
namespace Detail {
Expand Down Expand Up @@ -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: " << (fBasketBytes ? *fBasketBytes : 0) << std::endl;
genevb marked this conversation as resolved.
Show resolved Hide resolved
}

} // Details
} // ROOT
2 changes: 2 additions & 0 deletions tree/tree/src/TTreePrecisionCascade.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down