How to write a cut files for Drawing a variable with C++ macro?

Hello,

I am trying to draw a on-the-fly variable by using a macro, so far i am able to do so by

tree->Draw(“conplexVar.C”)

i would like to draw the variable with selection but i need a cut files as the error suggest:

tree->Draw(“complextVar.C”,“mll>20”)

Error in TTreePlayer::DrawSelect: Drawing using a C++ file currently requires that both the expression and the selection are files

How do i write an expression and the selection in root macro? Thanks

ROOT Version: 6.18/04
Platform: Ubuntu 18.04 LTS
Compiler: gcc 7.4.0


@pcanal can give more details, but you can use MakeSelector for that.

At the moment, I don’t see us being able to add this feature. Instead you might want to see if you can use RDataFrame.

Cheers,
Philippe.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.