TGraphErrors in ROOT6 vs ROOT5

Why is it that I have to do the following in root6 and not root5.

Root5

TGraphErrors *gr0 = new TGraphErrors(
      tree->GetSelectedRows(), tree->GetV2(),
      tree->GetV1(),  tree->GetV4(), tree->GetV3());

Root6

TGraphErrors *gr0 = new TGraphErrors(
      (Int_t)tree->GetSelectedRows(), (Double_t *)tree->GetV2(),
      (Double_t *)tree->GetV1(), (Double_t *)tree->GetV4(),(Double_t *)tree->GetV3());

If I tried running the code as written for Root5 I get an error that states that tree->GetV3() does not return a Double * . I checked GetV3() in root6 source code and it says it is a Double *.

For me without casting works fine. So, I cannot reproduce your problem.

@luismorales, maybe posting the exact error message you get might help with finding the source of the problem.

Axel.

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