Hi all,
I am reading https://root.cern.ch/doc/master/df002__dataModel_8py.html example and I got a question & comment:
- Minor typo (5 and 8)
# Operating on branches which are collection of objects
# Here we deal with the simplest of the cuts: we decide to accept the event
# only if the number of tracks is greater than 5.
n_cut = 'tracks.size() > 8'
- Aren’t arguments in Map TExecutor misplaced?
RVec<double> getPt(const RVec<FourVector> &tracks)
{
auto pt = [](const FourVector &v) { return v.pt(); };
return Map(tracks, pt);
}
as in documentation it states that function is the 1st argument and sequence is the 2nd.
auto ROOT::TExecutor< subc >::Map(F func, std::vector< T > & args )
-> std::vector<typename std::result_of<F(T)>::type>
cheers,
Bohdan
ROOT Version: 6.22