Fast copy of axis attributes of a histogram

From: Vassili Maroussov <Vassili.Maroussov_at_cern.ch>
Date: Thu, 21 Feb 2008 19:17:34 +0100


Dear ROOTers,

I'm wondering whether there is a fast way to copy all attributes (number of bins, title, etc.) of an axis of one histogram to an axis of another. A mean, something like

TH2F hist1(...);
TH1F hist2(...);

*(hist2.GetXaxis()) = *(hist1.GetYaxis());

Is the operation above correct or in general it creates a corrupted histogram with an improper set number of bins?

Regards,

Vassili Received on Thu Feb 21 2008 - 19:17:41 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 21 2008 - 23:50:02 CET