Writing non TObjects to TDirectory

Hi Rooters!

Im trying to write a c++ std::map to a TDirectory, and then, obviously, read it out again. Firstly, is this possible? If so, how do i do this?

Many thanks,
Matt Wingham

Hi,

As for any object (TObject or not), assuming you build or have a dictionary for its class, you can use the main interface: mydir->WriteObject(mypointer,"nameOfKey");

See the user’s guide for more details.

Cheers,
Philippe