Hi,
I have a problem saving STL data members to a ROOT file. They are data members of a class that is saved allright to the ROOT file using
TBranch *b_evt = fOutputTree->Branch("Event", "SEvent", &fEvent, 32000, 99);
When I open the ROOT file I can though only see the data members of primitive types (integers, floats,…) and of type TObject/TObjectArray and so on. I initialise the STL data members the same way as the ROOT types (see below).
From the following example, only fObject can be seen in the Object in the output file:
[code]class SEvent : public TObject {
private:
std::vector* fNHits_A;
std::vector fNVector;
std::string fString;
TObject fObject;
…
}
SEvent::SEvent() : TObject() {
fNHits_A = new vector;
fNVector = vector();
fString = string();
fObject = TObject();
…
}[/code]
Using the object in the code before saving does not seem to cause any problems. The compiler does also accept it without any problem. The non-saved data members are also present in the SEventDict.cxx file. Any hint what could cause the problem?
Cheers,
Jan.