User Analysis - 2
// refresh your histogram pointers here ______________________________
TFile *histFile = (TFile*)gROOT->GetFile("Histograms.root");
TH1F *NLOGS = (TH1F*)histFile->Get("NLOGS");
TH1F *LOGID = (TH1F*)histFile->Get("LOGID");
// end histogram pointer refresh ____________________________________
Int_t nbytes = 0, nb = 0;
for (Int_t ievent=m_StartEvent; ievent<nMax; ievent++, curI=ievent) {
if (event) event->Clean();
nb = fTree->GetEvent(ievent); nbytes += nb;
// start analysis code _______________________________________
int nCAL = event->CAL()->GetEntries();
for (int ihit=0; ihit < nCAL; ihit++) {
CalHit *hit = (CalHit*)event->CAL()->At(ihit);
LogID *log = (LogID*)hit->GetLog();
LOGID->Fill(log->ID()); }
// end analysis code in event loop ___________________________