AliRunLoader* rl = AliRunLoader::GetRunLoader(fEventFolderName) ;
if(rl){
AliPHOSLoader * phosLoader =
- dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
- phosLoader->CleanSDigitizer() ;
+ static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+ if(phosLoader)
+ phosLoader->CleanSDigitizer() ;
}
}
if (!rl)
rl = AliRunLoader::Open(GetTitle(), fEventFolderName) ;
- AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+ AliPHOSLoader * phosLoader = static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
phosLoader->PostSDigitizer(this);
phosLoader->GetSDigitsDataLoader()->GetBaseTaskLoader()->SetDoNotReload(kTRUE);
}
}
*/
AliRunLoader* rl = AliRunLoader::GetRunLoader(fEventFolderName) ;
- AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
-
+ AliPHOSLoader * phosLoader = static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+
//switch off reloading of this task while getting event
if (!fInit) { // to prevent overwrite existing file
AliError( Form("Give a version name different from %s", fEventFolderName.Data()) ) ;
return ;
}
-
+
if (fLastEvent == -1)
fLastEvent = rl->GetNumberOfEvents() - 1 ;
else
//Now make SDigits from hits, for PHOS it is the same, so just copy
for ( i = 0 ; i < hits->GetEntries() ; i++ ) {
- AliPHOSHit * hit = dynamic_cast<AliPHOSHit *>(hits->At(i)) ;
+
+ AliPHOSHit * hit = static_cast<AliPHOSHit *>(hits->At(i)) ;
// Assign primary number only if contribution is significant
if( hit->GetEnergy() > fPrimThreshold)
fSDigitsInRun += nSdigits ;
sdigits->Expand(nSdigits) ;
-
- for (i = 0 ; i < nSdigits ; i++) {
- AliPHOSDigit * digit = dynamic_cast<AliPHOSDigit *>(sdigits->At(i)) ;
+
+ for (i = 0 ; i < nSdigits ; i++) {
+ AliPHOSDigit * digit = static_cast<AliPHOSDigit *>(sdigits->At(i)) ;
digit->SetIndexInList(i) ;
}
-
+
// // make Quality Assurance data
//
// if (GetQADataMaker()->IsCycleDone() ) {
// Prints list of digits produced in the current pass of AliPHOSDigitizer
AliRunLoader* rl = AliRunLoader::GetRunLoader(fEventFolderName) ;
- AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+ AliPHOSLoader * phosLoader = static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
// Get PHOS Geometry object
AliPHOSGeometry *geom;
Int_t maxEmc = geom->GetNModules() * geom->GetNCristalsInModule() ;
Int_t index ;
for (index = 0 ; (index < sdigits->GetEntriesFast()) &&
- ((dynamic_cast<AliPHOSDigit *> (sdigits->At(index)))->GetId() <= maxEmc) ; index++) {
- digit = dynamic_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
+ ((static_cast<AliPHOSDigit *> (sdigits->At(index)))->GetId() <= maxEmc) ; index++) {
+ digit = static_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
// if(digit->GetNprimary() == 0)
// continue;
// printf("%6d %8d %6.5e %4d %2d :\n", // YVK
Int_t maxEmc = geom->GetNModules() * geom->GetNCristalsInModule() ;
Int_t index ;
for (index = 0 ; index < sdigits->GetEntriesFast(); index++) {
- digit = dynamic_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
+ digit = static_cast<AliPHOSDigit *>( sdigits->At(index) ) ;
if(digit->GetId() > maxEmc){
printf("\n%6d %8d %4d %2d :",
digit->GetId(), digit->GetAmp(), digit->GetIndexInList(), digit->GetNprimary()) ;
{
// Unloads the objects from the folder
AliRunLoader* rl = AliRunLoader::GetRunLoader(fEventFolderName) ;
- AliPHOSLoader * phosLoader = dynamic_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+ AliPHOSLoader * phosLoader = static_cast<AliPHOSLoader*>(rl->GetLoader("PHOSLoader"));
+
phosLoader->UnloadHits() ;
phosLoader->UnloadSDigits() ;
}