Closed gerbaudo closed 11 years ago
Hi Davide,
Ted and I have used the current implementation of wrappedChain to access ROOT::MATH::LorentzVector types, and vectors of those types since supy's inception. It was important that the correct dictionary be made available, otherwise it doesn't work. The extra code you've entered for the special case of 'class' in typeleaf doesn't look that different from the default catchall, so I am skeptical that any change at all needs to be made to wrappedChain. The specific cpp/ files probably belong in a satellite project (too specific for supy), but I appreciate the utility of providing them for the example tests.
As far as getting the right 'pragma' incantations to achieve dictionary recognition, you might check the examples in betchart/susycaf or betchart/topref.
https://github.com/betchart/topref/blob/master/configuration.py https://github.com/betchart/topref/blob/master/cpp/linkdef.cxx
It might be that I'm missing the problem that you're trying to solve, and if that's the case, please try to offer a more detailed description. A good thing to keep in mind is that PyROOT can do anything that CINT can do, so if you know how to do it in CINT first (sometimes easier), then you can get it done in PyROOT in short order.
Hi Burt,
You are perfectly right. I was trying to read some ntuples from my group, and the error message got me off track. For some reason I thought that within supy I could only read basic types and vector
Davide
Hi Davide,
If there are branches in the ntuple that you don't need to read, but are giving you problems, you can always add them to the blacklist rather than work out the dictionary incantations.
Burt
Hi Burt,
Thanks for the suggestion. I was actually loading the dictionaries correctly for all the branches, but some of the classes had a datamember 'eta' that would get python confused with TLorentzVector::eta(). Thanks again for your help!
Davide
Hi Burt and Ted,
I was trying to use supy with trees that contain non-basic types, namely objects that inherit from TObject. I think I that this could work (the single-object branch should be almost there, while the vector
Could you please share your thoughts on this possible feature, please? I was wondering if this is something that wasn't implemented because you didn't need it, or if there is some technical obstacle in which I haven't bumped yet (and that I will discover soon... :-) ).
Thank you,
Davide