CheckByteCount and Streamer Error

Hello,

root-config --version = 6.26/06

I had a look to the following posts

But still I cannot find where the problem is coming from.

As you can see at the following PR, I just added a new data member to the class and increased the class version of TRestAxionGeneratorProcess.

But, when trying to open files generated with a previous version, e.g. the files located at framework-data/pipeline/dataset at main · rest-for-physics/framework-data · GitHub

I get the following error output:

root [1] TRestRun r("../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root")
Error in <TBufferFile::CheckByteCount>: object of class TRestAxionGeneratorProcess read too many bytes: 1646 instead of 1638
Warning in <TBufferFile::CheckByteCount>: TRestAxionGeneratorProcess::Streamer() not in sync with data on file ../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root, fix Streamer()

TRestRun will just end up calling TFile to open the file.

The compilation seems to generate the proper pragma file

jgalan@sultan2:~/rest-framework/build$ ls -lrth rootdict/*AxionGenerator*
-rw-r--r-- 1 jgalan departamento  231 Dec  9 17:12 rootdict/TRestAxionGeneratorProcess_Linkdef.h
-rw-r--r-- 1 jgalan departamento 2.2K Dec  9 17:12 rootdict/CINT_TRestAxionGeneratorProcess_rdict.pcm
-rw-r--r-- 1 jgalan departamento 8.1K Dec  9 17:12 rootdict/CINT_TRestAxionGeneratorProcess.cxx

Inside LinkDef file we get:

#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ nestedclasses;
#pragma link C++ nestedclasses;
#pragma link C++ class TRestAxionGeneratorProcess+;
#endif

If it helps here I post the output of compilation after touch ../source/libraries/axion/inc/TRestAxionGeneratorProcess.h.

jgalan@sultan2:~/rest-framework/build$ make VERBOSE=1
/usr/bin/cmake -S/home/jgalan/rest-framework -B/home/jgalan/rest-framework/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/jgalan/rest-framework/build/CMakeFiles /home/jgalan/rest-framework/build//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/jgalan/rest-framework/build'
make  -f source/framework/CMakeFiles/RestFramework.dir/build.make source/framework/CMakeFiles/RestFramework.dir/depend
make[2]: Entering directory '/home/jgalan/rest-framework/build'
cd /home/jgalan/rest-framework/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/jgalan/rest-framework /home/jgalan/rest-framework/source/framework /home/jgalan/rest-framework/build /home/jgalan/rest-framework/build/source/framework /home/jgalan/rest-framework/build/source/framework/CMakeFiles/RestFramework.dir/DependInfo.cmake --color=
...
Consolidate compiler generated dependencies of target RestFramework
make[2]: Leaving directory '/home/jgalan/rest-framework/build'
make  -f source/framework/CMakeFiles/RestFramework.dir/build.make source/framework/CMakeFiles/RestFramework.dir/build
make[2]: Entering directory '/home/jgalan/rest-framework/build'
make[2]: Nothing to be done for 'source/framework/CMakeFiles/RestFramework.dir/build'.
make[2]: Leaving directory '/home/jgalan/rest-framework/build'
[ 65%] Built target RestFramework
make  -f source/bin/CMakeFiles/restRoot.dir/build.make source/bin/CMakeFiles/restRoot.dir/depend
make[2]: Entering directory '/home/jgalan/rest-framework/build'
cd /home/jgalan/rest-framework/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/jgalan/rest-framework /home/jgalan/rest-framework/source/bin /home/jgalan/rest-framework/build /home/jgalan/rest-framework/build/source/bin /home/jgalan/rest-framework/build/source/bin/CMakeFiles/restRoot.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/jgalan/rest-framework/build'
make  -f source/bin/CMakeFiles/restRoot.dir/build.make source/bin/CMakeFiles/restRoot.dir/build
make[2]: Entering directory '/home/jgalan/rest-framework/build'
make[2]: Nothing to be done for 'source/bin/CMakeFiles/restRoot.dir/build'.
make[2]: Leaving directory '/home/jgalan/rest-framework/build'
[ 66%] Built target restRoot
make  -f source/bin/CMakeFiles/restManager.dir/build.make source/bin/CMakeFiles/restManager.dir/depend
make[2]: Entering directory '/home/jgalan/rest-framework/build'
cd /home/jgalan/rest-framework/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/jgalan/rest-framework /home/jgalan/rest-framework/source/bin /home/jgalan/rest-framework/build /home/jgalan/rest-framework/build/source/bin /home/jgalan/rest-framework/build/source/bin/CMakeFiles/restManager.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/jgalan/rest-framework/build'
make  -f source/bin/CMakeFiles/restManager.dir/build.make source/bin/CMakeFiles/restManager.dir/build
make[2]: Entering directory '/home/jgalan/rest-framework/build'
make[2]: Nothing to be done for 'source/bin/CMakeFiles/restManager.dir/build'.
make[2]: Leaving directory '/home/jgalan/rest-framework/build'
[ 67%] Built target restManager
make  -f source/libraries/axion/CMakeFiles/RestAxion.dir/build.make source/libraries/axion/CMakeFiles/RestAxion.dir/depend
make[2]: Entering directory '/home/jgalan/rest-framework/build'
[ 68%] generating: /home/jgalan/rest-framework/build/rootdict/CINT_TRestAxionGeneratorProcess.cxx with /home/jgalan/rest-framework/source/libraries/axion/inc/TRestAxionGeneratorProcess.h;/home/jgalan/rest-framework/build/rootdict/TRestAxionGeneratorProcess_Linkdef.h
cd /home/jgalan/rest-framework/source/libraries/axion && LD_LIBRARY_PATH=/programas/root/6.26.06/lib:/home/jgalan/rest-framework/install/lib:/programas/root/6.26.06/lib /programas/root/6.26.06/bin/rootcint -f /home/jgalan/rest-framework/build/rootdict/CINT_TRestAxionGeneratorProcess.cxx -I../include	-I/home/jgalan/rest-framework/source/framework/external/tinyxml	-I/home/jgalan/rest-framework/source/framework/external/tinyxml/inc	-I/home/jgalan/rest-framework/source/framework/tools	-I/home/jgalan/rest-framework/source/framework/tools/inc	-I/home/jgalan/rest-framework/source/framework/core	-I/home/jgalan/rest-framework/source/framework/core/inc	-I/home/jgalan/rest-framework/source/framework/analysis	-I/home/jgalan/rest-framework/source/framework/analysis/inc	-I/home/jgalan/rest-framework/source/framework/masks	-I/home/jgalan/rest-framework/source/framework/masks/inc	-I/home/jgalan/rest-framework/source/libraries/axion	-I/home/jgalan/rest-framework/source/libraries/axion/inc	-I/programas/root/6.26.06/include	-I/usr/include	-I/include TRestAxionGeneratorProcess.h /home/jgalan/rest-framework/build/rootdict/TRestAxionGeneratorProcess_Linkdef.h
cd /home/jgalan/rest-framework/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/jgalan/rest-framework /home/jgalan/rest-framework/source/libraries/axion /home/jgalan/rest-framework/build /home/jgalan/rest-framework/build/source/libraries/axion /home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/DependInfo.cmake --color=
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionAnalysisProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionBufferGas.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionDetectorResponseProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionDeviationProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionEvent.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionEventProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionField.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionFieldPropagationProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionGeneratorProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionLikelihood.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionMCPLOptics.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionMagneticField.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionOptics.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionOpticsMirror.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionOpticsProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionSolarFlux.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionSolarModel.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionSpectrum.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionTemplate.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionTransmissionProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionTransportProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionTrueWolterOptics.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionWolterOptics.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionXrayWindow.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Dependencies file "source/libraries/axion/CMakeFiles/RestAxion.dir/src/TRestAxionGeneratorProcess.cxx.o.d" is newer than depends file "/home/jgalan/rest-framework/build/source/libraries/axion/CMakeFiles/RestAxion.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target RestAxion
make[2]: Leaving directory '/home/jgalan/rest-framework/build'
make  -f source/libraries/axion/CMakeFiles/RestAxion.dir/build.make source/libraries/axion/CMakeFiles/RestAxion.dir/build
make[2]: Entering directory '/home/jgalan/rest-framework/build'
[ 69%] Building CXX object source/libraries/axion/CMakeFiles/RestAxion.dir/src/TRestAxionGeneratorProcess.cxx.o
cd /home/jgalan/rest-framework/build/source/libraries/axion && /usr/bin/c++ -DLIBRARY_VERSION=\"1.0\" -DRestAxion_EXPORTS -DUSE_Eve -DUSE_MPFR -I/programas/root/6.26.06/include -I/home/jgalan/rest-framework/source/framework/external/tinyxml -I/home/jgalan/rest-framework/source/framework/external/tinyxml/inc -I/home/jgalan/rest-framework/source/framework/tools -I/home/jgalan/rest-framework/source/framework/tools/inc -I/home/jgalan/rest-framework/source/framework/core -I/home/jgalan/rest-framework/source/framework/core/inc -I/home/jgalan/rest-framework/source/framework/analysis -I/home/jgalan/rest-framework/source/framework/analysis/inc -I/home/jgalan/rest-framework/source/framework/masks -I/home/jgalan/rest-framework/source/framework/masks/inc -I/home/jgalan/rest-framework/source/libraries/axion -I/home/jgalan/rest-framework/source/libraries/axion/inc -I/include -lstdc++fs -fPIC -std=gnu++17 -MD -MT source/libraries/axion/CMakeFiles/RestAxion.dir/src/TRestAxionGeneratorProcess.cxx.o -MF CMakeFiles/RestAxion.dir/src/TRestAxionGeneratorProcess.cxx.o.d -o CMakeFiles/RestAxion.dir/src/TRestAxionGeneratorProcess.cxx.o -c /home/jgalan/rest-framework/source/libraries/axion/src/TRestAxionGeneratorProcess.cxx
[ 69%] Building CXX object source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionGeneratorProcess.cxx.o
cd /home/jgalan/rest-framework/build/source/libraries/axion && /usr/bin/c++ -DLIBRARY_VERSION=\"1.0\" -DRestAxion_EXPORTS -DUSE_Eve -DUSE_MPFR -I/programas/root/6.26.06/include -I/home/jgalan/rest-framework/source/framework/external/tinyxml -I/home/jgalan/rest-framework/source/framework/external/tinyxml/inc -I/home/jgalan/rest-framework/source/framework/tools -I/home/jgalan/rest-framework/source/framework/tools/inc -I/home/jgalan/rest-framework/source/framework/core -I/home/jgalan/rest-framework/source/framework/core/inc -I/home/jgalan/rest-framework/source/framework/analysis -I/home/jgalan/rest-framework/source/framework/analysis/inc -I/home/jgalan/rest-framework/source/framework/masks -I/home/jgalan/rest-framework/source/framework/masks/inc -I/home/jgalan/rest-framework/source/libraries/axion -I/home/jgalan/rest-framework/source/libraries/axion/inc -I/include -lstdc++fs -fPIC -std=gnu++17 -MD -MT source/libraries/axion/CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionGeneratorProcess.cxx.o -MF CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionGeneratorProcess.cxx.o.d -o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionGeneratorProcess.cxx.o -c /home/jgalan/rest-framework/build/rootdict/CINT_TRestAxionGeneratorProcess.cxx
[ 69%] Linking CXX shared library libRestAxion.so
cd /home/jgalan/rest-framework/build/source/libraries/axion && /usr/bin/cmake -E cmake_link_script CMakeFiles/RestAxion.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -lstdc++fs -shared -Wl,-soname,libRestAxion.so -o libRestAxion.so CMakeFiles/RestAxion.dir/src/TRestAxionAnalysisProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionBufferGas.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionDetectorResponseProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionDeviationProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionEvent.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionEventProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionField.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionFieldPropagationProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionGeneratorProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionLikelihood.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionMCPLOptics.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionMagneticField.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionOptics.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionOpticsMirror.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionOpticsProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionSolarFlux.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionSolarModel.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionSpectrum.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionTemplate.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionTransmissionProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionTransportProcess.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionTrueWolterOptics.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionWolterOptics.cxx.o CMakeFiles/RestAxion.dir/src/TRestAxionXrayWindow.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionAnalysisProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionBufferGas.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionDetectorResponseProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionDeviationProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionEvent.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionEventProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionField.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionFieldPropagationProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionGeneratorProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionLikelihood.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionMCPLOptics.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionMagneticField.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionOptics.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionOpticsMirror.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionOpticsProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionSolarFlux.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionSolarModel.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionSpectrum.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionTemplate.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionTransmissionProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionTransportProcess.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionTrueWolterOptics.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionWolterOptics.cxx.o CMakeFiles/RestAxion.dir/__/__/__/rootdict/CINT_TRestAxionXrayWindow.cxx.o   -L/usr/lib/x86_64-linux-gnu/libmpfr.so  -Wl,-rpath,/usr/lib/x86_64-linux-gnu/libmpfr.so:/home/jgalan/rest-framework/build/source/framework:/programas/root/6.26.06/lib: ../../framework/libRestFramework.so /programas/root/6.26.06/lib/libCore.so /programas/root/6.26.06/lib/libImt.so /programas/root/6.26.06/lib/libRIO.so /programas/root/6.26.06/lib/libNet.so /programas/root/6.26.06/lib/libHist.so /programas/root/6.26.06/lib/libGraf.so /programas/root/6.26.06/lib/libGraf3d.so /programas/root/6.26.06/lib/libGpad.so /programas/root/6.26.06/lib/libROOTDataFrame.so /programas/root/6.26.06/lib/libTree.so /programas/root/6.26.06/lib/libTreePlayer.so /programas/root/6.26.06/lib/libRint.so /programas/root/6.26.06/lib/libPostscript.so /programas/root/6.26.06/lib/libMatrix.so /programas/root/6.26.06/lib/libPhysics.so /programas/root/6.26.06/lib/libMathCore.so /programas/root/6.26.06/lib/libThread.so /programas/root/6.26.06/lib/libMultiProc.so /programas/root/6.26.06/lib/libROOTVecOps.so /programas/root/6.26.06/lib/libGeom.so /programas/root/6.26.06/lib/libGdml.so /programas/root/6.26.06/lib/libMinuit.so /programas/root/6.26.06/lib/libSpectrum.so /programas/root/6.26.06/lib/libXMLIO.so /programas/root/6.26.06/lib/libEve.so /programas/root/6.26.06/lib/libRGL.so /programas/root/6.26.06/lib/libGui.so -lstdc++fs /usr/lib/x86_64-linux-gnu/libmpfr.so -lmpfr -fPIC 
make[2]: Leaving directory '/home/jgalan/rest-framework/build'
[100%] Built target RestAxion
make[1]: Leaving directory '/home/jgalan/rest-framework/build'
/usr/bin/cmake -E cmake_progress_start /home/jgalan/rest-framework/build/CMakeFiles 0

What does:

root [0] TClass::GetClass("TRestAxionGeneratorProcess")->GetStreamerInfo()->ls();

prints? And then what does:

root [0] TRestRun r("../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root");
...
root [1] TClass::GetClass("TRestAxionGeneratorProcess")->GetStreamerInfos()->ls();

prints? (Not the 2nd snippets use GetStreamerInfos with a trailing s.

@pcanal The TRestAxionGeneratorProcess class got a new data member (Double_t fTotalFlux) and a new class version (2). I guess a new streamer needs to be implemented so that it knows the old (1) layout, too.

The linkdef says

that there is no custom streamer and hence all the information should have been auto-generated in the StreamerInfo. What am I missing?

root [0] TClass::GetClass("TRestAxionGeneratorProcess")->GetStreamerInfo()->ls();

StreamerInfo for class: TRestAxionGeneratorProcess, version=2, checksum=0x934abe2d
  TRestEventProcess BASE            offset=  0 type= 0                     
  double         fAxionMass      offset=768 type= 8 <                   
  double         fTargetRadius   offset=776 type= 8 <                   
  TString        fGeneratorType  offset=784 type=65 <                   
  int            fSeed           offset=808 type= 3 <                   
  TVector2       fEnergyRange    offset=816 type=61 <                   
  double         fTotalFlux      offset=848 type= 8 <                   
   i= 0, TRestEventProcess type=  0, offset=  0, len=1, method=0
   i= 1, fAxionMass      type= 28, offset=768, len=2, method=0 [optimized]
   i= 2, fGeneratorType  type= 65, offset=784, len=1, method=0
   i= 3, fSeed           type=  3, offset=808, len=1, method=0
   i= 4, fEnergyRange    type= 61, offset=816, len=1, method=0
   i= 5, fTotalFlux      type=  8, offset=848, len=1, method=0
root [1] 
root [0] TRestRun r("../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root");
Error in <TBufferFile::CheckByteCount>: object of class TRestAxionGeneratorProcess read too many bytes: 1646 instead of 1638
Warning in <TBufferFile::CheckByteCount>: TRestAxionGeneratorProcess::Streamer() not in sync with data on file ../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root, fix Streamer()
root [1] TClass::GetClass("TRestAxionGeneratorProcess")->GetStreamerInfos()->ls();
OBJ: TObjArray	TObjArray	An array of objects : 0

StreamerInfo for class: TRestAxionGeneratorProcess, version=1, checksum=0x934abe2d
  TRestEventProcess BASE            offset=  0 type= 0                     
  double         fAxionMass      offset=768 type= 8 <                   
  double         fTargetRadius   offset=776 type= 8 <                   
  TString        fGeneratorType  offset=784 type=65 <                   
  int            fSeed           offset=808 type= 3 <                   
  TVector2       fEnergyRange    offset=816 type=61 <                   
  double         fTotalFlux      offset=848 type= 8 <                   
   i= 0, TRestEventProcess type=  0, offset=  0, len=1, method=0
   i= 1, fAxionMass      type= 28, offset=768, len=2, method=0 [optimized]
   i= 2, fGeneratorType  type= 65, offset=784, len=1, method=0
   i= 3, fSeed           type=  3, offset=808, len=1, method=0
   i= 4, fEnergyRange    type= 61, offset=816, len=1, method=0
   i= 5, fTotalFlux      type=  8, offset=848, len=1, method=0
root [2] 

Hi,

Ok. That’s odd. The systems think that the new member is part of the old schema. Let’s check a bit more. What is the result of

auto f = TFile::Open("../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root");
f->ShowStreamerInfo();

Here it goes, not CheckByteCount output when using TFile::Open!

root [0] auto f = TFile::Open("../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root");
root [1] f->ShowStreamerInfo()
OBJ: TList	TList	Doubly linked list : 0

StreamerInfo for class: TNamed, version=1, checksum=0xdfb74a3c
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  TString        fName           offset=  0 type=65 object identifier   
  TString        fTitle          offset=  0 type=65 object title        

StreamerInfo for class: TObject, version=1, checksum=0x901bc02d
  unsigned int   fUniqueID       offset=  0 type=13 object unique identifier
  unsigned int   fBits           offset=  0 type=15 bit field status word

StreamerInfo for class: TList, version=5, checksum=0x69c5c3bb
  TSeqCollection BASE            offset=  0 type= 0 Sequenceable collection ABC

StreamerInfo for class: TSeqCollection, version=0, checksum=0xfc6c3bc6
  TCollection    BASE            offset=  0 type= 0 Collection abstract base class

StreamerInfo for class: TCollection, version=3, checksum=0x57e3cb9c
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  TString        fName           offset=  0 type=65 name of the collection
  int            fSize           offset=  0 type= 3 number of elements in collection

StreamerInfo for class: TRestRun, version=6, checksum=0xc0bfb10a
  TRestMetadata  BASE            offset=  0 type= 0                     
  int            fRunNumber      offset=  0 type= 3 < first identification number
  int            fParentRunNumber offset=  0 type= 3                     
  TString        fRunClassName   offset=  0 type=65                     
  TString        fRunType        offset=  0 type=65 < Stores bit by bit the type of run. e.g. calibration, background, pedestal,
  TString        fRunUser        offset=  0 type=65 < To identify the author it has created the run. It might be also a word describing
  TString        fRunTag         offset=  0 type=65 < A tag to be written to the output file
  TString        fRunDescription offset=  0 type=65 < A word or sentence describing the run (I.e. Fe55 calibration, cosmics, etc)
  TString        fExperimentName offset=  0 type=65                     
  TString        fInputFileName  offset=  0 type=65                     
  TString        fOutputFileName offset=  0 type=65                     
  double         fStartTime      offset=  0 type= 8 Event absolute starting time/date (unix timestamp)
  double         fEndTime        offset=  0 type= 8 Event absolute ending time/date (unix timestamp)
  int            fEntriesSaved   offset=  0 type= 3                     
  int            fNFilesSplit    offset=  0 type= 3 Number of files being split. Used when retrieving

StreamerInfo for class: TRestMetadata, version=9, checksum=0xe298dc45
  TNamed         BASE            offset=  0 type=67 The basis for a named object (name, title)
  TString        fVersion        offset=  0 type=65 <                   
  TString        fCommit         offset=  0 type=65 <                   
  TString        fLibraryVersion offset=  0 type=65 <                   
  bool           fOfficialRelease offset=  0 type=18 <                   
  bool           fCleanState     offset=  0 type=18 <                   
  string         fConfigFileName offset=  0 type=300 ,stl=365, ctype=365,                     
  string         fSectionName    offset=  0 type=300 ,stl=365, ctype=365,                     
  string         configBuffer    offset=  0 type=300 ,stl=365, ctype=365,                     
  string         messageBuffer   offset=  0 type=300 ,stl=365, ctype=365,                     
  bool           fError          offset=  0 type=18                     
  int            fNErrors        offset=  0 type= 3                     
  bool           fWarning        offset=  0 type=18                     
  int            fNWarnings      offset=  0 type= 3                     
  TString        fErrorMessage   offset=  0 type=65                     
  TString        fWarningMessage offset=  0 type=65                     

StreamerInfo for class: TRestAxionSolarFlux, version=1, checksum=0x6997d4a3
  TRestMetadata  BASE            offset=  0 type= 0                     
  string         fFluxDataFile   offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fFluxSptFile    offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fCouplingType   offset=  0 type=300 ,stl=365, ctype=365, <                   
  double         fCouplingStrength offset=  0 type= 8 <                   
  int            fSeed           offset=  0 type= 3 <                   
  double         fBinSize        offset=  0 type= 8 <                   
  double         fPeakSigma      offset=  0 type= 8 <                   

StreamerInfo for class: TRestSpiderMask, version=1, checksum=0x277ea60b
  TRestPatternMask BASE            offset=  0 type= 0                     
  double         fArmsSeparationAngle offset=  0 type= 8 <                   
  double         fArmsWidth      offset=  0 type= 8 <                   
  double         fInitialRadius  offset=  0 type= 8 <                   

StreamerInfo for class: TRestPatternMask, version=1, checksum=0x40836c98
  TRestMetadata  BASE            offset=  0 type= 0                     
  TVector2       fOffset         offset=  0 type=61 <                   
  double         fRotationAngle  offset=  0 type= 8 <                   
  string         fPatternType    offset=  0 type=300 ,stl=365, ctype=365, <                   
  double         fMaskRadius     offset=  0 type= 8 <                   
  int            fMaxRegions     offset=  0 type= 3 <                   

StreamerInfo for class: TRestAxionOpticsMirror, version=1, checksum=0x379aba2a
  TRestMetadata  BASE            offset=  0 type= 0                     
  string         fMirrorType     offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fLayerTop       offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fLayerThicknessTop offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fSigmaTop       offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fLayerBottom    offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fLayerThicknessBottom offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fSigmaBottom    offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fSubstrate      offset=  0 type=300 ,stl=365, ctype=365, <                   

StreamerInfo for class: TRestAxionTrueWolterOptics, version=1, checksum=0xd489e2d1
  TRestAxionOptics BASE            offset=  0 type= 0                     
  TRestSpiderMask* fSpiderMask     offset=  0 type=64 <                   
  TRestRingsMask* fEntranceRingsMask offset=  0 type=64 <                   
  TRestRingsMask* fMiddleRingsMask offset=  0 type=64 <                   
  TRestRingsMask* fExitRingsMask  offset=  0 type=64 <                   

StreamerInfo for class: TRestAxionOptics, version=1, checksum=0x2dcec529
  TRestMetadata  BASE            offset=  0 type= 0                     
  string         fOpticsFile     offset=  0 type=300 ,stl=365, ctype=365,                     
  double         fMirrorLength   offset=  0 type= 8 <                   
  vector<vector<double> > fOpticsData     offset=  0 type=300 ,stl=1, ctype=61, <                   
  TRestAxionOpticsMirror* fMirrorProperties offset=  0 type=64 <                   
  TPad*          fPad            offset=  0 type=64                     

StreamerInfo for class: TRestAxionXrayWindow, version=2, checksum=0xb728fa5a
  TRestMetadata  BASE            offset=  0 type= 0                     
  double         fThickness      offset=  0 type= 8 <                   
  string         fMaterial       offset=  0 type=300 ,stl=365, ctype=365, <                   
  TRestPatternMask* fMask           offset=  0 type=64 <                   

StreamerInfo for class: TVector3, version=3, checksum=0xabb6be1e
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  double         fX              offset=  0 type= 8                     
  double         fY              offset=  0 type= 8                     
  double         fZ              offset=  0 type= 8                     

StreamerInfo for class: TString, version=2, checksum=0x17419

StreamerInfo for class: TAttLine, version=2, checksum=0x94074549
  short          fLineColor      offset=  0 type= 2 Line color          
  short          fLineStyle      offset=  0 type= 2 Line style          
  short          fLineWidth      offset=  0 type= 2 Line width          

StreamerInfo for class: TAttFill, version=2, checksum=0xffd92a92
  short          fFillColor      offset=  0 type= 2 Fill area color     
  short          fFillStyle      offset=  0 type= 2 Fill area style     

StreamerInfo for class: TVector2, version=3, checksum=0x89b7f4
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  double         fX              offset=  0 type= 8 components of the vector
  double         fY              offset=  0 type= 8                     

StreamerInfo for class: TRestAxionMagneticField, version=3, checksum=0xf7af4202
  TRestMetadata  BASE            offset=  0 type= 0                     
  vector<string> fFileNames      offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TVector3> fPositions      offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TVector3> fConstantField  offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TVector3> fMeshSize       offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TString> fMeshType       offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TVector3> fBoundMax       offset=  0 type=300 ,stl=1, ctype=61, <                   

StreamerInfo for class: TRestAxionBufferGas, version=1, checksum=0xab9d2b12
  TRestMetadata  BASE            offset=  0 type= 0                     
  vector<TString> fBufferGasName  offset=  0 type=300 ,stl=1, ctype=61, ->                  
  vector<double> fBufferGasDensity offset=  0 type=300 ,stl=1, ctype=8, ->                  
  vector<vector<double> > fAbsEnergy      offset=  0 type=300 ,stl=1, ctype=61, ->                  
  vector<vector<double> > fGasAbsCoefficient offset=  0 type=300 ,stl=1, ctype=61, ->                  
  vector<vector<double> > fFactorEnergy   offset=  0 type=300 ,stl=1, ctype=61, ->                  
  vector<vector<double> > fGasFormFactor  offset=  0 type=300 ,stl=1, ctype=61, ->                  

StreamerInfo for class: TPad, version=13, checksum=0x136aa1a2
  TVirtualPad    BASE            offset=  0 type= 0                     
  TAttBBox2D     BASE            offset=  0 type= 0 2D bounding box attributes
  double         fX1             offset=  0 type= 8 X of lower X coordinate
  double         fY1             offset=  0 type= 8 Y of lower Y coordinate
  double         fX2             offset=  0 type= 8 X of upper X coordinate
  double         fY2             offset=  0 type= 8 Y of upper Y coordinate
  double         fXtoAbsPixelk   offset=  0 type= 8 Conversion coefficient for X World to absolute pixel
  double         fXtoPixelk      offset=  0 type= 8 Conversion coefficient for X World to pixel
  double         fXtoPixel       offset=  0 type= 8 xpixel = fXtoPixelk + fXtoPixel*xworld
  double         fYtoAbsPixelk   offset=  0 type= 8 Conversion coefficient for Y World to absolute pixel
  double         fYtoPixelk      offset=  0 type= 8 Conversion coefficient for Y World to pixel
  double         fYtoPixel       offset=  0 type= 8 ypixel = fYtoPixelk + fYtoPixel*yworld
  double         fUtoAbsPixelk   offset=  0 type= 8 Conversion coefficient for U NDC to absolute pixel
  double         fUtoPixelk      offset=  0 type= 8 Conversion coefficient for U NDC to pixel
  double         fUtoPixel       offset=  0 type= 8 xpixel = fUtoPixelk + fUtoPixel*undc
  double         fVtoAbsPixelk   offset=  0 type= 8 Conversion coefficient for V NDC to absolute pixel
  double         fVtoPixelk      offset=  0 type= 8 Conversion coefficient for V NDC to pixel
  double         fVtoPixel       offset=  0 type= 8 ypixel = fVtoPixelk + fVtoPixel*vndc
  double         fAbsPixeltoXk   offset=  0 type= 8 Conversion coefficient for absolute pixel to X World
  double         fPixeltoXk      offset=  0 type= 8 Conversion coefficient for pixel to X World
  double         fPixeltoX       offset=  0 type= 8 xworld = fPixeltoXk + fPixeltoX*xpixel
  double         fAbsPixeltoYk   offset=  0 type= 8 Conversion coefficient for absolute pixel to Y World
  double         fPixeltoYk      offset=  0 type= 8 Conversion coefficient for pixel to Y World
  double         fPixeltoY       offset=  0 type= 8 yworld = fPixeltoYk + fPixeltoY*ypixel
  double         fXlowNDC        offset=  0 type= 8 X bottom left corner of pad in NDC [0,1]
  double         fYlowNDC        offset=  0 type= 8 Y bottom left corner of pad in NDC [0,1]
  double         fXUpNDC         offset=  0 type= 8                     
  double         fYUpNDC         offset=  0 type= 8                     
  double         fWNDC           offset=  0 type= 8 Width of pad along X in Normalized Coordinates (NDC)
  double         fHNDC           offset=  0 type= 8 Height of pad along Y in Normalized Coordinates (NDC)
  double         fAbsXlowNDC     offset=  0 type= 8 Absolute X top left corner of pad in NDC [0,1]
  double         fAbsYlowNDC     offset=  0 type= 8 Absolute Y top left corner of pad in NDC [0,1]
  double         fAbsWNDC        offset=  0 type= 8 Absolute Width of pad along X in NDC
  double         fAbsHNDC        offset=  0 type= 8 Absolute Height of pad along Y in NDC
  double         fUxmin          offset=  0 type= 8 Minimum value on the X axis
  double         fUymin          offset=  0 type= 8 Minimum value on the Y axis
  double         fUxmax          offset=  0 type= 8 Maximum value on the X axis
  double         fUymax          offset=  0 type= 8 Maximum value on the Y axis
  double         fTheta          offset=  0 type= 8 theta angle to view as lego/surface
  double         fPhi            offset=  0 type= 8 phi angle   to view as lego/surface
  double         fAspectRatio    offset=  0 type= 8 ratio of w/h in case of fixed ratio
  int            fNumber         offset=  0 type= 3 pad number identifier
  int            fTickx          offset=  0 type= 3 Set to 1 if tick marks along X
  int            fTicky          offset=  0 type= 3 Set to 1 if tick marks along Y
  int            fLogx           offset=  0 type= 3 (=0 if X linear scale, =1 if log scale)
  int            fLogy           offset=  0 type= 3 (=0 if Y linear scale, =1 if log scale)
  int            fLogz           offset=  0 type= 3 (=0 if Z linear scale, =1 if log scale)
  int            fPadPaint       offset=  0 type= 3 Set to 1 while painting the pad
  int            fCrosshair      offset=  0 type= 3 Crosshair type (0 if no crosshair requested)
  int            fCrosshairPos   offset=  0 type= 3 Position of crosshair
  short          fBorderSize     offset=  0 type= 2 pad bordersize in pixels
  short          fBorderMode     offset=  0 type= 2 Bordermode (-1=down, 0 = no border, 1=up)
  bool           fModified       offset=  0 type=18 Set to true when pad is modified
  bool           fGridx          offset=  0 type=18 Set to true if grid along X
  bool           fGridy          offset=  0 type=18 Set to true if grid along Y
  bool           fAbsCoord       offset=  0 type=18 Use absolute coordinates
  bool           fEditable       offset=  0 type=18 True if canvas is editable
  bool           fFixedAspectRatio offset=  0 type=18 True if fixed aspect ratio
  TList*         fPrimitives     offset=  0 type=63 ->List of primitives (subpads)
  TList*         fExecs          offset=  0 type=64 List of commands to be executed when a pad event occurs
  TString        fName           offset=  0 type=65 Pad name            
  TString        fTitle          offset=  0 type=65 Pad title           
  int            fNumPaletteColor offset=  0 type= 3 Number of objects with an automatic color
  int            fNextPaletteColor offset=  0 type= 3 Next automatic color

StreamerInfo for class: TVirtualPad, version=3, checksum=0x28ece7b9
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  TAttLine       BASE            offset=  0 type= 0 Line attributes     
  TAttFill       BASE            offset=  0 type= 0 Fill area attributes
  TAttPad        BASE            offset=  0 type= 0 Pad attributes      
  TQObject       BASE            offset=  0 type= 0 Base class for object communication mechanism

StreamerInfo for class: TAttPad, version=4, checksum=0xa715f011
  float          fLeftMargin     offset=  0 type= 5 LeftMargin          
  float          fRightMargin    offset=  0 type= 5 RightMargin         
  float          fBottomMargin   offset=  0 type= 5 BottomMargin        
  float          fTopMargin      offset=  0 type= 5 TopMargin           
  float          fXfile          offset=  0 type= 5 X position where to draw the file name
  float          fYfile          offset=  0 type= 5 Y position where to draw the file name
  float          fAfile          offset=  0 type= 5 Alignment for the file name
  float          fXstat          offset=  0 type= 5 X position where to draw the statistics
  float          fYstat          offset=  0 type= 5 Y position where to draw the statistics
  float          fAstat          offset=  0 type= 5 Alignment for the statistics
  short          fFrameFillColor offset=  0 type= 2 Pad frame fill color
  short          fFrameLineColor offset=  0 type= 2 Pad frame line color
  short          fFrameFillStyle offset=  0 type= 2 Pad frame fill style
  short          fFrameLineStyle offset=  0 type= 2 Pad frame line style
  short          fFrameLineWidth offset=  0 type= 2 Pad frame line width
  short          fFrameBorderSize offset=  0 type= 2 Pad frame border size
  int            fFrameBorderMode offset=  0 type= 3 Pad frame border mode

StreamerInfo for class: TQObject, version=1, checksum=0x42e9c

StreamerInfo for class: TAttBBox2D, version=0, checksum=0x2549fc

StreamerInfo for class: TRestRingsMask, version=1, checksum=0xffb162a9
  TRestPatternMask BASE            offset=  0 type= 0                     
  double         fRingsGap       offset=  0 type= 8 <                   
  double         fRingsThickness offset=  0 type= 8 <                   
  int            fNRings         offset=  0 type= 3 <                   
  double         fInitialRadius  offset=  0 type= 8 <                   
  vector<pair<double,double> > fRingsRadii     offset=  0 type=300 ,stl=1, ctype=61, <                   
root [2] 

Ok, normal, this happens when accessing the key TRestMetadata* a = (TRestMetadata*)f->Get(key->GetName());

In a first sight I would say that any class that inherits from TRestEventProcess does not appear in the previous list.

The inheritance goes as TObject -> TRestMetadata -> TRestEventProcess -> TRestAxionXYZProcess

The contents of the file are:

root [3] .ls
TFile**		../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root	
 TFile*		../pipeline/dataset/BabyIAXO_TrueWolterMicromegasTest_00375.root	
  KEY: TRestRun	axionRun;2	BabyIAXO V1.0 [current cycle]
  KEY: TRestRun	axionRun;1	BabyIAXO V1.0 [backup cycle]
  KEY: TRestProcessRunner	EventProcess;2	Default TRestProcessRunner [current cycle]
  KEY: TRestProcessRunner	EventProcess;1	Default TRestProcessRunner [backup cycle]
  KEY: TTree	EventTree;1	REST Event Tree
  KEY: TRestAnalysisTree	AnalysisTree;1	REST Process Analysis Tree
  KEY: TRestAxionGeneratorProcess	axionGen;1	Default TRestAxionGeneratorProcess
  KEY: TRestAxionAnalysisProcess	initial;1	Default TRestAxionAnalysisProcess
  KEY: TRestAxionTransportProcess	tom5m;1	Default TRestAxionTransportProcess
  KEY: TRestAxionAnalysisProcess	magnetEntrance;1	Default TRestAxionAnalysisProcess
  KEY: TRestAxionFieldPropagationProcess	axionPhoton;1	Default TRestAxionFieldPropagationProcess
  KEY: TRestAxionAnalysisProcess	magnetExit;1	Default TRestAxionAnalysisProcess
  KEY: TRestAxionTransmissionProcess	boreExitGate;1	Default TRestAxionTransmissionProcess
  KEY: TRestAxionOpticsProcess	optics;1	Default TRestAxionOpticsProcess
  KEY: TRestAxionAnalysisProcess	afterOptics;1	Default TRestAxionAnalysisProcess
  KEY: TRestAxionTransmissionProcess	window;1	Default TRestAxionTransmissionProcess
  KEY: TRestAxionAnalysisProcess	offset;1	Default TRestAxionAnalysisProcess
  KEY: TRestAxionTransportProcess	origin;1	Default TRestAxionTransportProcess
  KEY: TRestAxionAnalysisProcess	final;1	Default TRestAxionAnalysisProcess
  KEY: TRestAxionSolarFlux	LennertHoofPrimakoff;1	Default TRestAxionSolarFlux
  KEY: TRestAxionMagneticField	babyIAXO;1	Field definition with 5cm precision in X,Y and Z for babyIAXO magnet.
  KEY: TRestAxionBufferGas	helium;1	Default TRestAxionBufferGas
  KEY: TRestAxionTrueWolterOptics	xmm;1	Default TRestAxionTrueWolterOptics
  KEY: TRestAxionXrayWindow	magnetBore;1	Default TRestAxionXrayWindow
  KEY: TRestAxionXrayWindow	MicromegasStrongBack;1	Default TRestAxionXrayWindow
  KEY: TRestAxionXrayWindow	MicromegasAluminumFoil;1	Default TRestAxionXrayWindow
  KEY: TRestAxionXrayWindow	MicromegasMylar;1	Default TRestAxionXrayWindow

So something ‘odd’ happen during writing. It looks like the StreamerInfo record was not properly written. If the file is “precious” (not reproducible), it can be fixed if you still have access to a build of your software with the old schema. However we probably should figure out what is the issue in the writing. Which version of ROOT was used during writing (file->GerVersion() will give the answer)? Was file->Write() or equivalent called after all the object where written?

I am sure we always used the same ROOT version, at any step (compilation/writing/reading/…).

root [0] TFile *f = TFile::Open("BabyIAXO_TrueWolterMicromegasTest_00375.root")
(TFile *) 0x564afd5ab070
root [1] f->GetVersion()
(int) 62606

I think the fact that not any single Process appears when invoking f->ShowStreamerInfo() does not show up may be a kind of clue, why those would not appear on that call? But not sure myself, this looks good to you?

We write the objects using object->Write( ... ), but in the case of the file itself, we call f->Close().

but in the case of the file itself, we call f->Close().

That is likely/hopefully the problem. Try calling f->Write(); right before f->Close();

Nope, this did not solve the problem. I wrote a new file with the old schema/version (including f->Write*()), compiled with the new version again, try to read the file, and still get the CheckByteCount error.

It is strange that f->ShowStreamerInfo() does not show any Process class.

In your “linkdef”, try to use:

#ifdef __CINT__
#pragma link off all class;
#pragma link off all function;
#pragma link off all global;
#pragma link off all typedef;
#pragma link C++ nestedclass;
#pragma link C++ nestedtypedef;
#pragma link C++ class TRestMetadata+;
#pragma link C++ class TRestEventProcess+;
#pragma link C++ class TRestAxionGeneratorProcess+;
#endif

I manually updated the “linkdef” for that class, and now I get two other warnings.

Warning in <TClassTable::Add>: class TRestMetadata already in TClassTable
Warning in <TClassTable::Add>: class TRestEventProcess already in TClassTable

These warnings appear at the time when the library .so is loaded using gSystem->Load("...").

When I open the writen file, the TRestAxionGeneratorProcess doesn’t appear when calling f->ShowStreamerInfo, but other objects from the same library appear …

You would need to create a new file and then see if the streamer info got stored (together with the objects).

Yes, I created another file, the output does not contain TRestAxionGeneratorProcess.

jgalan@sultan2:~/rest-framework/projects/iaxo/iaxo-simulations/simulations/signal$ restRoot
= Loading libraries ...
 - /home/jgalan/rest-framework/install/lib/libRestFramework.so
 - /home/jgalan/rest-framework/install/lib/libRestAxion.so
Warning in <TClassTable::Add>: class TRestMetadata already in TClassTable
Warning in <TClassTable::Add>: class TRestEventProcess already in TClassTable

Error in <TGClient::TGClient>: only one instance of TGClient allowed

root [0] TFile *f = TFile::Open("test_new.root")
(TFile *) 0x5599d8e988d0
root [1] f->ShowStreamerInfo()
OBJ: TList	TList	Doubly linked list : 0

StreamerInfo for class: TNamed, version=1, checksum=0xdfb74a3c
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  TString        fName           offset=  0 type=65 object identifier   
  TString        fTitle          offset=  0 type=65 object title        

StreamerInfo for class: TObject, version=1, checksum=0x901bc02d
  unsigned int   fUniqueID       offset=  0 type=13 object unique identifier
  unsigned int   fBits           offset=  0 type=15 bit field status word

StreamerInfo for class: TList, version=5, checksum=0x69c5c3bb
  TSeqCollection BASE            offset=  0 type= 0 Sequenceable collection ABC

StreamerInfo for class: TSeqCollection, version=0, checksum=0xfc6c3bc6
  TCollection    BASE            offset=  0 type= 0 Collection abstract base class

StreamerInfo for class: TCollection, version=3, checksum=0x57e3cb9c
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  TString        fName           offset=  0 type=65 name of the collection
  int            fSize           offset=  0 type= 3 number of elements in collection

StreamerInfo for class: TRestRun, version=6, checksum=0xc0bfb10a
  TRestMetadata  BASE            offset=  0 type= 0                     
  int            fRunNumber      offset=  0 type= 3 < first identification number
  int            fParentRunNumber offset=  0 type= 3                     
  TString        fRunClassName   offset=  0 type=65                     
  TString        fRunType        offset=  0 type=65 < Stores bit by bit the type of run. e.g. calibration, background, pedestal,
  TString        fRunUser        offset=  0 type=65 < To identify the author it has created the run. It might be also a word describing
  TString        fRunTag         offset=  0 type=65 < A tag to be written to the output file
  TString        fRunDescription offset=  0 type=65 < A word or sentence describing the run (I.e. Fe55 calibration, cosmics, etc)
  TString        fExperimentName offset=  0 type=65                     
  TString        fInputFileName  offset=  0 type=65                     
  TString        fOutputFileName offset=  0 type=65                     
  double         fStartTime      offset=  0 type= 8 Event absolute starting time/date (unix timestamp)
  double         fEndTime        offset=  0 type= 8 Event absolute ending time/date (unix timestamp)
  int            fEntriesSaved   offset=  0 type= 3                     
  int            fNFilesSplit    offset=  0 type= 3 Number of files being split. Used when retrieving

StreamerInfo for class: TRestMetadata, version=9, checksum=0xe298dc45
  TNamed         BASE            offset=  0 type=67 The basis for a named object (name, title)
  TString        fVersion        offset=  0 type=65 <                   
  TString        fCommit         offset=  0 type=65 <                   
  TString        fLibraryVersion offset=  0 type=65 <                   
  bool           fOfficialRelease offset=  0 type=18 <                   
  bool           fCleanState     offset=  0 type=18 <                   
  string         fConfigFileName offset=  0 type=300 ,stl=365, ctype=365,                     
  string         fSectionName    offset=  0 type=300 ,stl=365, ctype=365,                     
  string         configBuffer    offset=  0 type=300 ,stl=365, ctype=365,                     
  string         messageBuffer   offset=  0 type=300 ,stl=365, ctype=365,                     
  bool           fError          offset=  0 type=18                     
  int            fNErrors        offset=  0 type= 3                     
  bool           fWarning        offset=  0 type=18                     
  int            fNWarnings      offset=  0 type= 3                     
  TString        fErrorMessage   offset=  0 type=65                     
  TString        fWarningMessage offset=  0 type=65                     

StreamerInfo for class: TRestAxionSolarFlux, version=1, checksum=0x6997d4a3
  TRestMetadata  BASE            offset=  0 type= 0                     
  string         fFluxDataFile   offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fFluxSptFile    offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fCouplingType   offset=  0 type=300 ,stl=365, ctype=365, <                   
  double         fCouplingStrength offset=  0 type= 8 <                   
  int            fSeed           offset=  0 type= 3 <                   
  double         fBinSize        offset=  0 type= 8 <                   
  double         fPeakSigma      offset=  0 type= 8 <                   

StreamerInfo for class: TRestSpiderMask, version=2, checksum=0x8041b723
  TRestPatternMask BASE            offset=  0 type= 0                     
  double         fArmsSeparationAngle offset=  0 type= 8 <                   
  double         fArmsWidth      offset=  0 type= 8 <                   
  double         fInitialRadius  offset=  0 type= 8 <                   
  double         fInternalRegionRadius offset=  0 type= 8 <                   

StreamerInfo for class: TRestPatternMask, version=1, checksum=0x40836c98
  TRestMetadata  BASE            offset=  0 type= 0                     
  TVector2       fOffset         offset=  0 type=61 <                   
  double         fRotationAngle  offset=  0 type= 8 <                   
  string         fPatternType    offset=  0 type=300 ,stl=365, ctype=365, <                   
  double         fMaskRadius     offset=  0 type= 8 <                   
  int            fMaxRegions     offset=  0 type= 3 <                   

StreamerInfo for class: TRestAxionOpticsMirror, version=1, checksum=0x379aba2a
  TRestMetadata  BASE            offset=  0 type= 0                     
  string         fMirrorType     offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fLayerTop       offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fLayerThicknessTop offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fSigmaTop       offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fLayerBottom    offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fLayerThicknessBottom offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fSigmaBottom    offset=  0 type=300 ,stl=365, ctype=365, <                   
  string         fSubstrate      offset=  0 type=300 ,stl=365, ctype=365, <                   

StreamerInfo for class: TRestAxionTrueWolterOptics, version=1, checksum=0xd489e2d1
  TRestAxionOptics BASE            offset=  0 type= 0                     
  TRestSpiderMask* fSpiderMask     offset=  0 type=64 <                   
  TRestRingsMask* fEntranceRingsMask offset=  0 type=64 <                   
  TRestRingsMask* fMiddleRingsMask offset=  0 type=64 <                   
  TRestRingsMask* fExitRingsMask  offset=  0 type=64 <                   

StreamerInfo for class: TRestAxionOptics, version=1, checksum=0x2dcec529
  TRestMetadata  BASE            offset=  0 type= 0                     
  string         fOpticsFile     offset=  0 type=300 ,stl=365, ctype=365,                     
  double         fMirrorLength   offset=  0 type= 8 <                   
  vector<vector<double> > fOpticsData     offset=  0 type=300 ,stl=1, ctype=61, <                   
  TRestAxionOpticsMirror* fMirrorProperties offset=  0 type=64 <                   
  TPad*          fPad            offset=  0 type=64                     

StreamerInfo for class: TRestAxionXrayWindow, version=2, checksum=0xb728fa5a
  TRestMetadata  BASE            offset=  0 type= 0                     
  double         fThickness      offset=  0 type= 8 <                   
  string         fMaterial       offset=  0 type=300 ,stl=365, ctype=365, <                   
  TRestPatternMask* fMask           offset=  0 type=64 <                   

StreamerInfo for class: TVector3, version=3, checksum=0xabb6be1e
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  double         fX              offset=  0 type= 8                     
  double         fY              offset=  0 type= 8                     
  double         fZ              offset=  0 type= 8                     

StreamerInfo for class: TString, version=2, checksum=0x17419

StreamerInfo for class: TAttLine, version=2, checksum=0x94074549
  short          fLineColor      offset=  0 type= 2 Line color          
  short          fLineStyle      offset=  0 type= 2 Line style          
  short          fLineWidth      offset=  0 type= 2 Line width          

StreamerInfo for class: TAttFill, version=2, checksum=0xffd92a92
  short          fFillColor      offset=  0 type= 2 Fill area color     
  short          fFillStyle      offset=  0 type= 2 Fill area style     

StreamerInfo for class: TVector2, version=3, checksum=0x89b7f4
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  double         fX              offset=  0 type= 8 components of the vector
  double         fY              offset=  0 type= 8                     

StreamerInfo for class: TRestAxionMagneticField, version=3, checksum=0xf7af4202
  TRestMetadata  BASE            offset=  0 type= 0                     
  vector<string> fFileNames      offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TVector3> fPositions      offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TVector3> fConstantField  offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TVector3> fMeshSize       offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TString> fMeshType       offset=  0 type=300 ,stl=1, ctype=61, <                   
  vector<TVector3> fBoundMax       offset=  0 type=300 ,stl=1, ctype=61, <                   

StreamerInfo for class: TRestAxionBufferGas, version=1, checksum=0xab9d2b12
  TRestMetadata  BASE            offset=  0 type= 0                     
  vector<TString> fBufferGasName  offset=  0 type=300 ,stl=1, ctype=61, ->                  
  vector<double> fBufferGasDensity offset=  0 type=300 ,stl=1, ctype=8, ->                  
  vector<vector<double> > fAbsEnergy      offset=  0 type=300 ,stl=1, ctype=61, ->                  
  vector<vector<double> > fGasAbsCoefficient offset=  0 type=300 ,stl=1, ctype=61, ->                  
  vector<vector<double> > fFactorEnergy   offset=  0 type=300 ,stl=1, ctype=61, ->                  
  vector<vector<double> > fGasFormFactor  offset=  0 type=300 ,stl=1, ctype=61, ->                  

StreamerInfo for class: TPad, version=13, checksum=0x136aa1a2
  TVirtualPad    BASE            offset=  0 type= 0                     
  TAttBBox2D     BASE            offset=  0 type= 0 2D bounding box attributes
  double         fX1             offset=  0 type= 8 X of lower X coordinate
  double         fY1             offset=  0 type= 8 Y of lower Y coordinate
  double         fX2             offset=  0 type= 8 X of upper X coordinate
  double         fY2             offset=  0 type= 8 Y of upper Y coordinate
  double         fXtoAbsPixelk   offset=  0 type= 8 Conversion coefficient for X World to absolute pixel
  double         fXtoPixelk      offset=  0 type= 8 Conversion coefficient for X World to pixel
  double         fXtoPixel       offset=  0 type= 8 xpixel = fXtoPixelk + fXtoPixel*xworld
  double         fYtoAbsPixelk   offset=  0 type= 8 Conversion coefficient for Y World to absolute pixel
  double         fYtoPixelk      offset=  0 type= 8 Conversion coefficient for Y World to pixel
  double         fYtoPixel       offset=  0 type= 8 ypixel = fYtoPixelk + fYtoPixel*yworld
  double         fUtoAbsPixelk   offset=  0 type= 8 Conversion coefficient for U NDC to absolute pixel
  double         fUtoPixelk      offset=  0 type= 8 Conversion coefficient for U NDC to pixel
  double         fUtoPixel       offset=  0 type= 8 xpixel = fUtoPixelk + fUtoPixel*undc
  double         fVtoAbsPixelk   offset=  0 type= 8 Conversion coefficient for V NDC to absolute pixel
  double         fVtoPixelk      offset=  0 type= 8 Conversion coefficient for V NDC to pixel
  double         fVtoPixel       offset=  0 type= 8 ypixel = fVtoPixelk + fVtoPixel*vndc
  double         fAbsPixeltoXk   offset=  0 type= 8 Conversion coefficient for absolute pixel to X World
  double         fPixeltoXk      offset=  0 type= 8 Conversion coefficient for pixel to X World
  double         fPixeltoX       offset=  0 type= 8 xworld = fPixeltoXk + fPixeltoX*xpixel
  double         fAbsPixeltoYk   offset=  0 type= 8 Conversion coefficient for absolute pixel to Y World
  double         fPixeltoYk      offset=  0 type= 8 Conversion coefficient for pixel to Y World
  double         fPixeltoY       offset=  0 type= 8 yworld = fPixeltoYk + fPixeltoY*ypixel
  double         fXlowNDC        offset=  0 type= 8 X bottom left corner of pad in NDC [0,1]
  double         fYlowNDC        offset=  0 type= 8 Y bottom left corner of pad in NDC [0,1]
  double         fXUpNDC         offset=  0 type= 8                     
  double         fYUpNDC         offset=  0 type= 8                     
  double         fWNDC           offset=  0 type= 8 Width of pad along X in Normalized Coordinates (NDC)
  double         fHNDC           offset=  0 type= 8 Height of pad along Y in Normalized Coordinates (NDC)
  double         fAbsXlowNDC     offset=  0 type= 8 Absolute X top left corner of pad in NDC [0,1]
  double         fAbsYlowNDC     offset=  0 type= 8 Absolute Y top left corner of pad in NDC [0,1]
  double         fAbsWNDC        offset=  0 type= 8 Absolute Width of pad along X in NDC
  double         fAbsHNDC        offset=  0 type= 8 Absolute Height of pad along Y in NDC
  double         fUxmin          offset=  0 type= 8 Minimum value on the X axis
  double         fUymin          offset=  0 type= 8 Minimum value on the Y axis
  double         fUxmax          offset=  0 type= 8 Maximum value on the X axis
  double         fUymax          offset=  0 type= 8 Maximum value on the Y axis
  double         fTheta          offset=  0 type= 8 theta angle to view as lego/surface
  double         fPhi            offset=  0 type= 8 phi angle   to view as lego/surface
  double         fAspectRatio    offset=  0 type= 8 ratio of w/h in case of fixed ratio
  int            fNumber         offset=  0 type= 3 pad number identifier
  int            fTickx          offset=  0 type= 3 Set to 1 if tick marks along X
  int            fTicky          offset=  0 type= 3 Set to 1 if tick marks along Y
  int            fLogx           offset=  0 type= 3 (=0 if X linear scale, =1 if log scale)
  int            fLogy           offset=  0 type= 3 (=0 if Y linear scale, =1 if log scale)
  int            fLogz           offset=  0 type= 3 (=0 if Z linear scale, =1 if log scale)
  int            fPadPaint       offset=  0 type= 3 Set to 1 while painting the pad
  int            fCrosshair      offset=  0 type= 3 Crosshair type (0 if no crosshair requested)
  int            fCrosshairPos   offset=  0 type= 3 Position of crosshair
  short          fBorderSize     offset=  0 type= 2 pad bordersize in pixels
  short          fBorderMode     offset=  0 type= 2 Bordermode (-1=down, 0 = no border, 1=up)
  bool           fModified       offset=  0 type=18 Set to true when pad is modified
  bool           fGridx          offset=  0 type=18 Set to true if grid along X
  bool           fGridy          offset=  0 type=18 Set to true if grid along Y
  bool           fAbsCoord       offset=  0 type=18 Use absolute coordinates
  bool           fEditable       offset=  0 type=18 True if canvas is editable
  bool           fFixedAspectRatio offset=  0 type=18 True if fixed aspect ratio
  TList*         fPrimitives     offset=  0 type=63 ->List of primitives (subpads)
  TList*         fExecs          offset=  0 type=64 List of commands to be executed when a pad event occurs
  TString        fName           offset=  0 type=65 Pad name            
  TString        fTitle          offset=  0 type=65 Pad title           
  int            fNumPaletteColor offset=  0 type= 3 Number of objects with an automatic color
  int            fNextPaletteColor offset=  0 type= 3 Next automatic color

StreamerInfo for class: TVirtualPad, version=3, checksum=0x28ece7b9
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  TAttLine       BASE            offset=  0 type= 0 Line attributes     
  TAttFill       BASE            offset=  0 type= 0 Fill area attributes
  TAttPad        BASE            offset=  0 type= 0 Pad attributes      
  TQObject       BASE            offset=  0 type= 0 Base class for object communication mechanism

StreamerInfo for class: TAttPad, version=4, checksum=0xa715f011
  float          fLeftMargin     offset=  0 type= 5 LeftMargin          
  float          fRightMargin    offset=  0 type= 5 RightMargin         
  float          fBottomMargin   offset=  0 type= 5 BottomMargin        
  float          fTopMargin      offset=  0 type= 5 TopMargin           
  float          fXfile          offset=  0 type= 5 X position where to draw the file name
  float          fYfile          offset=  0 type= 5 Y position where to draw the file name
  float          fAfile          offset=  0 type= 5 Alignment for the file name
  float          fXstat          offset=  0 type= 5 X position where to draw the statistics
  float          fYstat          offset=  0 type= 5 Y position where to draw the statistics
  float          fAstat          offset=  0 type= 5 Alignment for the statistics
  short          fFrameFillColor offset=  0 type= 2 Pad frame fill color
  short          fFrameLineColor offset=  0 type= 2 Pad frame line color
  short          fFrameFillStyle offset=  0 type= 2 Pad frame fill style
  short          fFrameLineStyle offset=  0 type= 2 Pad frame line style
  short          fFrameLineWidth offset=  0 type= 2 Pad frame line width
  short          fFrameBorderSize offset=  0 type= 2 Pad frame border size
  int            fFrameBorderMode offset=  0 type= 3 Pad frame border mode

StreamerInfo for class: TQObject, version=1, checksum=0x42e9c

StreamerInfo for class: TAttBBox2D, version=0, checksum=0x2549fc

StreamerInfo for class: TRestRingsMask, version=1, checksum=0xffb162a9
  TRestPatternMask BASE            offset=  0 type= 0                     
  double         fRingsGap       offset=  0 type= 8 <                   
  double         fRingsThickness offset=  0 type= 8 <                   
  int            fNRings         offset=  0 type= 3 <                   
  double         fInitialRadius  offset=  0 type= 8 <                   
  vector<pair<double,double> > fRingsRadii     offset=  0 type=300 ,stl=1, ctype=61, <                   
root [2] 

If I manually do:

TFile *f = new TFile("manual_test.root", "RECREATE" );
TRestAxionGeneratorProcess axGen;
axGen.Write();
f->Close();

Then I open

TFile f* = TFile::Open("manual_test.root" );
f->ShowStreamerInfo();

and it appears

root [0] TFile *f = TFile::Open("manual_test.root")
(TFile *) 0x561ca1735830
root [1] f->Sh
ShowMembers
ShowStreamerInfo
ShrinkCacheFileDir
root [1] f->ShowStreamerInfo()
OBJ: TList	TList	Doubly linked list : 0

StreamerInfo for class: TNamed, version=1, checksum=0xdfb74a3c
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  TString        fName           offset=  0 type=65 object identifier   
  TString        fTitle          offset=  0 type=65 object title        

StreamerInfo for class: TRestAxionGeneratorProcess, version=3, checksum=0xa7ff3818
  TRestEventProcess BASE            offset=  0 type= 0                     
  TVector2       fAxionMassRange offset=  0 type=61 <                   
  double         fTargetRadius   offset=  0 type= 8 <                   
  TString        fGeneratorType  offset=  0 type=65 <                   
  int            fSeed           offset=  0 type= 3 <                   
  TVector2       fEnergyRange    offset=  0 type=61 <                   
  double         fTotalFlux      offset=  0 type= 8 <                   

StreamerInfo for class: TRestEventProcess, version=3, checksum=0x2513b303
  TRestMetadata  BASE            offset=  0 type= 0                     

StreamerInfo for class: TRestMetadata, version=9, checksum=0xe298dc45
  TNamed         BASE            offset=  0 type=67 The basis for a named object (name, title)
  TString        fVersion        offset=  0 type=65 <                   
  TString        fCommit         offset=  0 type=65 <                   
  TString        fLibraryVersion offset=  0 type=65 <                   
  bool           fOfficialRelease offset=  0 type=18 <                   
  bool           fCleanState     offset=  0 type=18 <                   
  string         fConfigFileName offset=  0 type=300 ,stl=365, ctype=365,                     
  string         fSectionName    offset=  0 type=300 ,stl=365, ctype=365,                     
  string         configBuffer    offset=  0 type=300 ,stl=365, ctype=365,                     
  string         messageBuffer   offset=  0 type=300 ,stl=365, ctype=365,                     
  bool           fError          offset=  0 type=18                     
  int            fNErrors        offset=  0 type= 3                     
  bool           fWarning        offset=  0 type=18                     
  int            fNWarnings      offset=  0 type= 3                     
  TString        fErrorMessage   offset=  0 type=65                     
  TString        fWarningMessage offset=  0 type=65                     

StreamerInfo for class: TVector2, version=3, checksum=0x89b7f4
  TObject        BASE            offset=  0 type=66 Basic ROOT object   
  double         fX              offset=  0 type= 8 components of the vector
  double         fY              offset=  0 type= 8                     
root [2] 

How about:

TRestAxionGeneratorProcess axGen;
TFile *f = TFile::Open("manual_test.root", "RECREATE");
axGen.Write();
delete f;

and:

TRestAxionGeneratorProcess *axGen = new TRestAxionGeneratorProcess();
TFile *f = TFile::Open("manual_test.root", "RECREATE");
axGen->Write();
delete f;
delete axGen;