+ // Makes all memory allocations
+ fInit = kTRUE ;
+ AliPHOSGetter * gime = AliPHOSGetter::Instance(GetTitle(), fEventFolderName) ;
+ if ( gime == 0 ) {
+ Fatal("Init" ,"Could not obtain the Getter object for file %s and event %s !", GetTitle(), fEventFolderName.Data()) ;
+ return kFALSE;
+ }
+
+ const AliPHOSGeometry * geom = gime->PHOSGeometry() ;
+
+ fEmcCrystals = geom->GetNModules() * geom->GetNCristalsInModule() ;
+
+ TString opt("Digits") ;
+ if(gime->VersionExists(opt) ) {
+ Error( "Init", "Give a version name different from %s", fEventFolderName.Data() ) ;
+ fInit = kFALSE ;
+ }
+
+ // Post Digitizer to the white board
+ gime->PostDigitizer(this) ;
+
+ fFirstEvent = 0 ;
+ fLastEvent = fFirstEvent ;
+ if (fManager)
+ fInput = fManager->GetNinputs() ;
+ else
+ fInput = 1 ;
+
+ fInputFileNames = new TString[fInput] ;
+ fEventNames = new TString[fInput] ;
+ fInputFileNames[0] = GetTitle() ;
+ fEventNames[0] = fEventFolderName.Data() ;
+ Int_t index ;
+ for (index = 1 ; index < fInput ; index++) {
+ fInputFileNames[index] = dynamic_cast<AliStream*>(fManager->GetInputStream(index))->GetFileName(0);
+ TString tempo = fManager->GetInputFolderName(index) ;
+ fEventNames[index] = tempo.Remove(tempo.Length()-1) ; // strip of the stream number added by fManager
+ }
+
+ //to prevent cleaning of this object while GetEvent is called
+ gime->PhosLoader()->GetDigitsDataLoader()->GetBaseTaskLoader()->SetDoNotReload(kTRUE);
+
+ return fInit ;
+}
+
+//____________________________________________________________________________
+void AliPHOSDigitizer::InitParameters()
+{
+ // Set initial parameters Digitizer
+
+ fPinNoise = 0.004 ;
+ fEMCDigitThreshold = 0.012 ;