In reply to Reading input files - #4
Dear Ganis,
I have the same problem when using proof, and it still does not work. I think maybe I misunderstand what you mean.
My understanding is shown below.
In Begin
void FillHistoPbgamma::Begin(TTree * /*tree*/)
{
...
TFile *fcuts = TFile::Open("/data128/ricardo/cuts_sc3.root");
TString cutname;
for(int cint=0; cint<4; cint++)
{
cutname = Form("c3_c6d6%d",cint+1);
Cut_3[cint] = (TCutG*)fcuts->Get(cutname.Data());
fInput->Add(Cut_3[cint]);
}
...
}
In SlaveBegin
void FillHistoPbgamma::SlaveBegin(TTree * /*tree*/)
{
...
TFile *fcuts = TFile::Open("/data128/ricardo/cuts_sc3.root");\\or don't need
TString cutname;\\or don't need
for(int cint=0; cint<4; cint++)
{
cutname = Form("c3_c6d6%d",cint+1);
Cut_3[cint] = (TCutG*)fcuts->Get(cutname.Data()); \\or don't need
fInput->Add(Cut_3[cint]); \\or don't need
Cut_3[cint] = (TCutG*)fInput->FindObject(cutname.Data());
}
...
}
The crash shows
0.9: caught exception triggered by signal '1' <undef> -1
Info in <TProofLite::MarkBad>:
+++ Message from master at xxx-vostro5880 : marking xxx-vostro5880:-1 (0.9) as bad
+++ Reason: undefined message in TProof::CollectInputFrom(...)
+++ Message from master at xxx-vostro5880 : marking xxx-vostro5880:-1 (0.9) as bad
+++ Reason: undefined message in TProof::CollectInputFrom(...)
+++ Most likely your code crashed
+++ Please check the session logs for error messages either using
+++ the 'Show logs' button or executing
+++
+++ root [] TProof::Mgr("xxx-vostro5880")->GetSessionLogs()->Display("*")
Howerver, when I define TcutG in SlaveBegin, it works.
void FillHistoPbgamma::SlaveBegin(TTree * /*tree*/){
...
TCutG *cutg = new TCutG("cut1",19);
cutg->SetPoint(0,18017.1,20313);
...
}