fClusterizer = 0 ;
fTSMaker = 0 ;
fPID = 0 ;
-
+ fFirstEvent = 0 ;
+ fLastEvent = -1 ;
fIsInitialized = kFALSE ;
}
AliPHOSGetter::Instance(evFoldName) ;
fRecPointBranch=branchName ;
- Info("ctor", "Creating Clusterizer") ;
fClusterizer = new AliPHOSClusterizerv1(evFoldName, GetTitle());
Add(fClusterizer);
fTSBranch=branchName ;
- Info("ctor", "Creating Track Segment Maker") ;
fTSMaker = new AliPHOSTrackSegmentMakerv1(evFoldName, GetTitle());
Add(fTSMaker) ;
fRecPartBranch=branchName ;
- Info("ctor", "Creating PID") ;
fPID = new AliPHOSPIDv1(evFoldName, GetTitle());
Add(fPID);
fTSMaker->GetName(), fTSBranch.Data() ,
fPID->GetName(), fRecPartBranch.Data() ) ;
}
+
+//____________________________________________________________________________
+void AliPHOSReconstructioner::SetEventRange(Int_t first, Int_t last)
+{
+ // Set the event range to process
+ fFirstEvent=first;
+ fLastEvent=last;
+ fClusterizer->SetEventRange(fFirstEvent, fLastEvent) ;
+ fTSMaker->SetEventRange(fFirstEvent, fLastEvent) ;
+ fPID->SetEventRange(fFirstEvent, fLastEvent) ;
+}
AliPHOSClusterizer * GetClusterizer()const { return fClusterizer ; }
AliPHOSPID * GetPID() const { return fPID; }
AliPHOSTrackSegmentMaker * GetTSMaker() const { return fTSMaker ; }
+ void SetEventRange(Int_t first=0, Int_t last=-1) ;
void Print()const ;
AliPHOSClusterizer * fClusterizer ; //! Pointer to AliPHOSClusterizer
AliPHOSPID * fPID ; //! Pointer to AliPHOSPID
AliPHOSTrackSegmentMaker * fTSMaker ; //! Pointer to AliPHOSTrackSegmentMaker
-
- Bool_t fIsInitialized ; // kTRUE if reconstructioner is initialized
+ Bool_t fIsInitialized ; // kTRUE if reconstructioner is initialized
+ Int_t fFirstEvent; // first event to process
+ Int_t fLastEvent; // last event to process
ClassDef(AliPHOSReconstructioner,1) // Reconstruction algorithm class (Base Class)
AliPHOSSDigitizer::AliPHOSSDigitizer():TTask("","")
{
// ctor
+ fFirstEvent = fLastEvent = 0 ;
InitParameters() ;
fDefaultInit = kTRUE ;
}
{
// ctor
+ fFirstEvent = fLastEvent = 0 ; // runs one event by defaut
InitParameters() ;
Init();
fDefaultInit = kFALSE ;
{
//cpy ctor
+ fFirstEvent = sd.fFirstEvent ;
+ fLastEvent = sd.fLastEvent ;
fA = sd.fA ;
fB = sd.fB ;
fPrimThreshold = sd.fPrimThreshold ;
fB = 10000000.;
fPrimThreshold = 0.01 ;
fSDigitsInRun = 0 ;
- SetEventRange(0,-1) ;
}
//____________________________________________________________________________
if(strstr(option,"tim"))
gBenchmark->Start("PHOSSDigitizer");
- AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
+ AliPHOSGetter * gime = AliPHOSGetter::Instance(GetTitle()) ;
//switch off reloading of this task while getting event
if (!fInit) { // to prevent overwrite existing file
return ;
}
-
if (fLastEvent == -1)
fLastEvent = gime->MaxEvent() - 1 ;
else
- fLastEvent = TMath::Min(fLastEvent,gime->MaxEvent());
+ fLastEvent = TMath::Min(fFirstEvent, gime->MaxEvent()); // only ine event at the time
Int_t nEvents = fLastEvent - fFirstEvent + 1;
Int_t ievent ;
for (ievent = fFirstEvent; ievent <= fLastEvent; ievent++) {
-
gime->Event(ievent,"H") ;
-
TTree * treeS = gime->TreeS();
TClonesArray * hits = gime->Hits() ;
TClonesArray * sdigits = gime->SDigits() ;
digit = dynamic_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
// if(digit->GetNprimary() == 0)
// continue;
- printf("%6d %8d %6.5e %4d %2d :",
+ printf("%6d %8d %6.5e %4d %2d :\n",
digit->GetId(), digit->GetAmp(), digit->GetTime(), digit->GetIndexInList(), digit->GetNprimary()) ;
Int_t iprimary;
for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++) {