Skip to content
Snippets Groups Projects
Commit 503fe330 authored by Axel Naumann's avatar Axel Naumann
Browse files

Let the browser show default axis names if none exist (e.g. for old THnBases).

git-svn-id: http://root.cern.ch/svn/root/trunk@43563 27541ba8-7e3a-0410-8455-c3a389f83636
parent ad7332a3
No related branches found
No related tags found
No related merge requests found
...@@ -1433,12 +1433,17 @@ ClassImp(ROOT::THnBaseBrowsable); ...@@ -1433,12 +1433,17 @@ ClassImp(ROOT::THnBaseBrowsable);
//______________________________________________________________________________ //______________________________________________________________________________
ROOT::THnBaseBrowsable::THnBaseBrowsable(THnBase* hist, Int_t axis): ROOT::THnBaseBrowsable::THnBaseBrowsable(THnBase* hist, Int_t axis):
TNamed(hist->GetAxis(axis)->GetName(),
TString::Format("Projection on %s of %s", hist->GetAxis(axis)->GetName(),
hist->IsA()->GetName()).Data()),
fHist(hist), fAxis(axis), fProj(0) fHist(hist), fAxis(axis), fProj(0)
{ {
// Construct a THnBaseBrowsable. // Construct a THnBaseBrowsable.
TString axisName = hist->GetAxis(axis)->GetName();
if (axisName.IsNull()) {
axisName = TString::Format("axis %d", axis);
}
SetNameTitle(axisName,
TString::Format("Projection on %s of %s", axisName.Data(),
hist->IsA()->GetName()).Data());
} }
//______________________________________________________________________________ //______________________________________________________________________________
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment