Code for simulation, sdigitization and digitization moved from macros to compiled...
[u/mrichter/AliRoot.git] / PHOS / AliPHOS.cxx
index 0d3176b..bf73123 100644 (file)
@@ -38,7 +38,10 @@ class TFile;
 #include "AliPHOS.h"
 #include "AliPHOSGeometry.h"
 #include "AliPHOSLoader.h"
-
+#include "AliPHOSQAChecker.h"
+#include "AliRun.h"
+#include "AliPHOSDigitizer.h"
+#include "AliPHOSSDigitizer.h"
 
 ClassImp(AliPHOS)
 //____________________________________________________________________________
@@ -425,3 +428,20 @@ AliLoader* AliPHOS::MakeLoader(const char* topfoldername)
  fLoader = new AliPHOSLoader(GetName(),topfoldername);
  return fLoader;
 }
+
+
+//____________________________________________________________________________
+void AliPHOS::Hits2SDigits()  
+{ 
+// create summable digits
+
+  AliPHOSSDigitizer* phosDigitizer = 
+    new AliPHOSSDigitizer(fLoader->GetRunLoader()->GetFileName().Data());
+  phosDigitizer->ExecuteTask("all");
+}
+
+//____________________________________________________________________________
+AliDigitizer* AliPHOS::CreateDigitizer(AliRunDigitizer* manager)
+{
+  return new AliPHOSDigitizer(manager);
+}