Skip to content

Add support for operator() for classes that define it

Pieter David requested to merge piedavid/bamboo:addoperatorcall into master

Closes https://gitlab.cern.ch/cp3-cms/bamboo/-/issues/71

I checked that

b = op.construct("ROOT::Math::Boost", (.7, 0., 0.))
b(tree.Muon[0].p4)

gives a proxy with the correct return type (so e.g. Pt() can be called on it), and converts to the C++ string 'ROOT::Math::Boost{0.7, 0.0, 0.0}(ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<float> >{Muon_pt[0], Muon_eta[0], Muon_phi[0], Muon_mass[0]})'

CC @gsaha

Merge request reports