I’ve got to pass a few items to a PROOF query via the object list. Most of the time these are things that I name - they derive from TNamed, so I keep them separate by creating naming each thing uniquely.
But I need to pass a few TLorentzVectors. These do not derive from TNamed (for good reason), but I don’t know what the best way is to pass them along and keep which TLZ is which straight.
This is like TString -> TObjString. Is there some general named container class in ROOT I can use? Or do I have to hack up my own thing here?
Have a look at the templated TParameter class, it is exactly what you are looking for,
see for instance tutorials/proof/*C
Eddy, thanks! That looks perfect!
Argh. Ok - TParameter, I was hoping, could be used in a general way. However, that isn’t the case: It expects a number of operators defined on the object you are dealing with. In particular, both + and * must be defined (even if one is not relevant), and second, it needs “<<” defined. For a TLorentzVector, the “<<” is not defined. This is a pain in the butt, because in PROOF you now have to make sure that the operator<< is defined in all places in PROOF (server, client, etc.). And worse if you are writing general code b/c you must now special case a TLZ when you need it as an argument to TParameter. The “*” and “+” are a bit painful, btw, for example, if the object was only being passed as input to a PROOF run, not as output (where Merge is never called).
TParameter is intended for numerical purposes.
You need a small envelop class, which we do not have right now.
In general, for PROOF, it is convenient to have a customized config class, a small TObject-derived container where you put all the configuration parameters.
Thanks. That is what I was considering doing in the end.