I would like to make save one unsigned long or float or integer and other “simple” types to a TFile, and I wouldn’t like to create a structure for doing so, it should be just the single variable. Unfortunately, I can’t do that using the WriteObject template method, because it can only do that for objects that have a dictionary. I’ve searched a while, and couldn’t find many topics on this discussion, I’ve found this e-mail discussion:
unfortunately this template is only available for double and float types. If I try to create it for other types, it leads to error of undefined references because the template declarations are on the .cxx file.
I am trying to use std::vector, but I am not being able to add the dictionary to my application using CMT.
Ok, something that passed by my head: type conversion. But for the long types?
[quote=“wsfreund”]Hi Couet,
unfortunately this template is only available for double and float types. If I try to create it for other types, it leads to error of undefined references because the template declarations are on the .cxx file.
I am trying to use std::vector, but I am not being able to add the dictionary to my application using CMT.
It is always by default for double, float, int, long, Bool_t and Long64_t (long long). It can be instantiated for any time (you then need to also generate the dictionary for it).