Hi ROOT support,
I’m trying to modify a validation script that compares the contents of two files (generated with two git branches of a common program). Unfortunately the ROOT files to be compared contain classes, and the class definitions have diverged between the two files. As a result, the class definition headers and libraries needed to read the two files are different.
I would therefore like to:
- Load the necessary headers and libraries for the first file
- Read the file, fill some histograms etc.
- Clear the ROOT session - unload the libraries, unload class definitions, Enums etc.
- Load the headers and libraries for the second file (these files have the same name, and the define the same classes, as the first file, but with modified definitions)
- Read the second file, fill some histograms, overlay the two.
Unfortunately even using:
gSystem->Unload(thelibrary);
for(all classes) {
TClassTable::Remove(theclassname);
TClass::RemoveClass(theclass);
}```
for step (3), and then trying to reload the library and re-`#include` the headers, I've not been able to read both files - the second always fails. If i switch the order of files to be read, the first always works, so clearly the methodology for reading each file is OK, but there's something retained in the session which is preventing the proper reloading of new class definitions.
Are there any other commands to wipe a ROOT session? Is it possible to spawn independent sub-sessions that could operate on each file?
Any suggestions appreciated.
marc1uk