--- quicklook/QLflightS4_ND/ND_QL.cpp 2006/06/23 16:06:09 1.2 +++ quicklook/QLflightS4_ND/ND_QL.cpp 2006/07/12 09:06:35 1.3 @@ -61,11 +61,10 @@ Int_t yTrig=0; Int_t yUpperBackground=0; Int_t yBottomBackground=0; - ULong_t lastime=0, firstime=0, obt1=0; + ULong_t lastime=0, firstime=0; Double_t scale= 1./DeltaTevtime; stringstream title, title1; double obt; - Float_t cut; stringstream oss, noentries; stringstream oss1, oss2, oss3; @@ -132,23 +131,26 @@ } //------------ first and last events -> nbin ---------------------------------// - for (Int_t i = 0; i < nevents; i++){ + headBr->GetEntry(0); + ph = eh->GetPscuHeader(); + firstime = ph->GetOrbitalTime(); + + for (Int_t i = 0; i < nevents; i++){ headBr->GetEntry(i); ph = eh->GetPscuHeader(); - obt1 = ph->GetOrbitalTime(); - if(obt1 <= firstime) firstime=obt1; - if(obt1 >= lastime) lastime=obt1; + if((ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime(); + if((ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime(); } - - const Double_t nint=((lastime-firstime)/(DeltaTevtime*60000)); - const Double_t nint1=((lastime-firstime)/(DeltaT));// - const Double_t nint2=lastime-firstime; - int nbin=(int)nint; - int nbin1=(int)nint1; - int nbin2=(int)nint2; - double obmin=firstime; - double obmax=lastime; + const Double_t nint=((lastime-firstime)/(DeltaTevtime*60000)); + const Double_t nint1=((lastime-firstime)/(DeltaT));// + const Double_t nint2=lastime-firstime; + int nbin=(int)nint; + int nbin1=(int)nint1; + int nbin2=(int)nint2; + double obmin=firstime; + double obmax=lastime; + //************************** HISTOGRAMS ***************************************************// //---------------------------- First histograms -----------------------------------------// oss.str("");