Forcing gROOT initialization

Hi,

I’m running an application which has several static classes which must be initialized. These constructors call root facilities like TStreamerInfo::SetFactory. Depending on the link order when I create my executable, and gcc version, I sometimes get the following message:

Fatal in <TClass::TClass>: ROOT system not initialized aborting Aborted (core dumped)

This line is printed if a TClass is created when the gROOT pointer is 0. Since I believe that I’ve found the offending line in our code, is there a statment I can use to explicitly initialize the gROOT pointer? i.e.

or something like that.

I posted a bit too quickly. This was easy to find.

it’s ROOT::GetROOT().

Inserting this line above the offending line of code fixes the problem.