i’m trying to write a class called CutFlowMap that inherits from TObject to a ROOT file.
This class has a private member of type map<int,string> that i fill run time.
I added the ClassDef macro and created a dictionary with linkdef.h as
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link off all typedef;
#pragma link C++ class CutFlowMap;
#pragma link C++ class std::map<int, std::string >;
#pragma link C++ class std::map<int, std::string >::iterator;
then i tried writing it with both:
In both cases i got no error messages and when i read back the ROOT file i can take
the pointer to my class and call its methods. But the internal map is EMPTY!
I printed it before writing the file and run time is filled correctly.
Any hint ?