How to get only axis and name of an histogram

Dear experts,

I want to “clone” or “copy” everything from an histogram, except the events is contains. So the clone or copy should should have everything (axis, title, bin etc…) but it should be empty. How Can I do that?
PS: do not want to clone and then set the bin to 0. What I need is really to copy the histogram “structure” only.

Regards

Try something like:

TH1D *NewHist = new TH1D(*OldHist);
NewHist->SetName("NewHist"); // change its "name" (its "title" is not changed)
NewHist->Reset("M"); // ("") ... or ... ("M")

Dear Coyote,
ok, thank you for your answer.
Regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.