Function DividePad() is not defined in current scope

Dear Experts,

I am trying to run the macro: b2_style_pad.C (9.7 KB) which uses the root file: for_fds_plots.root (177.2 KB). I have defined a function DividePad for my requirements but I receive he error:

_> _root [0]

Processing b2_style_pad.C…
Error: Function DividePad(2,2,0.2,0.2,0.2,0.2) is not defined in current scope b2_style_pad.C:196:
*** Interpreter error recovered ***
root [1]

I am not able to figure oy=ur why I am receiving this. Will you please help me get the macro working?

Grarefully,
Sanjeeda
_
Please read tips for efficient and successful posting and posting code

ROOT Version: 5.34
Platform: ubuntu 16.04
Compiler: Not Provided


Hi Sanjeeda,

you call your function as

DividePad(2,2,0.2,0.2,0.2,0.2);

, while you declare it like

void DividePad(Int_t nx, Int_t ny, Float_t l, Float_t r, Float_t t, Float_t b, TPad *gpad)

That is, you should feed the function a TPad pointer as the last parameter, e.g.

DividePad(2,2,0.2,0.2,0.2,0.2, mypad);
1 Like

Thanks a lot @yus.