Hello everyone,
I am fairly new to ROOT forums, so please let me know if my post is lacking any information.
I have run into a strange issue with trying to access fInput in the Begin() vs the SlaveBegin() portions of my TSelector. I have a simple TNtuple that I pass as input to my TSelector via
gProof->AddInput(input_TNtuple);
and which I can properly access inside the Begin() section
client_TNtuple = dynamic_cast<TNtuple*>(fInput->FindObject("input_TNtuple"));
float *client_row_content;
for (Int_t irow = 0; irow < client_TNtuple->GetEntries(); irow++)
{
client_TNtuple->GetEntry(irow);
client_row_content = client_TNtuple->GetArgs();
client_mean[irow] = client_row_content[0];
client_std[irow] = client_row_content[1];
cout << client_mean[irow] << " " << client_std[irow] << endl;
}
which will output, as intended
-13.1128 0.723721
-18.7225 0.680449
-19.119 0.728703
-18.7981 0.711431
however when I do the identical operation on the slave in BeginSlave()
slave_TNtuple = dynamic_cast<TNtuple*>(fInput->FindObject("input_TNtuple"));
float *slave_row_content;
for (Int_t irow = 0; irow < slave_TNtuple->GetEntries(); irow++)
{
slave_TNtuple->GetEntry(irow);
slave_row_content = slave_TNtuple->GetArgs();
slave_mean[irow] = slave_row_content[0];
slave_std[irow] = slave_row_content[1];
cout << slave_mean[irow] << " " << slave_std[irow] << endl;
}
I get as output
1.43339e+07 4.56837e-41
1.43339e+07 4.56837e-41
1.43339e+07 4.56837e-41
1.43339e+07 4.56837e-41
or something equally meaningless (isn’t always the same). Both client_TNtuple and slave_TNtuple are declared in my header file
TNtuple *client_TNtuple;
TNtuple *slave_TNtuple;
So it is recognizing the proper number of entries (4), but not accessing the entries properly for some reason. My instinct tells me that there might be some issue moving the input_TNtuple to the slaves properly, but I have no idea how to address that issue.
My system information is:
ROOT Version (6.10/02):
Platform, compiler (CentOS 7.4, gcc4.8.5):