Several improvements of df103_NanoAODHiggsAnalysis.C
There is a missing include in df103_NanoAODHiggsAnalysis.C. Trying to compile gives:
$ g++ -g -Wall -Wextra -Wpedantic -O2 -o h higgs.cpp $(root-config --cflags --libs)
higgs.cpp: In function 'void df103_NanoAODHiggsAnalysis(bool)':
higgs.cpp:459:15: error: 'RunGraphs' is not a member of 'ROOT::RDF'
459 | ROOT::RDF::RunGraphs({df_h_sig_4mu, df_h_bkg_4mu, df_h_data_4mu,
|
Quickfix: #include <ROOT/RDFHelpers.hxx>.
Also, currently I get the following warnings:
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c
...
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c
...
Warning in <TCanvas::Constructor>: Deleting canvas with same name: c
CC: @eguiraud
Also, I am not sure if this is intentional, but all Filters and Histos are jitted. I am now writing a fully compiled version. I would suggest either having a separate fully compiled version, or directly migrate to fully compiled version.
Also, I am not sure if this is intentional, but all Filters and Histos are jitted
The tutorials are interpreted anyway right?
well, they are .C files, but they have all necessary includes and have int main(). I can compile them.
Quickfix: #include <ROOT/RDFHelpers.hxx>
Thank you @ikabadzhov , can you open a PR with the missing include please?
I am not sure if this is intentional, but all Filters and Histos are jitted. I am now writing a fully compiled version. I would suggest either having a separate fully compiled version, or directly migrate to fully compiled version.
One consideration here is that tutorials are optimized for readability/user-friendliness, not for performance, so a fully compiled version is only interesting if it's more readable/easy to understand for the average user (could be, I don't know -- but typically a mix of helper C++ functions and expressions in strings is closer to the sweet spot).
The tutorials are interpreted anyway right?
2 of the RDF tutorials have includes and a main function in order to show to users how to compile complex RDF code.
$ ls *.C | wc -l
34
$ rg -l 'int main' *.C | wc -l
2
Hi @ikabadzhov,
It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.
Sincerely, :robot: