if ( ! list )
return ;
EndOfDetectorCycle(task, list) ;
- TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
+ TDirectory * subDir = NULL ;
+ if (fDetectorDir)
+ subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ;
if (subDir) {
subDir->cd() ;
TIter next(list) ;
TH1 * obj ;
while ( (obj = dynamic_cast<TH1 *>(next())) ) {
- TString name(obj->GetTitle()) ;
- if (name.Contains(AliQA::GetExpert())) {
- name.ReplaceAll(AliQA::GetExpert(), "") ;
- obj->SetTitle(name) ;
+ if (!obj->TestBit(AliQA::GetExpertBit()))
obj->Write() ;
- }
}
- TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
- if ( expertDir ) {
- expertDir->cd() ;
- next.Reset() ;
- while ( (obj = dynamic_cast<TH1 *>(next())) ) {
- TString name(obj->GetTitle()) ;
- if (name.Contains(AliQA::GetExpert()))
- continue ;
- name.ReplaceAll(AliQA::GetExpert(), "") ;
- obj->SetTitle(name) ;
- obj->Write() ;
- }
+ if (WriteExpert()) {
+ TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ;
+ if ( expertDir ) {
+ expertDir->cd() ;
+ next.Reset() ;
+ while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+ if (!obj->TestBit(AliQA::GetExpertBit()))
+ continue ;
+ obj->Write() ;
+ }
+ }
}
}
+ fOutput->Save() ;
ResetCycle() ;
}