I have a macro that prepares a TProof and then processes a TDSet via another C file:
auto dset_channel = new TDSet("TTree", "nominal");
dset_channel->Add(fc_channel->GetList());
auto fProof_channel = TProof::Open("workers=4");
fProof_channel->Process(dset_channel,"Processor.C+");
Inside the Processor class, I have an #include to a file with many functions that I want to use. However, it starts to complain about the use of unidentified objects. Such as, TMath::Pi(), TColor, etc… even though when I run a macro using “root -l -b -q xxx.C” it never complained.
I added a bunch of #includes to overcome the errors but now I get “error: use of undeclared identifier ‘gSystem’” . I don’t know what I should do so I can use gSystem through TProof.
Is there some magical way to link the libraries so that the objects I can use with “root -l -b -q” are also available through the Processor via TProof?
Thanks for your answer. That solved that error, thanks!
I have another small problem. For running the Processor.C, I need to add some parameters to the fProof file, which I do with:
fProof_channel->AddInput(job_params);
and I also load the file for the class of job_params:
fProof_channel->Load("JobParams.h+");
However, inside JobParams I have an #include to another file that has some functions I want to use. When I try to run the code I get an error of the sort:
././JobParams.h:10:10: fatal error: 'macros/methods.h' file not found
#include "macros/methods.h"
^~~~~~~~~~~~~~~~~~~~~~~
09:28:15 22510 Wrk-0.0 | Error in <ACLiC>: Dictionary generation failed!
Do I need to do something to link this “macros/methods.h” file? Should I somehow declare the whole path to the file?