Chris Green wrote:
>
> Hi,
>
> Can someone tell me what's wrong with this:
>
> TH2F *h1 = new TH2F("hf1","Total Cross-sections at 161 GeV",71,19.5,90.5,71,19.5,90.5);
> TH2F *h2 = new TH2F();
> h1->Copy(h2);
> h2->TNamed("h2","Left-handed Cross-sections at 161 GeV");
>
You can do, either:
TH2F *h1 = new TH2F("hf1","Total Cross-sections at 161GeV",71,19.5,90.5,71,19.5,90.5);
TH2F *h2 = new TH2F();
h1->Copy(*h2);
h2->SetName("h2");
h2->SetTitle("Left-handed Cross-sections at 161 GeV");
or:
TH2F h1("hf1","Total Cross-sections at 161 GeV",71,19.5,90.5,71,19.5,90.5);
TH2F h2();
h1.Copy(h2);
h2.SetName("h2");
h2.SetTitle("Left-handed Cross-sections at 161 GeV");
In version 1.00, one can do directly:
TH2F h2 = h1;
Rene Brun
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:18 MET