}
//____________________________________________________________________________
-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() ;
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 ) ;
}
}
fRecPointsInRun = 0 ;
+ SetEventRange(0,-1) ;
}
//____________________________________________________________________________