X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=PHOS%2FAliPHOS.cxx;h=6e09cddf14f8abf0f997a2d102b30c4b54d542c8;hb=fa7cce36cc9d89d826b515b7bd8c08120ca3c24d;hp=3cb4fc2e3fd41f6a3b905b61c349ef42b6897dcd;hpb=d071d62958e2e26cc0d1c4f6ebe5f4f25e9f5c5a;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOS.cxx b/PHOS/AliPHOS.cxx index 3cb4fc2e3fd..6e09cddf14f 100644 --- a/PHOS/AliPHOS.cxx +++ b/PHOS/AliPHOS.cxx @@ -52,12 +52,14 @@ AliPHOS:: AliPHOS() : AliDetector() fName="PHOS"; CreatePHOSFolders(); } + //____________________________________________________________________________ -AliPHOS:: AliPHOS(const char* name, const char* title): AliDetector(name, title) +AliPHOS::AliPHOS(const char* name, const char* title): AliDetector(name, title) { // Create folder and task hierarchy CreatePHOSFolders(); } + //____________________________________________________________________________ void AliPHOS::CreatePHOSFolders() { @@ -75,6 +77,9 @@ void AliPHOS::CreatePHOSFolders() 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() ; @@ -93,22 +98,24 @@ void AliPHOS::CreatePHOSFolders() char * tempo = new char[80] ; - // creates the PHOSQA and adds it to alice main QA task + // creates the PHOSQA (QAChecker knows how to add itself in the tasks list) sprintf(tempo, "%sCheckers container",GetName() ) ; - fQATask = new AliPHOSQAChecker(GetName(), tempo); - aliceQA->Add(fQATask) ; + 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 AliPHOSQAChecker(GetName(), tempo); + 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 AliPHOSQAChecker(GetName(), tempo); + 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") ; } @@ -387,6 +394,22 @@ void AliPHOS::CreateMaterials() gMC->Gstpar(idtmed[715], "STRA",2.) ; } +//____________________________________________________________________________ +AliPHOSGeometry * AliPHOS::GetGeometry() const +{ + // gets the pointer to the AliPHOSGeometry unique instance from the folder + + AliPHOSGeometry * rv ; + + TFolder * alice = (TFolder*)gROOT->GetListOfBrowsables()->FindObject("YSAlice") ; + TString path("folders/Geometry/PHOS/") ; + path += GetTitle() ; + rv = (AliPHOSGeometry*)alice->FindObject(path) ; + if ( !rv ) + rv = fGeom ; + return rv ; +} + //____________________________________________________________________________ void AliPHOS::SetTreeAddress() {