- if(gAlice->TreeS() ) {
- TObjArray * lob = static_cast<TObjArray*>(gAlice->TreeS()->GetListOfBranches()) ;
- TIter next(lob) ;
- TBranch * branch = 0 ;
- Bool_t phosfound = kFALSE, sdigitizerfound = kFALSE ;
-
- while ( (branch = (static_cast<TBranch*>(next()))) && (!phosfound || !sdigitizerfound) ) {
- if ( (strcmp(branch->GetName(), "PHOS")==0) && (strcmp(branch->GetTitle(), GetName())==0) )
- phosfound = kTRUE ;
-
- else if ( (strcmp(branch->GetName(), "AliPHOSSDigitizer")==0) && (strcmp(branch->GetTitle(), GetName())==0) )
- sdigitizerfound = kTRUE ;
+/*
+ // check the QA result for RAWS
+ AliQAv1 * qa = AliQAv1::Instance(AliQAv1::kPHOS) ;
+ if ( qa->IsSet(AliQAv1::kPHOS, AliQAv1::kRAW, AliQAv1::kFATAL)) {
+ AliFatal("QA status in RAW was Fatal") ;
+ } else if ( qa->IsSet(AliQAv1::kPHOS, AliQAv1::kRAW, AliQAv1::kERROR)) {
+ AliError("QA status in RAW was Error") ;
+ } else if ( qa->IsSet(AliQAv1::kPHOS, AliQAv1::kRAW, AliQAv1::kWARNING) ) {
+ AliWarning("QA status in RAW was Warning") ;
+ } else if ( qa->IsSet(AliQAv1::kPHOS, AliQAv1::kRAW, AliQAv1::kINFO) ) {
+ AliInfo("QA status in RAW was Info") ;
+ }
+*/
+ AliRunLoader* rl = AliRunLoader::GetRunLoader(fEventFolderName) ;
+ 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
+ fLastEvent = TMath::Min(fFirstEvent, rl->GetNumberOfEvents()); // only one event at the time
+ Int_t nEvents = fLastEvent - fFirstEvent + 1;
+
+ Int_t ievent, i;
+
+ for (ievent = fFirstEvent; ievent <= fLastEvent; ievent++) {
+ rl->GetEvent(ievent) ;
+ TTree * treeS = phosLoader->TreeS();
+ if(!treeS){
+ phosLoader->MakeTree("S");
+ treeS = phosLoader->TreeS();