digits2raw added
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 26 Jun 2004 08:02:04 +0000 (08:02 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 26 Jun 2004 08:02:04 +0000 (08:02 +0000)
PMD/AliPMD.cxx
PMD/AliPMD.h

index 3039638f702662446655d150f703d07fc6179b14..75d57f6d6e4ec4fc29b31b70fa0d2cd7f6dc8bd3 100644 (file)
@@ -55,6 +55,7 @@
 #include "AliMC.h"
 #include "AliPMDDigitizer.h"
 #include "AliPMDhit.h"
+#include "AliPMDDDLRawData.h"
   
 ClassImp(AliPMD)
  
@@ -369,5 +370,22 @@ AliDigitizer* AliPMD::CreateDigitizer(AliRunDigitizer* manager) const
   return new AliPMDDigitizer(manager);
 }
 // ---------------------------------------------------------------------------
+void AliPMD::Digits2Raw()
+{ 
+// convert digits of the current event to raw data
+
+  fLoader->LoadDigits();
+  TTree* digits = fLoader->TreeD();
+  if (!digits) {
+    Error("Digits2Raw", "no digits tree");
+    return;
+  }
+
+  AliPMDDDLRawData rawWriter;
+  rawWriter.WritePMDRawData(digits);
+
+  fLoader->UnloadDigits();
+}
+
 
 
index be9000cf8db96c79edbcb1b5e09681b08096e157..447132c1060c4f2c49c5b19227eec683d38d145f 100644 (file)
@@ -49,6 +49,7 @@ public:
 
   virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
 
+  virtual void  Digits2Raw();
   
  protected:
   Float_t fPar[4];           // pmdin, pmdout, thgas, thcell