Index: bin/test_client.cc
===================================================================
--- bin/test_client.cc	(revision 2a981a13580ca26970ba72428614c5dfbc1c856d)
+++ bin/test_client.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -6,5 +6,5 @@
 #include <memory>
 
-#include "DAQInterface.hh"
+#include "DAQInterfaceMR.hh"
 #include "Hist2DMap.hh"
 #include "RedisIO.hh"
@@ -41,5 +41,5 @@
 
   //RunNumber runNumber;
-	DAQInterface *daq =  new DAQInterface("/sim/dimserver/TEST_SWAP_1",1000);
+	DAQInterfaceMR *daq =  new DAQInterfaceMR("/sim/dimserver/TEST_SWAP_1",1000);
 	daq->setActive(true);
   daq->setHist2DMap(histmap);
Index: bin/test_client_gppd.cc
===================================================================
--- bin/test_client_gppd.cc	(revision aaaef62793aa8bc34669ad86700da792edaf8a7b)
+++ bin/test_client_gppd.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -6,5 +6,5 @@
 #include <memory>
 
-#include "DAQInterface.hh"
+#include "DAQInterfaceGPPD.hh"
 #include "Hist2DMap.hh"
 #include "RedisIO.hh"
@@ -38,5 +38,5 @@
 
   //RunNumber runNumber;
-	DAQInterface *daq =  new DAQInterface("shenme/shenme",1000);
+	DAQInterfaceGPPD *daq =  new DAQInterfaceGPPD("shenme/shenme",1000);
 	daq->setActive(true);
   daq->setHist2D(hist);
Index: bin/test_client_mwpc.cc
===================================================================
--- bin/test_client_mwpc.cc	(revision da6cfcc2b9d2e83cf3dd6b86da558073b516cf7f)
+++ bin/test_client_mwpc.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -6,5 +6,5 @@
 #include <memory>
 
-#include "DAQInterface.hh"
+#include "DAQInterfaceMR.hh"
 #include "Hist2DMap.hh"
 #include "RedisIO.hh"
@@ -25,5 +25,5 @@
 
   //RunNumber runNumber;
-	DAQInterface daq("dimserver/TEST_SWAP_0",1000);
+	DAQInterfaceMR daq("dimserver/TEST_SWAP_0",1000);
 	daq.setActive(true);
   daq.setHist2DMap(histmap);
Index: src/DimRecv/libinc/DAQInterface.hh
===================================================================
--- src/DimRecv/libinc/DAQInterface.hh	(revision 488c8fd25412e8e536424cffcb92eb70f66e0781)
+++ src/DimRecv/libinc/DAQInterface.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -63,6 +63,6 @@
   void infoHandler() override;
 	void setActive(bool act) ;
-	void setHist2DMap(const std::shared_ptr<Hist2DMap>& map);
-	void setHist2D(const std::shared_ptr<NumpyHist2D>& map);
+	// void setHist2DMap(const std::shared_ptr<Hist2DMap>& map);
+	// void setHist2D(const std::shared_ptr<NumpyHist2D>& map);
 
 	uint64_t numTriggered();
@@ -80,4 +80,9 @@
 	}
 	const DataFlow& getDataFlow() {return m_flow;}
+	virtual bool pushBackTask(uint8_t *data, size_t dsize) = 0;
+
+protected:
+	std::vector<std::shared_ptr<DaqTask> > m_tasks;
+	std::mutex m_task_mutex;
 
 private:
@@ -94,9 +99,7 @@
 
   // task and info
-  std::vector<DaqTask> m_tasks;
   DataFlow m_flow;
 
 	// house keeping
-  std::mutex m_task_mutex;
   std::chrono::milliseconds m_houskpg_intvl_ms;
 	std::chrono::system_clock::time_point m_start_time;
@@ -104,7 +107,7 @@
 	std::shared_future<void> m_hk_future;
 
-	//histogram
-	std::shared_ptr<Hist2DMap> m_hist_map; //fixeme: map searching could be slow
-	std::shared_ptr<NumpyHist2D> m_hist2d;
+	// //histogram
+	// std::shared_ptr<Hist2DMap> m_hist_map; //fixeme: map searching could be slow
+	// std::shared_ptr<NumpyHist2D> m_hist2d;
 
 	std::string m_dim_name;
Index: src/DimRecv/libinc/DAQInterfaceGPPD.hh
===================================================================
--- src/DimRecv/libinc/DAQInterfaceGPPD.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ src/DimRecv/libinc/DAQInterfaceGPPD.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -0,0 +1,23 @@
+#ifndef DimRecv_DAQInterfaceGPPD_hh
+#define DimRecv_DAQInterfaceGPPD_hh
+
+#include "DaqTaskGPPD.hh"
+#include "DAQInterface.hh"
+class DAQInterfaceGPPD: public DAQInterface {
+public:
+  DAQInterfaceGPPD(std::string daq_name="DAQ",
+               unsigned houseKeeping_itervl_ms = 1000);
+  virtual ~DAQInterfaceGPPD();
+	// void setHist2DMap(const std::shared_ptr<Hist2DMap>& map);
+  void setHist2D(std::shared_ptr<NumpyHist2D>& map);
+  bool pushBackTask(uint8_t *data, size_t dsize) override;
+
+private:
+
+	// //histogram
+	// std::shared_ptr<Hist2DMap> m_hist_map; //fixeme: map searching could be slow
+	std::shared_ptr<NumpyHist2D> m_hist2d;
+
+};
+
+#endif
Index: src/DimRecv/libinc/DAQInterfaceMR.hh
===================================================================
--- src/DimRecv/libinc/DAQInterfaceMR.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ src/DimRecv/libinc/DAQInterfaceMR.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -0,0 +1,24 @@
+#ifndef DimRecv_DAQInterfaceMR_hh
+#define DimRecv_DAQInterfaceMR_hh
+
+#include "DaqTaskGPPD.hh"
+#include "DAQInterface.hh"
+
+class Hist2DMap;
+
+class DAQInterfaceMR: public DAQInterface {
+public:
+  DAQInterfaceMR(std::string daq_name="DAQ",
+               unsigned houseKeeping_itervl_ms = 1000);
+  virtual ~DAQInterfaceMR();
+	void setHist2DMap(std::shared_ptr<Hist2DMap>& map);
+  bool pushBackTask(uint8_t *data, size_t dsize);
+
+private:
+
+	// //histogram
+	std::shared_ptr<Hist2DMap> m_hist_map; //fixeme: map searching could be slow
+
+};
+
+#endif
Index: src/DimRecv/libinc/DaqTask.hh
===================================================================
--- src/DimRecv/libinc/DaqTask.hh	(revision e5be1adf08de60cbf6f1dc45e0ab314b23fa0f48)
+++ src/DimRecv/libinc/DaqTask.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -11,16 +11,13 @@
 class DaqTask {
 public:
-  DaqTask(uint8_t* begin, uint8_t* end, const std::shared_ptr<Hist2DMap>& map);
-  DaqTask(uint8_t* begin, uint8_t* end, const std::shared_ptr<NumpyHist2D>& hist );
-
   DaqTask(uint8_t* begin, uint8_t* end);
   virtual ~DaqTask();
 
   // Move initialization
-  DaqTask(DaqTask&& other) ;
+  DaqTask(DaqTask&& other) =  delete ;
   // Copy initialization
   DaqTask(const DaqTask& other) = delete;
   // Move assignment
-  DaqTask& operator = (DaqTask&& other) ;
+  DaqTask& operator = (DaqTask&& other) = delete ;
   // Copy assignment
   DaqTask& operator = (const DaqTask& other) = delete;
@@ -35,15 +32,11 @@
   void getTime(int &second, int &ms) const;
 
-
-private:
+protected:
+  //the actual workload
+  virtual uint64_t run() = 0;
+  mutable std::mutex m_run_mutex;
   std::vector<uint8_t> m_data;
   std::shared_future<uint64_t> m_future;
   int m_time_s, m_time_ms; //package stamped time, since 1/1/1970, in seconds
-  mutable std::mutex m_run_mutex;
-  std::shared_ptr<Hist2DMap> m_hist_map;
-  std::shared_ptr<NumpyHist2D> m_hist2d;
-
-  //the actual workload
-  uint64_t run();
 };
 
Index: src/DimRecv/libinc/DaqTaskGPPD.hh
===================================================================
--- src/DimRecv/libinc/DaqTaskGPPD.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ src/DimRecv/libinc/DaqTaskGPPD.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -0,0 +1,22 @@
+#ifndef DimRecv_DaqTaskGPPD_hh
+#define DimRecv_DaqTaskGPPD_hh
+
+#include <future>
+#include <vector>
+#include <mutex>
+
+#include "DaqTask.hh"
+#include "NumpyHist2D.hh"
+
+class DaqTaskGPPD : public DaqTask {
+public:
+  DaqTaskGPPD(uint8_t* begin, uint8_t* end, std::shared_ptr<NumpyHist2D>& hist );
+  virtual ~DaqTaskGPPD();
+
+private:
+  uint64_t run() override;
+  std::shared_ptr<NumpyHist2D> m_hist2d;
+
+};
+
+#endif
Index: src/DimRecv/libinc/DaqTaskMR.hh
===================================================================
--- src/DimRecv/libinc/DaqTaskMR.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ src/DimRecv/libinc/DaqTaskMR.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -0,0 +1,22 @@
+#ifndef DimRecv_DaqTaskMR_hh
+#define DimRecv_DaqTaskMR_hh
+
+#include <future>
+#include <vector>
+#include <mutex>
+
+#include "DaqTask.hh"
+#include "Hist2DMap.hh"
+
+class DaqTaskMR : public DaqTask {
+public:
+  DaqTaskMR(uint8_t* begin, uint8_t* end, std::shared_ptr<Hist2DMap>& hist );
+  virtual ~DaqTaskMR();
+
+private:
+  uint64_t run() override;
+  std::shared_ptr<Hist2DMap>& m_hist_map;
+
+};
+
+#endif
Index: src/DimRecv/libsrc/DAQInterface.cc
===================================================================
--- src/DimRecv/libsrc/DAQInterface.cc	(revision 2f717ab791519b2456ca3055f3292d2ee4b9cd1c)
+++ src/DimRecv/libsrc/DAQInterface.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -14,5 +14,5 @@
 , m_flow(DataFlow{})
 , m_houskpg_intvl_ms(houseKeeping_itervl_ms), m_start_time(std::chrono::system_clock::now())
-, m_hist_map(nullptr), m_hist2d(nullptr), m_dim_name(daq_name)
+, m_dim_name(daq_name)
 {
   addErrorHandler(&m_errhdl);
@@ -34,16 +34,4 @@
   EW_LOG_INFO("DAQInterface destructed ");
 
-}
-
-void DAQInterface::setHist2DMap(const std::shared_ptr<Hist2DMap>& map)
-{
-  std::lock_guard<std::mutex> guard(m_task_mutex);
-  m_hist_map = std::shared_ptr<Hist2DMap>(map);
-}
-
-void DAQInterface::setHist2D(const std::shared_ptr<NumpyHist2D>& hist)
-{
-  std::lock_guard<std::mutex> guard(m_task_mutex);
-  m_hist2d = std::shared_ptr<NumpyHist2D>(hist);
 }
 
@@ -75,5 +63,5 @@
     EW_LOG_INFO("infoHandler getServerId {}", getServerId());
 
-  //reconnect when never received any data before and pid!=0  
+  //reconnect when never received any data before and pid!=0
   if(!m_flow.received_byte)
   {
@@ -87,5 +75,4 @@
     }
   }
-
 
   // EW_LOG_INFO("my id {}", m_server_pid);
@@ -103,19 +90,11 @@
 
       uint8_t *data = static_cast<uint8_t*>(curr->getData());
-      std::vector<uint8_t> buf(data, data+dsize);
-
       {
         std::lock_guard<std::mutex> guard(m_task_mutex);
-
-
-        if(m_hist2d)
-          m_tasks.emplace_back( DaqTask(data, data+dsize, m_hist2d));
-        else if(m_hist_map)
-          m_tasks.emplace_back( DaqTask(data, data+dsize, m_hist_map));
-        else
-          m_tasks.emplace_back( DaqTask(data, data+dsize));
-
-        m_tasks.back().setTime(curr->getTimestamp(), curr->getTimestampMillisecs());
-        m_tasks.back().start();
+        if(pushBackTask(data, dsize))
+        {
+          m_tasks.back()->setTime(curr->getTimestamp(), curr->getTimestampMillisecs());
+          m_tasks.back()->start();
+        }
       }
     }
@@ -161,7 +140,7 @@
 
       auto newend = std::remove_if(m_tasks.begin(), m_tasks.end(),
-      [&](DaqTask &atask ) -> bool
+      [&](std::shared_ptr<DaqTask> &atask ) -> bool
       {
-        uint64_t processed = atask.readyAndValid();
+        uint64_t processed = atask->readyAndValid();
         if(! processed )
           return false;
Index: src/DimRecv/libsrc/DAQInterfaceGPPD.cc
===================================================================
--- src/DimRecv/libsrc/DAQInterfaceGPPD.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ src/DimRecv/libsrc/DAQInterfaceGPPD.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -0,0 +1,31 @@
+#include "DAQInterfaceGPPD.hh"
+#include "DaqTaskGPPD.hh"
+
+
+DAQInterfaceGPPD::DAQInterfaceGPPD(std::string daq_name,
+                           unsigned houseKeeping_itervl_ms)
+: DAQInterface(daq_name, houseKeeping_itervl_ms)
+{
+
+}
+
+DAQInterfaceGPPD::~DAQInterfaceGPPD()
+{
+
+}
+
+void DAQInterfaceGPPD::setHist2D(std::shared_ptr<NumpyHist2D>& hist)
+{
+  std::lock_guard<std::mutex> guard(m_task_mutex);
+  m_hist2d = hist;
+}
+
+bool DAQInterfaceGPPD::pushBackTask(uint8_t *data, size_t dsize)
+{
+  if(m_hist2d.get())
+  {
+    m_tasks.emplace_back( std::shared_ptr<DaqTask>( new DaqTaskGPPD(data, data+dsize, m_hist2d)));
+    return true;
+  }
+  return false;
+}
Index: src/DimRecv/libsrc/DAQInterfaceMR.cc
===================================================================
--- src/DimRecv/libsrc/DAQInterfaceMR.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ src/DimRecv/libsrc/DAQInterfaceMR.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -0,0 +1,36 @@
+#include "DAQInterfaceMR.hh"
+#include "Hist2DMap.hh"
+
+#include <csignal>
+#include "DaqTaskMR.hh"
+
+DAQInterfaceMR::DAQInterfaceMR(std::string daq_name,
+                           unsigned houseKeeping_itervl_ms)
+: DAQInterface(daq_name, houseKeeping_itervl_ms)
+{
+
+}
+
+DAQInterfaceMR::~DAQInterfaceMR()
+{
+
+}
+
+void DAQInterfaceMR::setHist2DMap(std::shared_ptr<Hist2DMap>& map)
+{
+  std::lock_guard<std::mutex> guard(m_task_mutex);
+  m_hist_map = map;
+}
+
+
+bool DAQInterfaceMR::pushBackTask(uint8_t *data, size_t dsize)
+{
+  if(m_hist_map.get())
+  {
+    m_tasks.emplace_back( std::shared_ptr<DaqTask>( new DaqTaskMR(data, data+dsize, m_hist_map)));
+    return true;
+  }
+
+  return false;
+
+}
Index: src/DimRecv/libsrc/DaqTask.cc
===================================================================
--- src/DimRecv/libsrc/DaqTask.cc	(revision 7b26528fbac11df4731ef2fb1b41d6e31f7dd25e)
+++ src/DimRecv/libsrc/DaqTask.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -8,19 +8,6 @@
 #include "PMTParser.hh"
 
-DaqTask::DaqTask(uint8_t* begin, uint8_t* end, const std::shared_ptr<Hist2DMap>& map)
+DaqTask::DaqTask(uint8_t* begin, uint8_t* end)
 :m_data(begin, end), m_time_s(0), m_time_ms(0)
-, m_hist_map(std::shared_ptr<Hist2DMap>(map)), m_hist2d(nullptr)
-{
-
-}
-
-DaqTask::DaqTask(uint8_t* begin, uint8_t* end, const std::shared_ptr<NumpyHist2D>& hist)
-:m_data(begin, end), m_time_s(0), m_time_ms(0)
-, m_hist_map(nullptr), m_hist2d(std::shared_ptr<NumpyHist2D>(hist))
-{
-}
-
-DaqTask::DaqTask(uint8_t* begin, uint8_t* end)
-:m_data(begin, end), m_time_s(0), m_time_ms(0),m_hist_map(nullptr), m_hist2d(nullptr)
 {
 
@@ -47,114 +34,4 @@
 }
 
-uint64_t DaqTask::run()
-{
-  std::lock_guard<std::mutex> guard(m_run_mutex);
-
-  const uint8_t * abuf = m_data.data();
-  int event_cnt=0;
-  std::vector<Parser::HitInfo> hitinfo;
-
-  // if(!m_hist_map)
-  // {
-  //   EW_LOG_WARN("Histmap is not set in Daqtask");
-  //   return 0;
-  // }
-
-  if(m_hist2d.get())
-  {
-    double digit2us = 1./40;
-    auto *pmt = new Parser::PMTParser();
-
-    while(pmt->extractNextPackage(abuf, m_data.data()+m_data.size(), hitinfo))
-    {
-      event_cnt+=hitinfo.size();
-      for(auto v: hitinfo)
-      {
-        // unsigned pid = pmt->getPixelID((int)v.pos,  (int)v.posy, false);
-        // m_hist2d->fill( (int)(v.t/40), pid);
-
-         unsigned pid =  uint64_t(v.posy)/8*(111/2+1)+uint64_t(v.pos)/8;
-         m_hist2d->fill( (int)(v.t/40), pid );
-      }
-    }
-  }
-  else
-    return 0; //fixeme m_hist2d.get() can be nullptr, the next "else if" crashes code.
-  // else if(m_hist_map->getDetType()==Hist2DMap::DetectorType::kHe3)
-  // {
-  //   Parser::PackageHe3 he3(0.);
-  //
-  //   while(he3.extractNextPackage(abuf, m_data.data()+m_data.size(), hitinfo))
-  //   {
-  //     unsigned pkgevt = hitinfo.size();
-  //     event_cnt += pkgevt;
-  //
-  //     if(pkgevt){
-  //       if(m_hist_map)
-  //       {
-  //         for(auto const& hit:hitinfo)
-  //         {
-  //           m_hist_map->fill(hit.id, hit.t, hit.pos);
-  //         }
-  //       }
-  //     }
-  //   }
-  // }
-  // else if (m_hist_map->getDetType()==Hist2DMap::DetectorType::kMWPC)
-  // {
-  //   Parser::PackageMWPC mwpc(0., 10.);//chargeThre, timewindow
-  //
-  //   double invx=1/2.2;
-  //   double invy=1/4.0;
-  //
-  //   while(mwpc.extractNextPackage(abuf, m_data.data()+m_data.size(), hitinfo))
-  //   {
-  //     unsigned pkgevt = hitinfo.size();
-  //     event_cnt += pkgevt;
-  //
-  //     if(pkgevt){
-  //       if(m_hist_map)
-  //       {
-  //         for(auto const& hit:hitinfo)
-  //         {
-  //           int x = hit.pos*invx;
-  //           int y = hit.posy*invy;
-  //           // std::cout << x+y*92 << '\n';
-  //           m_hist_map->fill(1 , hit.t, x+y*92 );
-  //         }
-  //       }
-  //     }
-  //   }
-    // //FIXME: work around for single event package
-    // hitinfo.clear();
-    // mwpc.process(hitinfo);
-    // if(m_hist_map)
-    // {
-    //   for(auto const& hit:hitinfo)
-    //   {
-    //     int x = hit.pos*invx;
-    //     int y = hit.posy*invy;
-    //     // std::cout << x+y*92 << '\n';
-    //     m_hist_map->fill(1 , hit.t, x+y*92 );
-    //   }
-    // }
-  // }
-  // else
-  //   EW_LOG_CRITICAL("DaqTask::run Unsupported detector type");
-
-
-
-  // if(pkgevt)
-  // {
-  //   char fn[200];
-  //   sprintf(fn,"data/%d_%d.dat",m_time_s, m_time_ms);
-  //   FILE *datafile = fopen(fn, "wb");
-  //   fwrite (m_data.data() , sizeof(char), m_data.size(), datafile);
-  //   fclose(datafile);
-  //   // printf("%s, %d events\n", fn, event_cnt);
-  // }
-  uint64_t shiftedEvt = event_cnt*4294967296;  //shifting 32 bits to the higher order
-  return (uint64_t)m_data.size() +  shiftedEvt;
-}
 
 void DaqTask::setTime(int second, int ms)
@@ -169,16 +46,16 @@
 }
 
-// Move initialization
-DaqTask::DaqTask(DaqTask&& other) {
-  std::lock_guard<std::mutex> lock(other.m_run_mutex);
-  m_data = std::move(other.m_data);
-  m_future = std::move(other.m_future);
-  m_hist_map = std::move(other.m_hist_map);
-  m_hist2d = std::move(other.m_hist2d);
-  m_time_s = other.m_time_s;
-  m_time_ms = other.m_time_ms;
-  other.m_time_s = 0;
-  other.m_time_ms = 0;
-};
+// // Move initialization
+// DaqTask::DaqTask(DaqTask&& other) {
+//   std::lock_guard<std::mutex> lock(other.m_run_mutex);
+//   m_data = std::move(other.m_data);
+//   m_future = std::move(other.m_future);
+//   m_hist_map = std::move(other.m_hist_map);
+//   m_hist2d = std::move(other.m_hist2d);
+//   m_time_s = other.m_time_s;
+//   m_time_ms = other.m_time_ms;
+//   other.m_time_s = 0;
+//   other.m_time_ms = 0;
+// };
 
 // // Copy initialization
@@ -192,19 +69,19 @@
 // };
 
-// Move assignment
-DaqTask& DaqTask::operator = (DaqTask&& other) {
-  std::lock(m_run_mutex, other.m_run_mutex);
-  std::lock_guard<std::mutex> self_lock(m_run_mutex, std::adopt_lock);
-  std::lock_guard<std::mutex> other_lock(other.m_run_mutex, std::adopt_lock);
-  m_data = std::move(other.m_data);
-  m_future = std::move(other.m_future);
-  m_hist_map = std::move(other.m_hist_map);
-  m_hist2d = std::move(other.m_hist2d);
-  m_time_s = other.m_time_s;
-  m_time_ms = other.m_time_ms;
-  other.m_time_s = 0;
-  other.m_time_ms = 0;
-  return *this;
-};
+// // Move assignment
+// DaqTask& DaqTask::operator = (DaqTask&& other) {
+//   std::lock(m_run_mutex, other.m_run_mutex);
+//   std::lock_guard<std::mutex> self_lock(m_run_mutex, std::adopt_lock);
+//   std::lock_guard<std::mutex> other_lock(other.m_run_mutex, std::adopt_lock);
+//   m_data = std::move(other.m_data);
+//   m_future = std::move(other.m_future);
+//   m_hist_map = std::move(other.m_hist_map);
+//   m_hist2d = std::move(other.m_hist2d);
+//   m_time_s = other.m_time_s;
+//   m_time_ms = other.m_time_ms;
+//   other.m_time_s = 0;
+//   other.m_time_ms = 0;
+//   return *this;
+// };
 //
 // // Copy assignment
Index: src/DimRecv/libsrc/DaqTaskGPPD.cc
===================================================================
--- src/DimRecv/libsrc/DaqTaskGPPD.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ src/DimRecv/libsrc/DaqTaskGPPD.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -0,0 +1,49 @@
+#include "DaqTaskGPPD.hh"
+#include <thread>
+#include <chrono>
+#include <iostream>
+#include "PackageHe3.hh"
+#include "PackageMWPC.hh"
+#include "Earthworm.hh"
+#include "PMTParser.hh"
+
+DaqTaskGPPD::DaqTaskGPPD(uint8_t* begin, uint8_t* end, std::shared_ptr<NumpyHist2D>& m_hist2d)
+:DaqTask(begin,end), m_hist2d(m_hist2d)
+{
+}
+
+DaqTaskGPPD::~DaqTaskGPPD()
+{
+}
+
+uint64_t DaqTaskGPPD::run()
+{
+    std::lock_guard<std::mutex> guard(m_run_mutex);
+
+    const uint8_t * abuf = m_data.data();
+    int event_cnt=0;
+    std::vector<Parser::HitInfo> hitinfo;
+
+    if(m_hist2d.get())
+    {
+      double digit2us = 1./40;
+      auto *pmt = new Parser::PMTParser();
+
+      while(pmt->extractNextPackage(abuf, m_data.data()+m_data.size(), hitinfo))
+      {
+        event_cnt+=hitinfo.size();
+        for(auto v: hitinfo)
+        {
+          // unsigned pid = pmt->getPixelID((int)v.pos,  (int)v.posy, false);
+          // m_hist2d->fill( (int)(v.t/40), pid);
+
+           unsigned pid =  uint64_t(v.posy)/8*(111/2+1)+uint64_t(v.pos)/8;
+           m_hist2d->fill( (int)(v.t/40), pid );
+        }
+      }
+    }
+    else
+      return 0;
+    uint64_t shiftedEvt = event_cnt*4294967296;  //shifting 32 bits to the higher order
+    return (uint64_t)m_data.size() +  shiftedEvt;
+}
Index: src/DimRecv/libsrc/DaqTaskMR.cc
===================================================================
--- src/DimRecv/libsrc/DaqTaskMR.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ src/DimRecv/libsrc/DaqTaskMR.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -0,0 +1,96 @@
+#include "DaqTaskMR.hh"
+#include <thread>
+#include <chrono>
+#include <iostream>
+#include "PackageHe3.hh"
+#include "PackageMWPC.hh"
+#include "Earthworm.hh"
+#include "PMTParser.hh"
+
+DaqTaskMR::DaqTaskMR(uint8_t* begin, uint8_t* end, std::shared_ptr<Hist2DMap>& histmap)
+:DaqTask(begin,end), m_hist_map(histmap)
+{
+}
+
+DaqTaskMR::~DaqTaskMR()
+{
+}
+
+uint64_t DaqTaskMR::run()
+{
+    std::lock_guard<std::mutex> guard(m_run_mutex);
+
+    const uint8_t * abuf = m_data.data();
+    int event_cnt=0;
+    std::vector<Parser::HitInfo> hitinfo;
+
+    if(!m_hist_map.get())
+    {
+      EW_LOG_WARN("Histmap is not set in Daqtask");
+      return 0;
+    }
+    else if(m_hist_map->getDetType()==Hist2DMap::DetectorType::kHe3)
+    {
+      Parser::PackageHe3 he3(0.);
+
+      while(he3.extractNextPackage(abuf, m_data.data()+m_data.size(), hitinfo))
+      {
+        unsigned pkgevt = hitinfo.size();
+        event_cnt += pkgevt;
+
+        if(pkgevt){
+          if(m_hist_map)
+          {
+            for(auto const& hit:hitinfo)
+            {
+              m_hist_map->fill(hit.id, hit.t, hit.pos);
+            }
+          }
+        }
+      }
+    }
+    else if (m_hist_map->getDetType()==Hist2DMap::DetectorType::kMWPC)
+    {
+      Parser::PackageMWPC mwpc(0., 10.);//chargeThre, timewindow
+
+      double invx=1/2.2;
+      double invy=1/4.0;
+
+      while(mwpc.extractNextPackage(abuf, m_data.data()+m_data.size(), hitinfo))
+      {
+        unsigned pkgevt = hitinfo.size();
+        event_cnt += pkgevt;
+
+        if(pkgevt){
+          if(m_hist_map)
+          {
+            for(auto const& hit:hitinfo)
+            {
+              int x = hit.pos*invx;
+              int y = hit.posy*invy;
+              // std::cout << x+y*92 << '\n';
+              m_hist_map->fill(1 , hit.t, x+y*92 );
+            }
+          }
+        }
+      }
+      //FIXME: work around for single event package
+      hitinfo.clear();
+      mwpc.process(hitinfo);
+      if(m_hist_map)
+      {
+        for(auto const& hit:hitinfo)
+        {
+          int x = hit.pos*invx;
+          int y = hit.posy*invy;
+          // std::cout << x+y*92 << '\n';
+          m_hist_map->fill(1 , hit.t, x+y*92 );
+        }
+      }
+    }
+    else
+      EW_LOG_CRITICAL("DaqTask::run Unsupported detector type");
+
+    uint64_t shiftedEvt = event_cnt*4294967296;  //shifting 32 bits to the higher order
+    return (uint64_t)m_data.size() +  shiftedEvt;
+}
Index: src/RedisIO/libinc/Action_GPPD.hh
===================================================================
--- src/RedisIO/libinc/Action_GPPD.hh	(revision dba814a9360c8c22cc26cec31ebb0daddbc4d95d)
+++ src/RedisIO/libinc/Action_GPPD.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -2,5 +2,5 @@
 #define Action_GPPD_hh
 
-#include "DAQInterface.hh"
+#include "DAQInterfaceGPPD.hh"
 #include "NumpyHist2D.hh"
 #include "RedisIO.hh"
@@ -8,5 +8,5 @@
 #include "MyStateMachine.hh"
 #include "Action.hh"
-
+class DAQInterfaceGPPD;
 class Action_GPPD : public Action {
 public:
@@ -39,5 +39,5 @@
 	std::shared_ptr<NumpyHist2D> m_hist;
 	MyStateMachine *m_sMachine;
-	DAQInterface *m_active_daq;
+	DAQInterfaceGPPD *m_active_daq;
   nlohmann::json m_allPath;
 	std::chrono::time_point<std::chrono::steady_clock>  m_startTime;
Index: src/RedisIO/libinc/Action_MR.hh
===================================================================
--- src/RedisIO/libinc/Action_MR.hh	(revision 888eaabd49d27284883a1872492904c5ccb3e45c)
+++ src/RedisIO/libinc/Action_MR.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -2,5 +2,5 @@
 #define Action_MR_hh
 
-#include "DAQInterface.hh"
+#include "DAQInterfaceMR.hh"
 #include "Hist2DMap.hh"
 #include "RedisIO.hh"
@@ -37,7 +37,7 @@
 	std::shared_ptr<Hist2DMap> m_histmap;
 	MyStateMachine *m_sMachine;
-	DAQInterface *m_daq_he3;
-	DAQInterface *m_daq_mwpc;
-	DAQInterface *m_active_daq;
+	DAQInterfaceMR *m_daq_he3;
+	DAQInterfaceMR *m_daq_mwpc;
+	DAQInterfaceMR *m_active_daq;
   nlohmann::json m_allPath;
 	std::chrono::time_point<std::chrono::steady_clock>  m_startTime;
Index: src/RedisIO/libsrc/Action_GPPD.cc
===================================================================
--- src/RedisIO/libsrc/Action_GPPD.cc	(revision 5072813b5b498759626eaa6c088230df8ccd7d7e)
+++ src/RedisIO/libsrc/Action_GPPD.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -24,5 +24,5 @@
   f.close();
 
-  m_active_daq = new DAQInterface(m_allPath[m_module]["dimserver"],1000);
+  m_active_daq = new DAQInterfaceGPPD(m_allPath[m_module]["dimserver"],1000);
 }
 
Index: src/RedisIO/libsrc/Action_MR.cc
===================================================================
--- src/RedisIO/libsrc/Action_MR.cc	(revision 888eaabd49d27284883a1872492904c5ccb3e45c)
+++ src/RedisIO/libsrc/Action_MR.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
@@ -25,6 +25,6 @@
   f.close();
 
-  m_daq_he3 =	new DAQInterface(m_allPath["dimserverHe3"],1000);
-	m_daq_mwpc =	new DAQInterface(m_allPath["dimserverMWPC"],1000);
+  m_daq_he3 =	new DAQInterfaceMR(m_allPath["dimserverHe3"],1000);
+	m_daq_mwpc =	new DAQInterfaceMR(m_allPath["dimserverMWPC"],1000);
 }
 
