AliEMCALGetter::Instance(evFoldName) ;
fRecPointBranch=branchName ;
- Info("ctor", "Creating Clusterizer") ;
fClusterizer = new AliEMCALClusterizerv1(evFoldName, GetTitle());
Add(fClusterizer);
fRecPartBranch=branchName ;
- Info("ctor", "Creating PID") ;
fPID = new AliEMCALPIDv1(evFoldName, GetTitle());
Add(fPID);
fClusterizer->GetName(), fRecPointBranch.Data(),
fPID->GetName(), fRecPartBranch.Data() ) ;
}
+
+//____________________________________________________________________________
+void AliEMCALReconstructioner::SetEventRange(Int_t first, Int_t last)
+{
+ // Set the event range to process
+ fFirstEvent=first;
+ fLastEvent=last;
+ fClusterizer->SetEventRange(fFirstEvent, fLastEvent) ;
+ fPID->SetEventRange(fFirstEvent, fLastEvent) ;
+}
AliEMCALClusterizer * GetClusterizer()const { return fClusterizer ; }
AliEMCALPID * GetPID() const { return fPID; }
+ void SetEventRange(Int_t first=0, Int_t last=-1) ;
void Print()const ;
AliEMCALClusterizer * fClusterizer ; //! Pointer to AliEMCALClusterizer
AliEMCALPID * fPID ; //! Pointer to AliEMCALPID
+ Bool_t fIsInitialized ; // kTRUE if reconstructioner is initialized
+ Int_t fFirstEvent; // first event to process
+ Int_t fLastEvent; // last event to process
- Bool_t fIsInitialized ; // kTRUE if reconstructioner is initialized
-
ClassDef(AliEMCALReconstructioner,1) // Reconstruction algorithm class (Base Class)
};
AliEMCALSDigitizer::AliEMCALSDigitizer():TTask("","")
{
// ctor
+ fFirstEvent = fLastEvent = 0 ;
InitParameters() ;
fDefaultInit = kTRUE ;
}
fEventFolderName(eventFolderName)
{
// ctor
+ fFirstEvent = fLastEvent = 0 ; // runs one event by defaut
Init();
InitParameters() ;
fDefaultInit = kFALSE ;
AliEMCALSDigitizer::AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) : TTask(sd) {
//cpy ctor
+ fFirstEvent = sd.fFirstEvent ;
+ fLastEvent = sd.fLastEvent ;
fA = sd.fA ;
fB = sd.fB ;
fECPrimThreshold = sd.fECPrimThreshold ;
AliEMCALGetter * gime = AliEMCALGetter::Instance() ;
const AliEMCALGeometry * geom = gime->EMCALGeometry() ;
if (geom->GetSampling() == 0.) {
- printf("InitParameters: Sampling factor not set !") ;
- abort() ;
+ Fatal("InitParameters", "Sampling factor not set !") ;
}
else
- printf("InitParameters: Sampling factor set to %f\n", geom->GetSampling()) ;
+ Info("InitParameters", "Sampling factor set to %f", geom->GetSampling()) ;
// this threshold corresponds approximately to 100 MeV
fECPrimThreshold = 100E-3;
if(strstr(option,"tim"))
gBenchmark->Start("EMCALSDigitizer");
- AliEMCALGetter * gime = AliEMCALGetter::Instance() ;
+ AliEMCALGetter * gime = AliEMCALGetter::Instance(GetTitle()) ;
//switch off reloading of this task while getting event
if (!fInit) { // to prevent overwrite existing file
return ;
}
- Int_t nevents = gime->MaxEvent() ;
+ if (fLastEvent == -1)
+ fLastEvent = gime->MaxEvent() - 1 ;
+ else
+ fLastEvent = TMath::Min(fFirstEvent, gime->MaxEvent()); // only ine event at the time
+ Int_t nEvents = fLastEvent - fFirstEvent + 1;
+
Int_t ievent ;
- for(ievent = 0; ievent < nevents; ievent++){
+ for (ievent = fFirstEvent; ievent <= fLastEvent; ievent++) {
gime->Event(ievent,"H") ;
-
TTree * treeS = gime->TreeS();
TClonesArray * hits = gime->Hits() ;
TClonesArray * sdigits = gime->SDigits() ;
if(strstr(option,"tim")){
gBenchmark->Stop("EMCALSDigitizer");
printf("Exec: took %f seconds for SDigitizing %f seconds per event",
- gBenchmark->GetCpuTime("EMCALSDigitizer"), gBenchmark->GetCpuTime("EMCALSDigitizer") ) ;
+ gBenchmark->GetCpuTime("EMCALSDigitizer"), gBenchmark->GetCpuTime("EMCALSDigitizer")/nEvents ) ;
}
}
Int_t GetSDigitsInRun() const {return fSDigitsInRun ;}
virtual void Print() const ;
void SetEventFolderName(TString name) { fEventFolderName = name ; }
+ void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
Bool_t operator == (const AliEMCALSDigitizer & sd) const ;
const AliEMCALSDigitizer & operator = (const AliEMCALSDigitizer & /*sd*/) {return *this ;}
TString fEventFolderName; // event folder name
Bool_t fInit ; //! tells if initialisation wennt OK, will revent exec if not
Int_t fSDigitsInRun ; //! Total number of sdigits in one run
+ Int_t fFirstEvent; // first event to process
+ Int_t fLastEvent; // last event to process
ClassDef(AliEMCALSDigitizer,5) // description