From d46dc0b4d29e262d1c7eaace85288cb0b7ead104 Mon Sep 17 00:00:00 2001
From: lintao <lintao51@gmail.com>
Date: Sun, 8 Sep 2019 10:28:07 +0800
Subject: [PATCH] WIP: add a converter tool.

---
 FWCore/CMakeLists.txt                         |  2 +-
 Simulation/DetSimCore/CMakeLists.txt          |  5 +++--
 .../DetSimInterface/IG4PrimaryCnvTool.h       | 22 +++++++++++++++++++
 3 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100644 Simulation/DetSimInterface/DetSimInterface/IG4PrimaryCnvTool.h

diff --git a/FWCore/CMakeLists.txt b/FWCore/CMakeLists.txt
index 07f309c5..0540c5e3 100644
--- a/FWCore/CMakeLists.txt
+++ b/FWCore/CMakeLists.txt
@@ -8,7 +8,7 @@ find_package(ROOT COMPONENTS RIO Tree)
 
 # this declaration will not be needed in the future
 gaudi_depends_on_subdirs(GaudiAlg GaudiKernel)
-gaudi_install_scripts()
+# gaudi_install_scripts()
 gaudi_install_python_modules()
 
 gaudi_add_library(FWCore
diff --git a/Simulation/DetSimCore/CMakeLists.txt b/Simulation/DetSimCore/CMakeLists.txt
index c222800f..e25301fa 100644
--- a/Simulation/DetSimCore/CMakeLists.txt
+++ b/Simulation/DetSimCore/CMakeLists.txt
@@ -7,6 +7,7 @@ gaudi_depends_on_subdirs(
 
 find_package(Geant4 REQUIRED ui_all vis_all)
 include(${Geant4_USE_FILE})
+find_package(plcio)
 
 set(DetSimCore_srcs
     src/DetSimAlg.cpp
@@ -21,6 +22,6 @@ set(DetSimCore_srcs
 )
 
 gaudi_add_module(DetSimCore ${DetSimCore_srcs}
-    INCLUDE_DIRS DetSimInterface GaudiKernel Geant4
-    LINK_LIBRARIES DetSimInterface GaudiKernel Geant4
+    INCLUDE_DIRS DetSimInterface GaudiKernel Geant4 plcio
+    LINK_LIBRARIES DetSimInterface GaudiKernel Geant4 plcio
 )
diff --git a/Simulation/DetSimInterface/DetSimInterface/IG4PrimaryCnvTool.h b/Simulation/DetSimInterface/DetSimInterface/IG4PrimaryCnvTool.h
new file mode 100644
index 00000000..83caf9d5
--- /dev/null
+++ b/Simulation/DetSimInterface/DetSimInterface/IG4PrimaryCnvTool.h
@@ -0,0 +1,22 @@
+#ifndef IG4PrimaryCnvTool_h
+#define IG4PrimaryCnvTool_h
+
+// IG4PrimaryCnvTool:
+//     convert an event in other formats to an event in G4 format.
+// The G4Event object is managed by Geant4.
+
+#include "GaudiKernel/AlgTool.h"
+
+class G4Event;
+
+class IG4PrimaryCnvTool: virtual public IAlgTool {
+public:
+
+    DeclareInterfaceID(IG4PrimaryCnvTool, 0, 1);
+
+    virtual ~IG4PrimaryCnvTool() {};
+
+    virtual mutate(G4Event* anEvent) = 0;
+};
+
+#endif
-- 
GitLab