We demonstrate usage of ROOT with Geant4 application in the extended example analysis/AnaEx02.
You can also use Geant4 analysis, which can produce the ROOT output without linking with ROOT. This way is used in most Geant4 examples and is demonstrated in basic examples B4 and B5, and also extended/analysis/AnaEx01.
The examples with Geant4 analysis (AnaEx01,03) are multi-threaded, AnaEx02 with ROOT IO is single threaded, as we do not develop and maintain MT for ROOT.
ROOT itself is not thread-safe with respect to external applications. They have a “multithread mode”, but only if you’re running a native ROOT application, and let it control the threads etc.
For the CDMS experiment, we wrote a singleton OutputManager, which is protected by mutexes in our RunAction wherever it is called (BeginOfRunAction, our local transferEvent, EndOfRunAction). This way, all of the ROOT activity is forced to be “single threaded.”
Thanks Michael I will look into this. Danilo on the root forum mentioned some updates on thread safety have taken place in the root framework and hopefully he will be able to help.
I have root installed and it works by itself, however the issue is I cant seem to get the application (and AnaEx02) to recognise I have root installed. What part of the root installation should I direct it too? Just root-framework?