Macros working in root5 give error in root6


Two days back, I upgraded my mac OS from Sierra to HighSierra and I successfully installed ROOT6 today following the recipe here[1]. The xcode version is 9.1. But when I’m trying to run the macros which used to work fine in root5 now gives the error. For example, you can consider the attached macro. While running this it gives me

/Users/niladri/ error: use of undeclared identifier ‘DrawExclusion’
/Users/niladri/ error: use of undeclared identifier ‘DrawExclusion’

and I also tried few other macros, the similar type error is also found there. Is it a bug in ROOT6 or is there any workaround for this ? It seems me that I need to change/modify all my old macros to make it work in root6. I would really appreciate if you have any comments/suggestions.

thanks & cheers, Niladri

[1] Load Error: Failed to load Dynamic link library root (1.2 KB)

ROOT6 seems to play more by C++ rules than ROOT5. In this case, you need to have declared the DrawExclusion function before you can call it. Either make an external .h-file, or just put the declarations on top of the file, like so

TCutG* DrawExclusion (double Xlow, double Xhigh, double Ylow, double Yhigh, unsigned int fillStyle, unsigned int color,TString name);

Indeed ROOT is fully C++ …

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