Selector for generic processing with Event.
#define ProofEvent_cxx
ProofEvent::ProofEvent()
{
fEvent = 0;
fNtrack = -1;
fHisto = 0;
fRandom = 0;
}
ProofEvent::~ProofEvent()
{
}
{
Info(
"Begin",
"starting a simple exercise with process option: %s", option.
Data());
}
void ProofEvent::SlaveBegin(
TTree * )
{
Info(
"SalveBegin",
"starting on a slave with process option: %s", option.
Data());
fEvent = new Event();
fHisto =
new TH1F(
"histo",
"tracks multiplicity", 20, 0, 100);
fHisto->GetYaxis()->SetTitle("number of events");
fHisto->GetXaxis()->SetTitle("number of tracks");
fOutput->Add(fHisto);
}
{
int i= (int)(100 * (fRandom->Rndm()));
fEvent->Build(i,(1+i), 2);
fNtrack= (fEvent->GetNtrack());
if ((fNtrack >= 0 )&& (fNtrack <= 100 ))
fHisto->Fill(fNtrack, 1);
}
void ProofEvent::SlaveTerminate()
{
}
void ProofEvent::Terminate()
{
TCanvas *c1 =
new TCanvas(
"c1",
"Proof ProofEvent canvas",200,10,700,700);
fHisto =
dynamic_cast<TH1F *
>(fOutput->FindObject(
Form(
"histo")));
if (fHisto) {
} else {
Warning(
"Terminate",
"histogram not found");
}
}
- Author
- Gerardo Ganis (gerar.nosp@m.do.g.nosp@m.anis@.nosp@m.cern.nosp@m..ch)
Definition in file ProofEvent.C.