[Urgent]cannot open file "ExRootAnalysis/ExRootAnalysis.h"


I am new to ExRooTAnalysis, and recently want to make use of ROOT and this package to do some analysis.

However, when I try #include “ExRootAnalysis/ExRootAnalysis.h” in my (let’s say) analysis.C, in the root terminal,

[0] .x analysis.C()

it gives:
Error: cannot open file “ExRootAnalysis/ExRootAnalysis.h” (tmpfile):2:
*** Interpreter error recovered ***

But before that, I already set in the ~/.bash that

export ROOTSYS=/usr/local/root
export PATH=$ROOTSYS/bin:$PATH

I am wondering what else I am supposed to set further…

Your helps are always welcome and highly appreciated.


Hi John,

Cheers, Bertrand.

[quote=“bellenot”]Hi John,

Cheers, Bertrand.[/quote]

Hi Bertrand,

Thank you so much for your help. I can finally include the package. However, when I try to “.L analysis.C”, in which the content is:

[code]#include “ExRootAnalysis/ExRootAnalysis.h”

void analysis() {
cout<<“Hello World!”<<endl;

it comes up with the following warning:

Info in <TUnixSystem::ACLiC>: creating shared library /home/xxx/Desktop/analysis/./analysis_C.so In file included from /home/xxx/Desktop/MG5/ExRootAnalysis/ExRootAnalysis/ExRootTask.h:16:0, from /home/xxx/Desktop/MG5/ExRootAnalysis/ExRootAnalysis/ExRootAnalysis.h:17, from /home/xxx/Desktop/analysis/./analysis.C:1, from /home/xxx/Desktop/analysis/analysis_C_ACLiC_dict.h:34, from /home/xxx/Desktop/analysis/analysis_C_ACLiC_dict.cxx:17: /usr/local/root/include/TTask.h:60:18: warning: ‘virtual void TTask::Clear(Option_t*)’ was hidden [-Woverloaded-virtual] virtual void Clear(Option_t *option=""); ^ In file included from /home/xxx/Desktop/analysis/./analysis.C:1:0, from /home/xxx/Desktop/analysis/analysis_C_ACLiC_dict.h:34, from /home/xxx/Desktop/analysis/analysis_C_ACLiC_dict.cxx:17: /home/xxx/Desktop/MG5/ExRootAnalysis/ExRootAnalysis/ExRootAnalysis.h:50:16: warning: by ‘virtual void ExRootAnalysis::Clear()’ [-Woverloaded-virtual] virtual void Clear(); ^

Are there any thing wrong with my ExRootAnalysis?


You’re welcome! And the warning tells you that TTask::Clear(Option_t*) is hidden by ExRootAnalysis::Clear() (this is a warning coming from the implementation of ExRootAnalysis). See for example Why does an overridden function in the derived class hide other overloads of the base class?

Cheers, Bertrand.

Hi Bertrand,

Thank you so much for your patient.
I found that if I “.X analysis.C()” instead of “.L analysis.C”, it works very properly.

Thank you for your help once again.