RootTalk


ROOT Discussion Forums

Failed to ".L testClass.C" freshly produced from "MakeClass"

Discuss installing and running ROOT here. Please post bug reports here.

Moderator: rootdev

Failed to ".L testClass.C" freshly produced from "MakeClass"

Unread postby jasonyctam » Tue Jan 11, 2011 16:21

Hi,

Sorry for potentially asking a super stupid question as I am a newbie in ROOT.

I am trying to produce some plots of variables with cuts from a .root file (eg: muon_pt for all muon_pt > 20GeV etc...)

so I have written and ran the following:

{
gROOT->Reset();
TChain * chain = new TChain("","");
chain->Add("ROOTFile.root/physics");
chain->MakeClass("testClass");
}


then testClass.C and testClass.h were produced. I then added the line

#include "l.C"

where l.C has the content

// File loader.C
#include <vector>
#ifdef __MAKECINT__
#pragma link C++ class vector<double>+;
#pragma link C++ class vector<float>+;
#pragma link C++ class vector<int>+;
#pragma link C++ class vector<TVector3>+;
#pragma link C++ class vector<vector<double> >+;
#pragma link C++ class vector<vector<float> >+;
#pragma link C++ class vector<vector<int > >+;
#endif

#ifdef __CINT__
#pragma link C++ class vector<double>+;
#pragma link C++ class vector<int>+;
#pragma link C++ class vector<TVector3>+;
#pragma link C++ class vector<vector<double> >+;
#pragma link C++ class vector<vector<int > >+;
#pragma link C++ class vector<float>+;
#pragma link C++ class vector<vector<float> >+;
#endif


which helped to resolve some problems from some interestingly declared variables in the generated header file.

I then executed .L testClass.C and got the following:

In file included from /tmp/rootcint_A7iPcu.h:3,
from /tmp/EgcDIP_cint.cxx:1:
/home/jasontam/Work/ROOTFiles/AutoDict_vector_TVector3_.cxx:2:30: error: include/TVector3.h: No such file or directory
Error: external preprocessing failed. :0:
!!!Removing /home/jasontam/Work/ROOTFiles/AutoDict_vector_TVector3__cxx_ACLiC_dict.cxx /home/jasontam/Work/ROOTFiles/AutoDict_vector_TVector3__cxx_ACLiC_dict.h !!!
Error: /home/jasontam/root/bin/rootcint: error loading headers...
Error in <ACLiC>: Dictionary generation failed!
AutoDict_vector_TVector3_.cxx:2:30: error: include/TVector3.h: No such file or directory
In file included from /tmp/rootcint_hjgBEE.h:3,
from /tmp/CdI2L0_cint.cxx:1:
/home/jasontam/Work/ROOTFiles/AutoDict_random_access_iterator_TVector3_long_.cxx:2:30: error: include/TVector3.h: No such file or directory
Error: external preprocessing failed. :0:
!!!Removing /home/jasontam/Work/ROOTFiles/AutoDict_random_access_iterator_TVector3_long__cxx_ACLiC_dict.cxx /home/jasontam/Work/ROOTFiles/AutoDict_random_access_iterator_TVector3_long__cxx_ACLiC_dict.h !!!
Error: /home/jasontam/root/bin/rootcint: error loading headers...
Error in <ACLiC>: Dictionary generation failed!
AutoDict_random_access_iterator_TVector3_long_.cxx:2:30: error: include/TVector3.h: No such file or directory


and I have checked that TVector3.h is where it is suppose to be. I am suspecting the root application that I have installed is not complete, as this happened on 3 different machines (Linux Mint, Ubuntu and SL5), all with root installed from 5.28 complete source tree for all systems.

Any ideas?

Cheers
Jason
jasonyctam
 
Posts: 27
Joined: Tue Jan 11, 2011 16:00

Re: Failed to ".L testClass.C" freshly produced from "MakeCl

Unread postby Axel » Wed Jan 12, 2011 12:53

Hi Jason,

I can reproduce the issue, I am debugging... I'll let you know when it's fixed.

Axel.
User avatar
Axel
 
Posts: 2002
Joined: Wed Sep 03, 2003 21:35
Location: CERN

Re: Failed to ".L testClass.C" freshly produced from "MakeCl

Unread postby Axel » Thu Jan 13, 2011 11:40

Hi,

fixed in the trunk and in v5-28-00-patches - thanks for your report!

Cheers, Axel.
User avatar
Axel
 
Posts: 2002
Joined: Wed Sep 03, 2003 21:35
Location: CERN


Return to ROOT Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests