+ // Create folder and task hierarchy
+ CreatePHOSFolders();
+}
+
+//____________________________________________________________________________
+void AliPHOS::CreatePHOSFolders()
+{
+ // create the ALICE TFolder
+ // create the ALICE TTasks
+ // add the Alice QA TTAsks
+ // create the ALICE main TFolder
+ // add the Alice QA Alarms
+ // this should be done of course by AliRun
+
+ TFolder * alice = new TFolder();
+ alice->SetNameTitle("YSAlice", "Alice Folder") ;
+ gROOT->GetListOfBrowsables()->Add(alice) ;
+
+ TFolder * aliceF = alice->AddFolder("folders", "Alice memory Folder") ;
+ // make it the owner of the objects that it contains
+ aliceF->SetOwner() ;
+ // geometry folder
+ TFolder * geomF = aliceF->AddFolder("Geometry", "Geometry objects") ;
+ // alarms folder
+ TFolder * alarmsF = aliceF->AddFolder("QAAlarms", "Alarms raised by QA check") ;
+ // make it the owner of the objects that it contains
+ alarmsF->SetOwner() ;
+ TFolder * aliceT = alice->AddFolder("tasks", "Alice tasks Folder") ;
+ // make it the owner of the objects that it contains
+ aliceT->SetOwner() ;
+
+ TTask * aliceQA = new TTask("QA", "Alice QA tasks") ;
+ aliceT->Add(aliceQA);
+
+ TTask * aliceDi = new TTask("(S)Digitizer", "Alice SDigitizer & Digitizer") ;
+ aliceT->Add(aliceDi);
+
+ TTask * aliceRe = new TTask("Reconstructioner", "Alice Reconstructioner") ;
+ aliceT->Add(aliceRe);
+
+ char * tempo = new char[80] ;
+
+ // creates the PHOSQA (QAChecker knows how to add itself in the tasks list)
+ sprintf(tempo, "%sCheckers container",GetName() ) ;
+ fQATask = new AliPHOSQAChecker(GetName(), tempo);
+
+ // creates the PHOS(S)Digitizer and adds it to alice main (S)Digitizer task
+ sprintf(tempo, "%sDigitizers container",GetName() ) ;
+ fSDTask = new TTask(GetName(), tempo);
+ aliceDi->Add(fSDTask) ;
+
+ // creates the PHOS reconstructioner and adds it to alice main Reconstructioner task
+ sprintf(tempo, "%sReconstructioner container",GetName() ) ;
+ fReTask = new TTask(GetName(), tempo);
+ aliceRe->Add(fReTask) ;
+
+ delete tempo ;
+
+ // creates the PHOS geometry folder
+ geomF->AddFolder("PHOS", "Geometry for PHOS") ;
+ // creates the PHOSQA alarm folder
+ alarmsF->AddFolder("PHOS", "QA alarms from PHOS") ;
+}
+//____________________________________________________________________________
+AliPHOS::~AliPHOS()
+{
+ // remove the alice folder and alice QA task that PHOS creates instead of AliRun
+
+ // remove and delete the PHOS QA tasks
+ TFolder * alice = (TFolder*)gROOT->GetListOfBrowsables()->FindObject("YSAlice") ;
+ TTask * aliceQA = (TTask*)alice->FindObject("tasks/QA") ;
+ fQATask->GetListOfTasks()->Delete() ;
+ aliceQA->GetListOfTasks()->Remove(fQATask) ;
+ delete fQATask ;
+
+ // remove and delete aliceQA (should be done by AliRun)