Attach metadata to TH1s, TObjects?

Thank you for the suggestion. Do you think inserting a TMap – that I populate with TMap::Add(keyTString, valueTString) – into the TList returned by TH1::GetListOfFunctions is a good solution? Perhaps you can think of something better?

I was also exploring writing a std::map<std::string, std::string> or even a std::map<std::string, myMetadataStruct> to the TFile.

I understand that dictionaries for some STL containers are available by default with ROOT [1].
How can I get the list of them – i.e. what types T for std::vector<T> and std::map<Key, T> can I write to a TFile without setting up a dictionary entry for Key and T?

How would I merge the metadata together from multiple files? E.g. if I have a TList with one TMap in each file, then the merged result (hadd) will be one TList with multiple TMaps. Then I will have to merge the TMaps together manually. Or, if I have std::map<Key, T>, then I will have to implement std::map<Key, T>::Merge(TCollection *maplist). Is this correct?

Thanks,
Justin

[1] https://root.cern.ch/notebooks/HowTos/write-objects-to-a-file.html
Writting and Getting a std::vector from a TFile
https://root.cern.ch/root/html/tutorials/math/mathcoreVectorCollection.C.html