Dear all.
I am seeking help for a problem I am having troubles to debug.
I am storing into a tree objects from a custom class.
The relevant part is:
class MyObject : public TAGdata {
public:
/*
omissis
*/
ClassDef(MyObject,1)
public:
Short_t nhit; // nhit
TClonesArray* h; // hits
};
such TAGdata is written into a tree. As long as I use root (v. 5.3*) I can create my objects, fill the tree, close the rootfiles and read it back without problems.
When opening the root file I see the relative branches and I can click on them and navigate them (as you can see from the attached picture).
When switching to root 6.07/06 I am able to: compile the code without problems, run it, create the files. The same structure is created and no warning nor error message appears at runtime.
But when I try to access the info by navigating the TBrowser it fails with the following error messages, and I am no longer able to access the leaves.
Warning in TBufferFile::CheckObject: reference to object of unavailable class TClonesArray, offset=262145 pointer will be 0
Error in TBufferFile::CheckByteCount: object of class MyObject read too few bytes: 28 instead of 4277
Error in TExMap::Remove: key 262145 not found at 82
Furthermore if i try to read back the info from the root file I have a segmentation violation (the error message is attached below).
Any help on how to proceed with the debugging would be welcomed. Is any new feature introduced with root 6 that could cause such behavior?
Any documentation that I should have a look at?
Thanks,
Alessio
*** Break *** segmentation violation
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[/Users/Shared/Packages/root/lib/libCling.so] HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) /Users/Shared/Packages/root-6.06.94/core/meta/src/TCling.cxx:1862
[/Users/Shared/Packages/root/lib/libCling.so] TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) /Users/Shared/Packages/root-6.06.94/core/meta/src/TCling.cxx:2003
[/Users/Shared/Packages/root/lib/libCling.so] TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) /Users/Shared/Packages/root-6.06.94/core/meta/src/TCling.cxx:2840
[/Users/Shared/Packages/root/lib/libCore.so] TApplication::ExecuteFile(char const*, int*, bool) /Users/Shared/Packages/root-6.06.94/core/base/src/TApplication.cxx:1129
[/Users/Shared/Packages/root/lib/libRint.so] TRint::ProcessLineNr(char const*, char const*, int*) /Users/Shared/Packages/root-6.06.94/core/rint/src/TRint.cxx:756
[/Users/Shared/Packages/root/lib/libRint.so] TRint::Run(bool) /Users/Shared/Packages/root-6.06.94/core/rint/src/TRint.cxx:421
[/Users/Shared/Packages/root/bin/root.exe] main /Users/Shared/Packages/root-6.06.94/main/src/rmain.cxx:32
[]