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()
{
fHisto =
dynamic_cast<TH1F *
>(fOutput->FindObject(
Form(
"histo")));
if (fHisto) {
} else {
Warning(
"Terminate",
"histogram not found");
}
}
Selector for generic processing with Event.
void Info(const char *location, const char *msgfmt,...)
void Warning(const char *location, const char *msgfmt,...)
char * Form(const char *fmt,...)
1-D histogram with a float per channel (see TH1 documentation)}
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Random number generator class based on M.
const char * Data() const
A TTree represents a columnar dataset.
- Author
- Gerardo Ganis (gerar.nosp@m.do.g.nosp@m.anis@.nosp@m.cern.nosp@m..ch)
Definition in file ProofEvent.C.