Implementation of TNtuple::Fill

Hello,

I checked the source code for the implementation of TNtuple::Fill() and noticed an overload which took 15 floats passed by value. I would like to offer a potential rewrite or supplement (attached).

TNtupleFill.txt (419 Bytes)

(This is to be appended at the end of the header file, with additional declarations in the appropriate places–it can’t go in the .cxx file unless that is specifically #include’d from the header).

The idea for using parameter packs is so a user can specify an arbitrary number of arguments. However, there are drawbacks to doing something similar to this and I’m not sure how in line they are with ROOT’s standards (I imagine it substantially adds to the sheer volume of errors a user might see if the template cannot be deduced, and one would still need to explicitly specify the number of arguments to compile object or shared object files anyway).

Still, it could be a versatile implementation when someone links against the source code of a local clone of the repository. Hopefully it is in some way useful.

Joseph

Edit: Had to re-upload the file (changed a ‘<’ to a ‘<=’)

Welcome to the ROOT forum

I think this question is for @pcanal. To suggest changes in the code the best way is to submit a Pull Request on the GitHub repository.
See: Collaborate With Us - ROOT