Hello,
I am using root 5.34/5 on windows. I have some code that stores a bunch of TObject derived objects in a TList and then later writes those objects to a new file:
TList *objList = new TList();
TObject *obj;
while (obj = strIn->GetMyObject)) // returns TObject derived object or zero
{
objList->Add(obj);
}
Later I write these to a file:
TIter next(objList);
while (obj=next())
{
obj->Write();
}
One of the objects is a TObjArray with a name “PeakRatioArray”. As it happens, the TObjArray has (at this point) only one object in it named “PeakRatio”. The resulting file does not have my TObjArray object named “PeakRatioArray” but instead has the contained object named “PeakRatio”. Is there a way for me to actually write the TObjArray itself rather than its contents? Thanks