I’m using ROOT 6.30/04, I have a header file HH.h and the python file aa.py, I tried to use the HH.h in aa.py using “ROOT.gInterpreter.Declare”. However I got following error:
cling JIT session error: Failed to materialize symbols: { (main, { _ZN4TH2DD1Ev, _ZN4TH2DC1Ev }) }
Error in <TClingCallFunc::make_ctor_wrapper>: Failed to compile
==== SOURCE BEGIN ====
__attribute__((used)) extern "C" void __ctor_11(void** ret, void* arena, unsigned long nary)
{
if (!arena) {
if (!nary) {
*ret = new TH2D;
}
else {
*ret = new TH2D[nary];
}
}
else {
if (!nary) {
*ret = new (arena) TH2D;
}
else {
*ret = new (arena) TH2D[nary];
}
}
}
==== SOURCE END ====
Error in <TClingCallFunc::ExecDefaultConstructor>: Called with no wrapper, not implemented!
Error in <TClingClassInfo::New()>: Call of default constructor failed to return an object for class: TH2D
Error in <TClass::New>: cannot create object of class TH2D
Error in <TKey::ReadObj>: Cannot create new object of class TH2D
if I comment out “TH2D*h2_eleID=(TH2D*)f_eleID->Get("EleIDSF");” in the HH.h, the error is gone. Could you please tell me how to fix it. BTW, everything is fine when I use ROOT 6.14/09
Thanks very much for helping. Actually I am trying to read the root file and using the TH2D object inside. After put the HH_header_path inside main seems reduce the error. However, when I try to extract the TH2D object, there are warnings
[melu@lxplus811 WWW]$ python3 aa.py
Job starts
cling JIT session error: Failed to materialize symbols: { (main, { _ZN12TPaletteAxisD1Ev, _ZN12TPaletteAxisC1Ev }) }
Error in <TClingCallFunc::make_ctor_wrapper>: Failed to compile
==== SOURCE BEGIN ====
__attribute__((used)) extern "C" void __ctor_11(void** ret, void* arena, unsigned long nary)
{
if (!arena) {
if (!nary) {
*ret = new TPaletteAxis;
}
else {
*ret = new TPaletteAxis[nary];
}
}
else {
if (!nary) {
*ret = new (arena) TPaletteAxis;
}
else {
*ret = new (arena) TPaletteAxis[nary];
}
}
}
==== SOURCE END ====
Error in <TClingCallFunc::ExecDefaultConstructor>: Called with no wrapper, not implemented!
Error in <TClingClassInfo::New()>: Call of default constructor failed to return an object for class: TPaletteAxis
Error in <TClass::New>: cannot create object of class TPaletteAxis
Error in <TBufferFile::ReadObject>: could not create object of class TPaletteAxis
Error in <TBufferFile::CheckByteCount>: object of class TList read too few bytes: 103 instead of 353
TEST!
wall time: 0.0990290641784668
process time: 0.09813286700000001
I put all the files in the attachment, and I’m running at lxplus8 with default env.
Another interesting thing is that, if I only extract two TH2D objs, i.e.,