Message: Brachytherapy example: TG43_relative_dose.C issue Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Brachytherapy example: TG43_relative_dose.C issue 

Forum: Medical Applications
Date: 10 Apr, 2018
From: Lara Mason <Lara Mason>

Hi experts,

I'm attempting to use the ROOT macro TG43_relative_dose.C to compare to reference data. When I try to run it out of the box I get the error

Processing TG43_relative_dose.C...
input_line_13:2:6: error: member reference type 'TH2F *' is a pointer; did you mean to use '->'?
 (h20.GetXaxis()->GetBinCenter(((*(int*)0x7fff503611d0))))
  ~~~^
     ->
libc++abi.dylib: terminating with uncaught exception of type cling::CompilationException: Error evaluating expression (h20.GetXaxis()->GetBinCenter(((*(int*)0x7fff503611d0))))

This is complaining about the lines

   Double_t xx_histo = h20.GetXaxis()->GetBinCenter(k);
   Double_t yy_histo = h20.GetYaxis()->GetBinCenter(m);
   Double_t edep_histo=h20.GetBinContent(k, m);

However, when I switch them to

   Double_t xx_histo = h20->GetXaxis()->GetBinCenter(k);
   Double_t yy_histo = h20->GetYaxis()->GetBinCenter(m);
   Double_t edep_histo=h20->GetBinContent(k, m);

And try

root -l TG43_relative_dose.C

again, it just runs indefinitely, returning no output and no errors and never completing.

What am I doing wrong here?

Thanks in advance for your help.

Lara

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: RE: Brachytherapy example: TG43_relative_dose.C issue   (Susanna Guatelli - 10 Apr, 2018)
(_ None: Re: Brachytherapy example: TG43_relative_dose.C issue   (Lara Mason - 10 Apr, 2018)
 Add Message Add Message
to: "Brachytherapy example: TG43_relative_dose.C issue"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]