ctor changed to create the task PHOS
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 May 2001 22:42:06 +0000 (22:42 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 May 2001 22:42:06 +0000 (22:42 +0000)
PHOS/AliPHOS.cxx

index 8e622f37872f9fdc5acb6415e4eeaff4ae1f80ba..ac9a7dceec373d883a00e3dd5668e0491679cb0b 100644 (file)
@@ -28,6 +28,9 @@
 // --- ROOT system ---
 class TFile;
 #include "TTree.h"
+#include "TTask.h"
+#include "TROOT.h"
+#include "TFolder.h"
 
 // --- Standard library ---
 
@@ -43,6 +46,24 @@ class TFile;
 ClassImp(AliPHOS)
 
 
+//____________________________________________________________________________
+  AliPHOS::AliPHOS():AliDetector()
+{
+  // ctor. creates task PHOS
+  TTask * phosTask = new TTask("PHOS","");
+  TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; 
+  roottasks->Add(phosTask) ; 
+}
+
+//____________________________________________________________________________
+  AliPHOS::AliPHOS(const char* name, const char* title=""):AliDetector(name, title)
+{
+  // ctor. creates task PHOS
+  TTask * phosTask = new TTask("PHOS","");
+  TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; 
+  roottasks->Add(phosTask) ; 
+}
+
 //____________________________________________________________________________
 void AliPHOS::CreateMaterials()
 {
@@ -307,7 +328,6 @@ void AliPHOS::CreateMaterials()
 void AliPHOS::SetTreeAddress()
 { 
   // called by AliRun
-
   // TBranch *branch;
   //  AliDetector::SetTreeAddress();