virtual void SetCpvLocalMaxCut(Float_t) = 0;
virtual void SetCpvLogWeight(Float_t) = 0;
virtual void SetUnfolding(Bool_t) = 0;
- void SetEventFolderName(TString name) { fEventFolderName = name ; }
+ void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
+ void SetEventFolderName(TString name) { fEventFolderName = name ; }
AliPHOSClusterizer & operator = (const AliPHOSClusterizer & /*rvalue*/) {return *this ;}
protected:
TString fEventFolderName ; // event folder name
+ Int_t fFirstEvent; // first event to process
+ Int_t fLastEvent; // last event to process
-
- ClassDef(AliPHOSClusterizer,3) // Clusterization algorithm class
+ ClassDef(AliPHOSClusterizer,4) // Clusterization algorithm class
} ;
}
//____________________________________________________________________________
-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() ;
- Int_t ievent ;
+ if (fLastEvent == -1) fLastEvent = gime->MaxEvent() - 1 ;
+ else fLastEvent = TMath::Min(fLastEvent,gime->MaxEvent());
+ Int_t nEvents = fLastEvent - fFirstEvent + 1;
- for(ievent = 0; ievent < nevents; ievent++)
- {
+ for (Int_t 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) ;
}
//____________________________________________________________________________
virtual const char * GetRecPointsBranch() const{ return GetName() ;}
virtual const Int_t GetRecPointsInRun() const {return fRecPointsInRun ;}
- void Exec(Option_t *option); // Does the job
+ virtual void Exec(Option_t *option); // Does the job
void Print()const ;
AliPHOSPID(const AliPHOSPID & pid) : TTask(pid) {;}
virtual ~AliPHOSPID() ; // dtor
- virtual void Exec(Option_t *) = 0;
virtual const Int_t GetRecParticlesInRun() const { Warning("GetRecParticlesInRun", "not defined" ) ; return 0 ;}
virtual void Print() const { Warning("Print", "not defined" ) ;}
- void SetEventFolderName(TString name) { fEventFolderName = name ; }
+ void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
+ void SetEventFolderName(TString name) { fEventFolderName = name ; }
virtual const char * Version() const { Warning("Version", "not defined" ) ; return 0 ; }
virtual void WriteRecParticles() = 0;
protected:
TString fEventFolderName ; // event folder name
+ Int_t fFirstEvent; // first event to process
+ Int_t fLastEvent; // last event to process
private:
virtual void Init() { Warning("Init", "not defined" ) ; }
- ClassDef(AliPHOSPID,3) // Particle Identifier algorithm (base class)
+ ClassDef(AliPHOSPID,4) // Particle Identifier algorithm (base class)
} ;
fNEvent = 0 ;
fRecParticlesInRun = 0 ;
SetParameters() ; // fill the parameters matrix from parameters file
+ SetEventRange(0,-1) ;
}
//________________________________________________________________________
-void AliPHOSPIDv1::Exec(Option_t * option)
+void AliPHOSPIDv1::Exec(Option_t *option)
{
- //Steering method
-
+ // Steering method to perform particle reconstruction and identification
+ // for the event 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("PHOSPID");
AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
- Int_t nevents = gime->MaxEvent() ;
- Int_t ievent ;
-
+ if (fLastEvent == -1) fLastEvent = gime->MaxEvent() - 1 ;
+ else fLastEvent = TMath::Min(fLastEvent,gime->MaxEvent());
+ Int_t nEvents = fLastEvent - fFirstEvent + 1;
- for(ievent = 0; ievent < nevents; ievent++){
+ for (Int_t ievent = fFirstEvent; ievent <= fLastEvent; ievent++) {
gime->Event(ievent,"TR") ;
if(gime->TrackSegments() && //Skip events, where no track segments made
gime->TrackSegments()->GetEntriesFast()) {
gBenchmark->Stop("PHOSPID");
Info("Exec", "took %f seconds for PID %f seconds per event",
gBenchmark->GetCpuTime("PHOSPID"),
- gBenchmark->GetCpuTime("PHOSPID")/nevents) ;
+ gBenchmark->GetCpuTime("PHOSPID")/nEvents) ;
}
Unload();
virtual ~AliPHOSPIDv1() ; // dtor
- virtual void Exec(Option_t * option) ;
+ virtual void Exec(Option_t *option); // Does the job
//Get file name that contain the PCA
const TString GetFileNamePrincipal(TString particle) const;
AliPHOSTrackSegmentMaker(const AliPHOSTrackSegmentMaker & tsmaker) : TTask(tsmaker) { ; }
virtual ~ AliPHOSTrackSegmentMaker() ;
- virtual void Exec(Option_t *) = 0;
-
virtual const Int_t GetTrackSegmentsInRun() const {Warning("GetTrackSegmentsInRun", "Not Defined" ) ; return 0 ; }
virtual void Print()const {Warning("Print", "Not Defined" ) ; }
- void SetEventFolderName(TString name) { fEventFolderName = name ; }
+ void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
+ void SetEventFolderName(TString name) { fEventFolderName = name ; }
virtual void WriteTrackSegments() = 0;
protected:
TString fEventFolderName ; // event folder name
+ Int_t fFirstEvent; // first event to process
+ Int_t fLastEvent; // last event to process
- ClassDef( AliPHOSTrackSegmentMaker,3) // Algorithm class to make PHOS track segments (Base Class)
+ ClassDef( AliPHOSTrackSegmentMaker,4) // Algorithm class to make PHOS track segments (Base Class)
};
#endif // ALIPHOSTRACKSEGMENTMAKER_H
fCpvLast = 0 ;
fLinkUpArray = 0 ;
fTrackSegmentsInRun = 0 ;
+ SetEventRange(0,-1) ;
}
}
//____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv1::Exec(Option_t * option)
+void AliPHOSTrackSegmentMakerv1::Exec(Option_t *option)
{
- // STEERing method
+ // Steering method to perform track segment construction 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("PHOSTSMaker");
const AliPHOSGeometry * geom = gime->PHOSGeometry() ;
- Int_t nevents = gime->MaxEvent() ;
- Int_t ievent ;
+ if (fLastEvent == -1) fLastEvent = gime->MaxEvent() - 1 ;
+ else fLastEvent = TMath::Min(fLastEvent,gime->MaxEvent());
+ Int_t nEvents = fLastEvent - fFirstEvent + 1;
- for(ievent = 0; ievent < nevents; ievent++) {
+ for (Int_t ievent = fFirstEvent; ievent <= fLastEvent; ievent++) {
gime->Event(ievent,"R") ;
//Make some initializations
fNTrackSegments = 0 ;
gBenchmark->Stop("PHOSTSMaker");
Info("Exec", "took %f seconds for making TS %f seconds per event",
gBenchmark->GetCpuTime("PHOSTSMaker"),
- gBenchmark->GetCpuTime("PHOSTSMaker")/nevents) ;
+ gBenchmark->GetCpuTime("PHOSTSMaker")/nEvents) ;
}
Unload();
}
// virtual char* GetTrackSegmentsBranch(void)const{return (char*)fTrackSegmentsBranchTitle.Data() ;}
virtual const Int_t GetTrackSegmentsInRun()const {return fTrackSegmentsInRun ;}
- virtual void Exec(Option_t * option) ;
+ virtual void Exec(Option_t *option); // Does the job
void FillOneModule() ; // Finds range in which RecPoints belonging current PHOS module are
void MakeLinks() const; //Evaluates distances(links) between EMC and PPSD