-
Notifications
You must be signed in to change notification settings - Fork 628
PWGHF: fix index dereference toXiPi #5110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| candidate.template collision_as<TMyEvents>().numContrib(), | ||
| candidate.template collision_as<TMyEvents>().chi2(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be wrong, but I don't think that a template argument is needed, you can probably just use candidate.collision_as<MyEventTable>(). If you already tried and it does not work, we can add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @fgrosa, I used the template following the suggestion Fabio gave me for the variables
O2Physics/PWGHF/TableProducer/treeCreatorToXiPi.cxx
Lines 315 to 316 in 247837f
| candidate.template piFromCharmBaryon_as<TMyTracks>().isGlobalTrackWoDCA(), | |
| candidate.template piFromCharmBaryon_as<TMyTracks>().itsNCls(), |
If I remember correctly, without the template I was getting a compilation error (see https://ali-ci.cern.ch/alice-build-logs/AliceO2Group/O2Physics/4672/6e3e6e5301b2b64e122cf8001c069a08baa72da7/build_O2Physics_o2/pretty.html )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the PR that you linked me there is no such implementation, i.e. no additional template parameter is added (you indeed use directly aod::TrackSelection), so maybe you were referring to another PR?
I am asking because here in principle there is no need of a template parameter, since you have always one type of collisions (but in any case it should probably be candidate.template collision_as<MyEventTable>(), since candidate is instead a template parameter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the point was how to do the dereferencing of the index in a template function. Yes, in that PR I used directly TrackSelection, then I changed in this PR https://github.com/AliceO2Group/O2Physics/pull/4709/files
fgrosa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ZFederica!
* Fix index dereference * Remove template argument
Fix index dereference in treeCreatorToXiPi