TMap::GetValue gives Fatal in <TClass::TClass>

Martin Woudstra (Martin.Woudstra@cern.ch)
Wed, 19 Nov 1997 21:39:13 +0100


Dear Rooters,

I am using Tmap in my code to store a map of readings of alignment systems
with their names. But when I do a TMap::GetValue I get the following error
message during runtime:

Fatal in <TClass::TClass>: ROOT system not initialized

I'm using aCC in HPUX 10.20. Before I used g++, and it worked fine.
Can somebody please tell me where the problem could be?

Regards,
Martin.

Relevant code:

char szSysId[ALISYSIDLEN + 1];
TMap mOffsets; // map of offsets with SysId as key
CReading *Readings;
CReading *pReadingsFound;

for (iSys = 0; iSys < nSysOfType; iSys++)
{
Readings = new CReading;
OffFile >> szSysId >> *Readings >> newl;
mOffsets.Add(new TObjString(szSysId), Readings);
}
for (iSys=pType->iFirstSysNo; iSys < pType->iFirstSysNo+pType->nSys; iSys++)
{
cerr << "Trying mOffsets.GetValue of " << aAliSys[iSys].GetName() << endl;
if ((pReadingsFound = (CReading *)mOffsets.GetValue(new
TObjString(aAliSys[iSys].GetName()))) == 0)
{
error stuff
}
else
{
cerr << "Assigning *pReadingsFound" << endl;
aAliSys[iSys].Zero = *pReadingsFound;
}
}

CReading inherits from TObject, and aAliSys[] from TNamed.

Output produced:

Trying mOffsets.GetValue of 0A
Fatal in <TClass::TClass>: ROOT system not initialized
aborting
zsh: 3870 abort geofix