#define ProofEvent_cxx
 
 
 
ProofEvent::ProofEvent()
{
   
 
   fEvent = 0;
   fNtrack = -1;
   fHisto = 0;
   fRandom = 0;
}
 
ProofEvent::~ProofEvent()
{
   
 
}
 
void ProofEvent::Begin(
TTree * )
 
{
   
   
   
 
   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());
 
 
   
 
   
   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,...)
Use this function for informational messages.
 
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
 
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
 
1-D histogram with a float per channel (see TH1 documentation)}
 
void Draw(Option_t *option="") override
Draw this histogram with options.
 
Random number generator class based on M.
 
A TTree represents a columnar dataset.