X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSClusterizerv1.cxx;h=b2eb84da2ea112436918a232f37c66f0fe0ed18f;hb=f2649dd2a600ac50f4a40d9042b71d7194353e97;hp=44b067e3d3132681b1b9f9f1eccb1579d773f57a;hpb=e957fea89c462908a01dcfa4f611e99a98080071;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSClusterizerv1.cxx b/PHOS/AliPHOSClusterizerv1.cxx index 44b067e3d31..b2eb84da2ea 100644 --- a/PHOS/AliPHOSClusterizerv1.cxx +++ b/PHOS/AliPHOSClusterizerv1.cxx @@ -114,23 +114,32 @@ Float_t AliPHOSClusterizerv1::Calibrate(Int_t amp, Int_t absId) const } //____________________________________________________________________________ -void AliPHOSClusterizerv1::Exec(Option_t * option) +void AliPHOSClusterizerv1::Exec(Option_t *option) { - // Steering method + // Steering method to perform clusterization for events + // in the range from fFirstEvent to fLastEvent. + // This range is optionally set by SetEventRange(). + // if fLastEvent=-1 (by default), then process events until the end. if(strstr(option,"tim")) gBenchmark->Start("PHOSClusterizer"); - if(strstr(option,"print")) + if(strstr(option,"print")) { Print() ; + return ; + } AliPHOSGetter * gime = AliPHOSGetter::Instance() ; - Int_t nevents = gime->MaxEvent() ; + if (fLastEvent == -1) + fLastEvent = gime->MaxEvent() - 1 ; + else + fLastEvent = TMath::Min(fLastEvent,gime->MaxEvent()); + Int_t nEvents = fLastEvent - fFirstEvent + 1; + Int_t ievent ; - for(ievent = 0; ievent < nevents; ievent++) - { + for (ievent = fFirstEvent; ievent <= fLastEvent; ievent++) { gime->Event(ievent, "D"); GetCalibrationParameters() ; @@ -158,7 +167,7 @@ void AliPHOSClusterizerv1::Exec(Option_t * option) gBenchmark->Stop("PHOSClusterizer"); Info("Exec", " took %f seconds for Clusterizing %f seconds per event \n", gBenchmark->GetCpuTime("PHOSClusterizer"), - gBenchmark->GetCpuTime("PHOSClusterizer")/nevents ) ; + gBenchmark->GetCpuTime("PHOSClusterizer")/nEvents ) ; } } @@ -316,6 +325,7 @@ void AliPHOSClusterizerv1::InitParameters() fRecPointsInRun = 0 ; + SetEventRange(0,-1) ; } //____________________________________________________________________________