Index: bin/earthworm_gppd.cc
===================================================================
--- bin/earthworm_gppd.cc	(revision ac761e4de7a74e93dcdc02aa23bc26bb2e04a6aa)
+++ bin/earthworm_gppd.cc	(revision 56fbab7513306ef24e192695a5dd7704b8e1871b)
@@ -17,5 +17,5 @@
 #include "MyStateMachine.hh"
 
-#include "Action_GPPD.hh"
+#include "Action_PMT.hh"
 
 int main(int argc, char *argv[])
@@ -31,18 +31,18 @@
 	RedisIO *redis = new RedisIO("10.1.33.141", 9001, "neonmaster", "sanlie;123");
 	MyStateMachine *sMachine = new MyStateMachine();
-  Action_GPPD *action = new Action_GPPD(redis, sMachine, argv[1]);
+  Action_PMT *action = new Action_PMT(redis, sMachine, argv[1]);
 
-	sMachine->grantStateTransit(State::kUnconfigured, State::kReady, Command::kConfigure, std::bind( &Action_GPPD::configure, action), "configure");
-  sMachine->grantStateTransit(State::kReady, State::kUnconfigured, Command::kUnconfigure, std::bind( &Action_GPPD::unconfigure, action), "unconfigure");
-	sMachine->grantStateTransit(State::kReady, State::kUnconfigured, Command::kAbort, std::bind( &Action_GPPD::unconfigure, action), "unconfigure");
+	sMachine->grantStateTransit(State::kUnconfigured, State::kReady, Command::kConfigure, std::bind( &Action_PMT::configure, action), "configure");
+  sMachine->grantStateTransit(State::kReady, State::kUnconfigured, Command::kUnconfigure, std::bind( &Action_PMT::unconfigure, action), "unconfigure");
+	sMachine->grantStateTransit(State::kReady, State::kUnconfigured, Command::kAbort, std::bind( &Action_PMT::unconfigure, action), "unconfigure");
 
-  sMachine->grantStateTransit(State::kReady, State::kRunning, Command::kStart, std::bind( &Action_GPPD::start, action), "start");
-  sMachine->grantStateTransit(State::kRunning, State::kReady, Command::kStop, std::bind( &Action_GPPD::pauseStop, action), "pauseStop");
-  sMachine->grantStateTransit(State::kRunning, State::kPaused, Command::kPause, std::bind( &Action_GPPD::pauseStop, action), "pauseStop");
-  sMachine->grantStateTransit(State::kPaused, State::kRunning, Command::kResume, std::bind( &Action_GPPD::resume, action), "resume");
-  sMachine->grantStateTransit(State::kRunning, State::kUnconfigured, Command::kAbort, std::bind( &Action_GPPD::unconfigure, action), "unconfigure");
-  sMachine->grantStateTransit(State::kPaused, State::kUnconfigured, Command::kAbort, std::bind( &Action_GPPD::unconfigure, action), "unconfigure");
-	sMachine->grantStateTransit(State::kRunning, State::kRunning, Command::kStart, std::bind( &Action_GPPD::keepRunning, action), "keepRunning");
-	sMachine->grantGlobalTransitTo(State::kError, Command::kKill, std::bind( &Action_GPPD::kill, action), "kill");
+  sMachine->grantStateTransit(State::kReady, State::kRunning, Command::kStart, std::bind( &Action_PMT::start, action), "start");
+  sMachine->grantStateTransit(State::kRunning, State::kReady, Command::kStop, std::bind( &Action_PMT::pauseStop, action), "pauseStop");
+  sMachine->grantStateTransit(State::kRunning, State::kPaused, Command::kPause, std::bind( &Action_PMT::pauseStop, action), "pauseStop");
+  sMachine->grantStateTransit(State::kPaused, State::kRunning, Command::kResume, std::bind( &Action_PMT::resume, action), "resume");
+  sMachine->grantStateTransit(State::kRunning, State::kUnconfigured, Command::kAbort, std::bind( &Action_PMT::unconfigure, action), "unconfigure");
+  sMachine->grantStateTransit(State::kPaused, State::kUnconfigured, Command::kAbort, std::bind( &Action_PMT::unconfigure, action), "unconfigure");
+	sMachine->grantStateTransit(State::kRunning, State::kRunning, Command::kStart, std::bind( &Action_PMT::keepRunning, action), "keepRunning");
+	sMachine->grantGlobalTransitTo(State::kError, Command::kKill, std::bind( &Action_PMT::kill, action), "kill");
 
   sMachine->selfDiagnosis();
Index: c/RedisIO/libinc/Action_GPPD.hh
===================================================================
--- src/RedisIO/libinc/Action_GPPD.hh	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ 	(revision )
@@ -1,48 +1,0 @@
-#ifndef Action_GPPD_hh
-#define Action_GPPD_hh
-
-#include "DAQInterfaceGPPD.hh"
-#include "NumpyHist2D.hh"
-#include "RedisIO.hh"
-#include "RedisNumpy.hh"
-#include "MyStateMachine.hh"
-#include "Action.hh"
-class DAQInterfaceGPPD;
-class Action_GPPD : public Action {
-public:
-	Action_GPPD(RedisIO *redis, MyStateMachine *sMachine, std::string module);
-	virtual ~Action_GPPD();
-
-	int getServerPid() {return m_active_daq->getServerPid(); }
-
-	bool configure();
-	//Stop running and clear any runtime determined parameter
-  bool unconfigure();
-  //Start accumulate data, RESET AGAIN HERE
-	bool start();
-	//Paused fill histogram, still receive but unprocess dim datastream
-	bool pauseStop();
-  //Back to unconfigure state
-	bool abort();
-  //Restart running;
-	bool resume();
-  //received kill command. Set m_kill so breakLoop can break external loops
-	bool kill();
-	bool keepRunning();
-
-  void sendHeartbeat(bool stateAsStr=false);
-  bool update();
-
-//private:
-
-	Hist2DMap::DetectorType m_detType;
-	std::shared_ptr<NumpyHist2D> m_hist;
-	MyStateMachine *m_sMachine;
-	DAQInterfaceGPPD *m_active_daq;
-  nlohmann::json m_allPath;
-	std::chrono::time_point<std::chrono::steady_clock>  m_startTime;
-	std::string m_module;
-};
-
-
-#endif
Index: src/RedisIO/libinc/Action_PMT.hh
===================================================================
--- src/RedisIO/libinc/Action_PMT.hh	(revision 56fbab7513306ef24e192695a5dd7704b8e1871b)
+++ src/RedisIO/libinc/Action_PMT.hh	(revision 56fbab7513306ef24e192695a5dd7704b8e1871b)
@@ -0,0 +1,48 @@
+#ifndef Action_PMT_hh
+#define Action_PMT_hh
+
+#include "DAQInterfaceGPPD.hh"
+#include "NumpyHist2D.hh"
+#include "RedisIO.hh"
+#include "RedisNumpy.hh"
+#include "MyStateMachine.hh"
+#include "Action.hh"
+class DAQInterfaceGPPD;
+class Action_PMT : public Action {
+public:
+	Action_PMT(RedisIO *redis, MyStateMachine *sMachine, std::string module);
+	virtual ~Action_PMT();
+
+	int getServerPid() {return m_active_daq->getServerPid(); }
+
+	bool configure();
+	//Stop running and clear any runtime determined parameter
+  bool unconfigure();
+  //Start accumulate data, RESET AGAIN HERE
+	bool start();
+	//Paused fill histogram, still receive but unprocess dim datastream
+	bool pauseStop();
+  //Back to unconfigure state
+	bool abort();
+  //Restart running;
+	bool resume();
+  //received kill command. Set m_kill so breakLoop can break external loops
+	bool kill();
+	bool keepRunning();
+
+  void sendHeartbeat(bool stateAsStr=false);
+  bool update();
+
+//private:
+
+	Hist2DMap::DetectorType m_detType;
+	std::shared_ptr<NumpyHist2D> m_hist;
+	MyStateMachine *m_sMachine;
+	DAQInterfaceGPPD *m_active_daq;
+  nlohmann::json m_allPath;
+	std::chrono::time_point<std::chrono::steady_clock>  m_startTime;
+	std::string m_module;
+};
+
+
+#endif
Index: c/RedisIO/libsrc/Action_GPPD.cc
===================================================================
--- src/RedisIO/libsrc/Action_GPPD.cc	(revision 4b6e6dbc109d98dc81472e81935e1449e2073c66)
+++ 	(revision )
@@ -1,196 +1,0 @@
-
-#include <dic.hxx>
-#include <iostream>
-#include <vector>
-#include <string>
-#include <fstream>
-#include <memory>
-#include <chrono>
-#include <future>
-#include <nlohmann/json.hpp>
-
-#include "Action_GPPD.hh"
-#include "Earthworm.hh"
-
-
-Action_GPPD::Action_GPPD(RedisIO *redis, MyStateMachine *sMachine, std::string module)
-: Action(redis),  m_detType(Hist2DMap::DetectorType::kUnknown),
-  m_hist( nullptr),
-	m_sMachine(sMachine), m_active_daq(nullptr), m_module(module)
-{
-  std::ifstream f("../allPathGPPD.json");
-  m_allPath.clear();
-  f >> m_allPath;
-  f.close();
-
-  m_active_daq = new DAQInterfaceGPPD(m_allPath[m_module]["dimserver"],1000);
-}
-
-Action_GPPD::~Action_GPPD()
-{
-	delete m_active_daq;
-
-	EW_LOG_INFO("~Action_GPPD ref count of hist is {}", m_hist.use_count());
-	m_hist.reset();
-}
-
-bool Action_GPPD::configure()
-{
-	//fixme: update m_allPath fisrt !!!!!
-
-	std::ifstream f("../allPathGPPD.json");
-	m_allPath.clear();
-	f >> m_allPath;
-  f.close();
-
-  //construct histogram add couple with daq
-  unsigned pid_num(1344), tof_num(2500);
-	m_hist.reset(new NumpyHist2D ( tof_num, 0., tof_num*16, pid_num, 0.-0.5, pid_num-0.5));
-
-  m_active_daq->setHist2D(m_hist);
-
-  //send pid
-	std::vector<unsigned> pid;
-	for(unsigned i=0;i<pid_num;i++)
-		pid.push_back(i+1230001);
-	RedisNumpy nvt;
-	std::string pidstr;
-	std::vector<uint64_t> shape;
-	shape.push_back(pid_num);
-	nvt.makeNumpyArr(pid, RedisNumpy::data_type::i4,
-									 shape, pidstr);
-	m_redis->writeString(m_allPath[m_module]["rawDataPixel"], pidstr);
-
-  //send tof id
-	std::vector<unsigned> tof;
-	for(unsigned i=0;i<tof_num+1;i++)
-	{
-		tof.push_back(i*16);
-	}
-	std::string tofstr;
-	shape[0]=(tof_num+1);
-	nvt.makeNumpyArr(tof, RedisNumpy::data_type::i4,
-									 shape, tofstr);
-	m_redis->writeString(m_allPath[m_module]["rawDataTof"], tofstr);
-
-  //send empty hist
-  std::string redisDataStr;
-  m_hist->serialise(redisDataStr);
-  m_redis->writeString(m_allPath[m_module]["rawDataHist"], redisDataStr);
-
-	m_hist->reset();
-  m_active_daq->reset();
-
-	EW_LOG_INFO("configure:: Configuration completed. ");
-	return true;
-}
-
-//Stop running and clear any runtime determined parameter
-bool Action_GPPD::unconfigure()
-{
-	m_active_daq->setActive(false);
-	EW_LOG_INFO("unconfigure:: Earthworm unconfigured.");
-	return true;
-}
-
-//Start accumulate data, RESET AGAIN HERE
-bool Action_GPPD::start()
-{
-  m_hist->reset();
-  std::string redisDataStr;
-  m_hist->serialise(redisDataStr);
-  m_redis->writeString(m_allPath[m_module]["rawDataHist"], redisDataStr);
-
-	m_active_daq->setActive(false);
-	m_active_daq->setActive(true);
-  m_active_daq->reset();
-
-	m_startTime = std::chrono::steady_clock::now();
-  EW_LOG_INFO("start:: Run started.");
-
-	return true;
-}
-
-//Paused fill histogram, still receive but unprocess dim datastream
-bool Action_GPPD::pauseStop()
-{
-	m_active_daq->setActive(false);
-	EW_LOG_INFO("pauseStop:: kPause or kStop.");
-	return true;
-}
-
-bool Action_GPPD::abort()
-{
-	m_active_daq->setActive(false);
-	EW_LOG_INFO("abort:: aborting");
-	return true;
-}
-
-//Restart running
-bool Action_GPPD::resume()
-{
-	m_active_daq->setActive(true);
-	EW_LOG_INFO("resume:: kResume.");
-	return true;
-}
-
-bool Action_GPPD::kill()
-{
-	if(m_active_daq)
-		m_active_daq->setActive(false);
-	m_kill=true;
-	return true;
-}
-
-
-void Action_GPPD::sendHeartbeat(bool stateAsStr)
-{
-  nlohmann::json j;
-  j["pid"] =std::to_string(m_proID);
-	if(stateAsStr)
-	  j["status"] = m_sMachine->printState();
-  else
-		j["status"] = std::to_string(m_sMachine->getState());
-
-  std::time_t t = std::time(nullptr);
-  char mbstr[100];
-  if (std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%dT%H:%M:%S.%03d+08:00", std::localtime(&t))) {
-  }
-
-  j["timestamp"] = std::string (mbstr);
-  std::string hb= j.dump();
-	// std::cout << "Heartbeart " << hb  << '\n';
-
-  m_redis->writeString(m_allPath[m_module]["hbEarthworm"],hb);
-
-  if(m_active_daq)
-    m_redis->writeString(m_allPath[m_module]["pulstCnt"],std::to_string(m_active_daq->getDataFlow().num_dim_trigger));
-
-}
-
-bool Action_GPPD::update()
-{
-	std::string str = m_redis->readString(m_allPath["ctrlEarthworm"]);
-  return m_sMachine->transit(atoi(str.c_str()));
-}
-
-bool Action_GPPD::keepRunning()
-{
-	std::string redisDataStr;
-	double totcnt = m_hist->getIntegral();
-	double cnt_rate=0.;
-	if(totcnt)
-  {
-		cnt_rate=totcnt/std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - m_startTime).count()*1000;
-		EW_LOG_INFO("keepRunning:: Data integral {}, rate is {} event/s", totcnt,
-							cnt_rate);
-  }
-	else
-		EW_LOG_INFO("keepRunning:: Data integral is 0");
-
-	m_redis->writeString(m_allPath[m_module]["DetCnt"], std::to_string((int) m_hist->getIntegral()) );
-	m_redis->writeString(m_allPath[m_module]["DetCntRate"], std::to_string(cnt_rate) );
-  m_hist->serialise(redisDataStr);
-  m_redis->writeString(m_allPath[m_module]["rawDataHist"], redisDataStr);
-	return true;
-}
Index: src/RedisIO/libsrc/Action_PMT.cc
===================================================================
--- src/RedisIO/libsrc/Action_PMT.cc	(revision 56fbab7513306ef24e192695a5dd7704b8e1871b)
+++ src/RedisIO/libsrc/Action_PMT.cc	(revision 56fbab7513306ef24e192695a5dd7704b8e1871b)
@@ -0,0 +1,196 @@
+
+#include <dic.hxx>
+#include <iostream>
+#include <vector>
+#include <string>
+#include <fstream>
+#include <memory>
+#include <chrono>
+#include <future>
+#include <nlohmann/json.hpp>
+
+#include "Action_PMT.hh"
+#include "Earthworm.hh"
+
+
+Action_PMT::Action_PMT(RedisIO *redis, MyStateMachine *sMachine, std::string module)
+: Action(redis),  m_detType(Hist2DMap::DetectorType::kUnknown),
+  m_hist( nullptr),
+	m_sMachine(sMachine), m_active_daq(nullptr), m_module(module)
+{
+  std::ifstream f("../allPathGPPD.json");
+  m_allPath.clear();
+  f >> m_allPath;
+  f.close();
+
+  m_active_daq = new DAQInterfaceGPPD(m_allPath[m_module]["dimserver"],1000);
+}
+
+Action_PMT::~Action_PMT()
+{
+	delete m_active_daq;
+
+	EW_LOG_INFO("~Action_PMT ref count of hist is {}", m_hist.use_count());
+	m_hist.reset();
+}
+
+bool Action_PMT::configure()
+{
+	//fixme: update m_allPath fisrt !!!!!
+
+	std::ifstream f("../allPathGPPD.json");
+	m_allPath.clear();
+	f >> m_allPath;
+  f.close();
+
+  //construct histogram add couple with daq
+  unsigned pid_num(1344), tof_num(2500);
+	m_hist.reset(new NumpyHist2D ( tof_num, 0., tof_num*16, pid_num, 0.-0.5, pid_num-0.5));
+
+  m_active_daq->setHist2D(m_hist);
+
+  //send pid
+	std::vector<unsigned> pid;
+	for(unsigned i=0;i<pid_num;i++)
+		pid.push_back(i+1230001);
+	RedisNumpy nvt;
+	std::string pidstr;
+	std::vector<uint64_t> shape;
+	shape.push_back(pid_num);
+	nvt.makeNumpyArr(pid, RedisNumpy::data_type::i4,
+									 shape, pidstr);
+	m_redis->writeString(m_allPath[m_module]["rawDataPixel"], pidstr);
+
+  //send tof id
+	std::vector<unsigned> tof;
+	for(unsigned i=0;i<tof_num+1;i++)
+	{
+		tof.push_back(i*16);
+	}
+	std::string tofstr;
+	shape[0]=(tof_num+1);
+	nvt.makeNumpyArr(tof, RedisNumpy::data_type::i4,
+									 shape, tofstr);
+	m_redis->writeString(m_allPath[m_module]["rawDataTof"], tofstr);
+
+  //send empty hist
+  std::string redisDataStr;
+  m_hist->serialise(redisDataStr);
+  m_redis->writeString(m_allPath[m_module]["rawDataHist"], redisDataStr);
+
+	m_hist->reset();
+  m_active_daq->reset();
+
+	EW_LOG_INFO("configure:: Configuration completed. ");
+	return true;
+}
+
+//Stop running and clear any runtime determined parameter
+bool Action_PMT::unconfigure()
+{
+	m_active_daq->setActive(false);
+	EW_LOG_INFO("unconfigure:: Earthworm unconfigured.");
+	return true;
+}
+
+//Start accumulate data, RESET AGAIN HERE
+bool Action_PMT::start()
+{
+  m_hist->reset();
+  std::string redisDataStr;
+  m_hist->serialise(redisDataStr);
+  m_redis->writeString(m_allPath[m_module]["rawDataHist"], redisDataStr);
+
+	m_active_daq->setActive(false);
+	m_active_daq->setActive(true);
+  m_active_daq->reset();
+
+	m_startTime = std::chrono::steady_clock::now();
+  EW_LOG_INFO("start:: Run started.");
+
+	return true;
+}
+
+//Paused fill histogram, still receive but unprocess dim datastream
+bool Action_PMT::pauseStop()
+{
+	m_active_daq->setActive(false);
+	EW_LOG_INFO("pauseStop:: kPause or kStop.");
+	return true;
+}
+
+bool Action_PMT::abort()
+{
+	m_active_daq->setActive(false);
+	EW_LOG_INFO("abort:: aborting");
+	return true;
+}
+
+//Restart running
+bool Action_PMT::resume()
+{
+	m_active_daq->setActive(true);
+	EW_LOG_INFO("resume:: kResume.");
+	return true;
+}
+
+bool Action_PMT::kill()
+{
+	if(m_active_daq)
+		m_active_daq->setActive(false);
+	m_kill=true;
+	return true;
+}
+
+
+void Action_PMT::sendHeartbeat(bool stateAsStr)
+{
+  nlohmann::json j;
+  j["pid"] =std::to_string(m_proID);
+	if(stateAsStr)
+	  j["status"] = m_sMachine->printState();
+  else
+		j["status"] = std::to_string(m_sMachine->getState());
+
+  std::time_t t = std::time(nullptr);
+  char mbstr[100];
+  if (std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%dT%H:%M:%S.%03d+08:00", std::localtime(&t))) {
+  }
+
+  j["timestamp"] = std::string (mbstr);
+  std::string hb= j.dump();
+	// std::cout << "Heartbeart " << hb  << '\n';
+
+  m_redis->writeString(m_allPath[m_module]["hbEarthworm"],hb);
+
+  if(m_active_daq)
+    m_redis->writeString(m_allPath[m_module]["pulstCnt"],std::to_string(m_active_daq->getDataFlow().num_dim_trigger));
+
+}
+
+bool Action_PMT::update()
+{
+	std::string str = m_redis->readString(m_allPath["ctrlEarthworm"]);
+  return m_sMachine->transit(atoi(str.c_str()));
+}
+
+bool Action_PMT::keepRunning()
+{
+	std::string redisDataStr;
+	double totcnt = m_hist->getIntegral();
+	double cnt_rate=0.;
+	if(totcnt)
+  {
+		cnt_rate=totcnt/std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - m_startTime).count()*1000;
+		EW_LOG_INFO("keepRunning:: Data integral {}, rate is {} event/s", totcnt,
+							cnt_rate);
+  }
+	else
+		EW_LOG_INFO("keepRunning:: Data integral is 0");
+
+	m_redis->writeString(m_allPath[m_module]["DetCnt"], std::to_string((int) m_hist->getIntegral()) );
+	m_redis->writeString(m_allPath[m_module]["DetCntRate"], std::to_string(cnt_rate) );
+  m_hist->serialise(redisDataStr);
+  m_redis->writeString(m_allPath[m_module]["rawDataHist"], redisDataStr);
+	return true;
+}
