Histogram filling failure

Hi,

I have a selector that compiles and works on my local machine. The Process function fills 340 1D histograms. However, when I run the selector on PROOF on the CAF, the selector compiles and runs, but the histograms are empty. Does anybody know how this can be?

Rasmus

This problem has been investigated by Jan Fiete. Here is his answer.

I guess you are using Draw and not DrawCopy. Histograms are in the output list and thus deleted once the selector terminates. I am not even sure it this is good behavior…

Rene

Hi again. I tried with simpler code, and it still gives an empty histogram; here is the code (it compiles locally), only the nonempty functions…

void AliTPCPositionSelector::SlaveBegin(TTree *tree)
{
fIDHist = new TH1I(“IDS”, “IDS”, 400, -1, 400);
fOutput->Add(fIDHist);
}

Bool_t AliTPCPositionSelector::Process(Long64_t entry)
{
fChain->GetTree()->GetEntry(entry);
Int_t ntracks = fESD->GetNumberOfTracks();

if (!fESD) {return kFALSE;}
// if (TPCPositionSelector::Process(entry) == kFALSE)
// {return kFALSE;}
if (!fESDfriend) return kFALSE;

fESD->SetESDfriend(fESDfriend);

ID = 0;
for (Int_t esdtrack = 0; esdtrack GetTrack(esdtrack);
AliESDfriendTrack * ftrack = (AliESDfriendTrack )fESD->GetTrack(esdtrack)
->GetFriendTrack();
AliTPCseed * trackseed = (AliTPCseed
) ftrack->GetCalibObject(0);

ID = fFit.MakeID(track);
fIDHist->Fill(ID);

}

return kTRUE;
}
void AliTPCPositionSelector::Terminate()
{
TFile file(“MirrorPositions.root”,“recreate”);
fOutput->Write();
}

void AliTPCPositionSelector::Init(TTree *tree)
{
if (!tree) return;
fChain = tree;
fChain->SetBranchAddress(“ESD”,&fESD);
fChain->SetBranchAddress(“ESDfriend”,&fESDfriend);
fChain->SetCacheSize(0);
}

Thanks in advance

Rasmus