From 8ab8c3478bc99baa1fc388caef4e210bcdad6eaf Mon Sep 17 00:00:00 2001
From: Markus Frank <markus.frank@cern.ch>
Date: Fri, 25 Apr 2014 08:07:51 +0000
Subject: [PATCH] Please see doc/release.notes for changes

---
 DDG4/CMakeLists.txt                         |  14 +-
 DDG4/include/DDG4/ComponentProperties.h     |  23 +-
 DDG4/include/DDG4/ComponentProperties_inl.h | 135 +---
 DDG4/include/DDG4/ComponentUtils.h          |  81 +--
 DDG4/include/DDG4/Geant4Callback.h          | 361 +---------
 DDG4/include/DDG4/Geant4Converter.h         |   1 +
 DDG4/include/DDG4/Geant4DataConversion.h    |   6 +-
 DDG4/include/DDG4/Geant4GeometryInfo.h      |   5 +-
 DDG4/include/DDG4/Geant4Mapping.h           |   3 +-
 DDG4/include/DDG4/Parsers.h                 | 689 --------------------
 DDG4/include/DDG4/ToStream.h                | 302 ---------
 DDG4/parsers/Grammars.h                     | 530 ---------------
 DDG4/parsers/GrammarsV2.h                   | 471 -------------
 DDG4/parsers/Parsers.icpp                   | 232 -------
 DDG4/parsers/ParsersFactory.h               |  53 --
 DDG4/parsers/ParsersObjects.cpp             |  84 ---
 DDG4/parsers/ParsersStandardList1.cpp       |   5 -
 DDG4/parsers/ParsersStandardList2.cpp       |   5 -
 DDG4/parsers/ParsersStandardList3.cpp       |   5 -
 DDG4/parsers/ParsersStandardList4.cpp       |   5 -
 DDG4/parsers/ParsersStandardListCommon.h    |  18 -
 DDG4/parsers/ParsersStandardMisc1.cpp       |  21 -
 DDG4/parsers/ParsersStandardMisc2.cpp       |  17 -
 DDG4/parsers/ParsersStandardMisc3.cpp       |  17 -
 DDG4/parsers/ParsersStandardMisc4.cpp       |  13 -
 DDG4/parsers/ParsersStandardMisc5.cpp       |  24 -
 DDG4/parsers/ParsersStandardMiscCommon.h    |   9 -
 DDG4/parsers/ParsersStandardSingle.cpp      |  26 -
 DDG4/python/DDG4Dict.C                      |   8 +
 DDG4/src/ComponentProperties.cpp            | 214 ++----
 DDG4/src/ComponentUtils.cpp                 | 278 --------
 DDG4/src/Geant4Action.cpp                   |   4 +-
 DDG4/src/Geant4Callback.cpp                 |  21 -
 DDG4/src/Geant4Converter.cpp                | 276 +++++---
 DDG4/src/Geant4Handle.cpp                   |  10 +-
 DDG4/src/Geant4HierarchyDump.cpp            |   2 +-
 DDG4/src/Geant4Kernel.cpp                   |   4 +-
 DDG4/src/Geant4Output2ROOT.cpp              |   2 +-
 DDG4/src/Geant4SensDetAction.cpp            |   2 +-
 DDG4/src/Geant4UIManager.cpp                |   7 +-
 DDG4/src/ToStream.cpp                       |  89 ---
 41 files changed, 295 insertions(+), 3777 deletions(-)
 delete mode 100644 DDG4/include/DDG4/Parsers.h
 delete mode 100644 DDG4/include/DDG4/ToStream.h
 delete mode 100644 DDG4/parsers/Grammars.h
 delete mode 100644 DDG4/parsers/GrammarsV2.h
 delete mode 100644 DDG4/parsers/Parsers.icpp
 delete mode 100644 DDG4/parsers/ParsersFactory.h
 delete mode 100644 DDG4/parsers/ParsersObjects.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardList1.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardList2.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardList3.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardList4.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardListCommon.h
 delete mode 100644 DDG4/parsers/ParsersStandardMisc1.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardMisc2.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardMisc3.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardMisc4.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardMisc5.cpp
 delete mode 100644 DDG4/parsers/ParsersStandardMiscCommon.h
 delete mode 100644 DDG4/parsers/ParsersStandardSingle.cpp
 delete mode 100644 DDG4/src/ComponentUtils.cpp
 delete mode 100644 DDG4/src/Geant4Callback.cpp
 delete mode 100644 DDG4/src/ToStream.cpp

diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt
index 8adabae3d..5ffa70d7c 100644
--- a/DDG4/CMakeLists.txt
+++ b/DDG4/CMakeLists.txt
@@ -20,19 +20,17 @@ include_directories(${CMAKE_SOURCE_DIR}/DDCore/include
 
 #---Add Library-------------------------------------------------------------------
 if(DD4HEP_USE_BOOST)
- #fg:  canonical way of finding Boost w/ cmake uses 
- #     -D Boost_DIR=_path_to_boost
- #     and then FindBoost.cmake sets the variable Boost_INCLUDE_DIR
+  #fg:  canonical way of finding Boost w/ cmake uses 
+  #     -D Boost_DIR=_path_to_boost
+  #     and then FindBoost.cmake sets the variable Boost_INCLUDE_DIR
   FIND_PACKAGE( Boost REQUIRED) 
   include_directories( ${Boost_INCLUDE_DIR})
   #list(APPEND include_directories ${BOOST_INCLUDE_DIR})
-  file(GLOB sources src/*.cpp parsers/*.cpp)  
   add_definitions(-DDD4HEP_USE_BOOST)
-#  MESSAGE( STATUS  "Boost_INCLUDE_DIR = ${Boost_INCLUDE_DIR} ")
-#  MESSAGE( STATUS  "include_directories= ${include_directories} ")
-else()
-  file(GLOB sources src/*.cpp)
+ #  MESSAGE( STATUS  "Boost_INCLUDE_DIR = ${Boost_INCLUDE_DIR} ")
+ #  MESSAGE( STATUS  "include_directories= ${include_directories} ")
 endif()
+file(GLOB sources src/*.cpp)
 
 if(NOT DD4HEP_USE_XERCESC)
   list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/src/Geant4XML.cpp)
diff --git a/DDG4/include/DDG4/ComponentProperties.h b/DDG4/include/DDG4/ComponentProperties.h
index 1a45bfdcd..b36cff0e4 100644
--- a/DDG4/include/DDG4/ComponentProperties.h
+++ b/DDG4/include/DDG4/ComponentProperties.h
@@ -24,26 +24,31 @@
  */
 namespace DD4hep {
 
-  struct Property;
-  struct PropertyGrammar;
-  struct PropertyConfigurator {
+  class Property;
+  class BasicGrammar;
+  class PropertyGrammar;
+
+
+  class PropertyConfigurator {
   protected:
     virtual ~PropertyConfigurator();
   public:
     virtual void set(const PropertyGrammar& setter, const std::string&, const std::string&, void* ptr) const = 0;
   };
 
+
   /** @class PropertyGrammar
    *
    *   @author  M.Frank
    *   @date    13.08.2013
    */
-  struct PropertyGrammar {
+  class PropertyGrammar {
   protected:
     friend class Property;
-
+    const BasicGrammar& m_grammar;
+  public:
     /// Default constructor
-    PropertyGrammar();
+    PropertyGrammar(const BasicGrammar& g);
     /// Default destructor
     virtual ~PropertyGrammar();
     /// Error callback on invalid conversion
@@ -51,11 +56,11 @@ namespace DD4hep {
     /// Error callback on invalid conversion
     static void invalidConversion(const std::string& value, const std::type_info& to);
     /// Access to the type information
-    virtual const std::type_info& type() const = 0;
+    virtual const std::type_info& type() const;
     /// Serialize an opaque value to a string
-    virtual std::string str(const void* ptr) const = 0;
+    virtual std::string str(const void* ptr) const;
     /// Set value from serialized string. On successful data conversion TRUE is returned.
-    virtual bool fromString(void* ptr, const std::string& value) const = 0;
+    virtual bool fromString(void* ptr, const std::string& value) const;
   };
 
   /** @class Property
diff --git a/DDG4/include/DDG4/ComponentProperties_inl.h b/DDG4/include/DDG4/ComponentProperties_inl.h
index a31d8afcb..850abf8a9 100644
--- a/DDG4/include/DDG4/ComponentProperties_inl.h
+++ b/DDG4/include/DDG4/ComponentProperties_inl.h
@@ -10,20 +10,15 @@
 #define DD4HEP_DDG4_COMPONENTPROPERTIES_INL_H
 
 // Framework include files
+#include "DD4hep/BasicGrammar.h"
 #include "DDG4/ComponentProperties.h"
 
-#ifdef DD4HEP_USE_BOOST
-#include "DDG4/Parsers.h"
-#include "DDG4/ToStream.h"
-#endif
-
 // C/C++ include files
 #include <sstream>
-#include <string>
 #include <vector>
 #include <list>
-#include <set>
 #include <map>
+#include <set>
 #include <stdexcept>
 
 /*
@@ -31,103 +26,10 @@
  */
 namespace DD4hep {
 
-  /** @class PropertyGrammarCollection
-   *
-   *   @author  M.Frank
-   *   @date    13.08.2013
-   */
-  template <typename TYPE> struct Grammar : public PropertyGrammar {
-    /// Standarsd constructor
-    Grammar();
-    /// Default destructor
-    virtual ~Grammar();
-    /// Singleton instantiator
-    static const Grammar& instance();
-    /// PropertyGrammar overload: Access to the type information
-    virtual const std::type_info& type() const;
-    /// PropertyGrammar overload: Serialize a property to a string
-    virtual std::string str(const void* ptr) const;
-    /// PropertyGrammar overload: Retrieve value from string
-    virtual bool fromString(void* ptr, const std::string& value) const;
-    /// Evaluate string value if possible before calling boost::spirit
-    virtual int evaluate(void* ptr, const std::string& value) const;
-    /// Pre-parse string
-    virtual std::string pre_parse(const std::string& in) const;
-  };
-
-  /// Standarsd constructor
-  template <typename TYPE> Grammar<TYPE>::Grammar() {
-  }
-
-  /// Default destructor
-  template <typename TYPE> Grammar<TYPE>::~Grammar() {
-  }
-
-  /// Access concrete Grammar object
-  template <class TYPE> const Grammar<TYPE>& Grammar<TYPE>::instance() {
-    static Grammar<TYPE> s;
-    return s;
-  }
-
-  /// PropertyGrammar overload: Access to the type information
-  template <typename TYPE> const std::type_info& Grammar<TYPE>::type() const {
-    return typeid(TYPE);
-  }
-
-  /// Evaluate string value if possible before calling boost::spirit
-  template <typename TYPE> int Grammar<TYPE>::evaluate(void*, const std::string&) const {
-    return 0;
-  }
-  /// Pre-parse string
-  template <typename TYPE> std::string Grammar<TYPE>::pre_parse(const std::string& in) const{
-    return in;
-  }
-
-  /// PropertyGrammar overload: Retrieve value from string
-  template <typename TYPE> bool Grammar<TYPE>::fromString(void* ptr, const std::string& str) const {
-    int sc = 0;
-    TYPE temp;
-#ifdef DD4HEP_USE_BOOST
-    sc = Parsers::parse(temp,str);
-#endif
-    if ( !sc ) sc = evaluate(&temp,str);
-#if 0
-    std::cout << "Sc=" << sc << "  Converting value: " << str 
-	      << " to type " << typeid(TYPE).name() 
-	      << std::endl;
-#endif
-    if ( sc )   {
-      *(TYPE*)ptr = temp;
-      return true;
-    }
-#ifndef DD4HEP_USE_BOOST
-    throw std::runtime_error("This version of DD4HEP is not compiled to use boost::spirit.\n"
-			     "To enable elaborated property handling set DD4HEP_USE_BOOST=ON\n"
-			     "and BOOST_INCLUDE_DIR=<boost include path>");
-#else
-    PropertyGrammar::invalidConversion(str, typeid(TYPE));
-    return false;
-#endif
-  }
-
-  /// Serialize a property to a string
-  template <typename TYPE> std::string Grammar<TYPE>::str(const void* ptr) const {
-#ifdef DD4HEP_USE_BOOST
-    std::stringstream string_rep;
-    Utils::toStream(*(TYPE*)ptr,string_rep);
-    return string_rep.str();
-#else
-    if (ptr) {
-    }
-    throw std::runtime_error("This version of DD4HEP is not compiled to use boost::spirit.\n"
-        "To enable elaborated property handling set DD4HEP_USE_BOOST=ON\n"
-        "and BOOST_INCLUDE_DIR=<boost include path>");
-#endif
-  }
-
   /// Setup property
   template <typename TYPE> void Property::make(TYPE& val) {
-    m_hdl = &Grammar < TYPE > ::instance();
+    static PropertyGrammar g(BasicGrammar::instance<TYPE>());
+    m_hdl = &g;
     m_par = &val;
   }
 
@@ -136,7 +38,7 @@ namespace DD4hep {
     const PropertyGrammar& g = grammar();
     if (g.type() == typeid(TYPE))
       *(TYPE*) m_par = value;
-    else if (!g.fromString(m_par, Grammar < TYPE > ::instance().str(&value)))
+    else if (!g.fromString(m_par, BasicGrammar::instance< TYPE >().str(&value)))
       PropertyGrammar::invalidConversion(typeid(TYPE), g.type());
   }
 
@@ -151,7 +53,7 @@ namespace DD4hep {
     const PropertyGrammar& g = grammar();
     if (g.type() == typeid(TYPE))
       value = *(TYPE*) m_par;
-    else if (!Grammar < TYPE > ::instance().fromString(&value, this->str()))
+    else if (!BasicGrammar::instance< TYPE >().fromString(&value, this->str()))
       PropertyGrammar::invalidConversion(g.type(), typeid(TYPE));
   }
 
@@ -162,13 +64,26 @@ namespace DD4hep {
     return temp;
   }
 
-#define DD4HEP_INSTANTIATE_PROPERTY_TYPE(x)				    \
-  template x Property::value() const;                                       \
-  template void Property::value(x& value) const;                            \
-  template void Property::set(const x& value);                              \
-  template Property& Property::operator=(const x& value);                   \
+}      // End namespace DD4hep
+
+// Instantiate single property
+#define DD4HEP_DEFINE_PROPERTY_TYPE(x)			\
+  template x Property::value() const;				\
+  template void Property::value(x& value) const;		\
+  template void Property::set(const x& value);			\
+  template Property& Property::operator=(const x& value);	\
   template void Property::make(x& value)
 
-}      // End namespace DD4hep
+// Instantiate single property with support for STL containers
+#define DD4HEP_DEFINE_PROPERTY_CONT(x)		\
+  DD4HEP_DEFINE_PROPERTY_TYPE(x);			\
+  DD4HEP_DEFINE_PROPERTY_TYPE(std::vector<x>);	\
+  DD4HEP_DEFINE_PROPERTY_TYPE(std::list<x>);	\
+  DD4HEP_DEFINE_PROPERTY_TYPE(std::set<x>)
+
+// Instantiate single property with support for STL containers + same for unsigned
+#define DD4HEP_DEFINE_PROPERTY_U_CONT(x)	\
+  DD4HEP_DEFINE_PROPERTY_CONT(x);		\
+  DD4HEP_DEFINE_PROPERTY_CONT(unsigned x)
 
 #endif // DD4HEP_DDG4_COMPONENTPROPERTIES_INL_H
diff --git a/DDG4/include/DDG4/ComponentUtils.h b/DDG4/include/DDG4/ComponentUtils.h
index 8d095318b..c569bd50e 100644
--- a/DDG4/include/DDG4/ComponentUtils.h
+++ b/DDG4/include/DDG4/ComponentUtils.h
@@ -9,90 +9,15 @@
 #ifndef DD4HEP_DDG4_COMPONENTTUILS_H
 #define DD4HEP_DDG4_COMPONENTTUILS_H
 
-// C/C++ include files
-#include <stdexcept>
-#include <typeinfo>
-#include <string>
+// Framework include files
+#include "DD4hep/Primitives.h"
+#include "DD4hep/Exceptions.h"
 
 /*
  *   DD4hep namespace declaration
  */
 namespace DD4hep {
 
-  /// ABI information about type names
-  std::string typeinfoName(const std::type_info& type);
-  void typeinfoCheck(const std::type_info& typ1, const std::type_info& typ2, const std::string& text = "");
-
-  /** @class unrelated_type_error
-   *
-   *   @author  M.Frank
-   *   @date    13.08.2013
-   */
-  struct unrelated_type_error : public std::runtime_error {
-    static std::string msg(const std::type_info& typ1, const std::type_info& typ2, const std::string& text);
-    unrelated_type_error(const std::type_info& typ1, const std::type_info& typ2, const std::string& text = "")
-        : std::runtime_error(msg(typ1, typ2, text)) {
-    }
-  };
-
-  /** @class unrelated_value_error
-   *
-   *   @author  M.Frank
-   *   @date    13.08.2013
-   */
-  struct unrelated_value_error : public std::runtime_error {
-    static std::string msg(const std::type_info& typ, const std::string& text);
-    unrelated_value_error(const std::type_info& typ, const std::string& text = "")
-        : std::runtime_error(msg(typ, text)) {
-    }
-  };
-
-  /** @class
-   *
-   *   @author  M.Frank
-   *   @date    13.08.2013
-   */
-  class ComponentCast {
-  public:
-    typedef void  (*destroy_t)(void*);
-    typedef void* (*cast_t)(const void*);
-#ifdef __CINT__
-    const std::type_info* type;
-#else
-    const std::type_info& type;
-#endif
-    const void* abi_class;
-    destroy_t   destroy;
-    cast_t      cast;
-
-  private:
-    /// Initializing Constructor
-    ComponentCast(const std::type_info& t, destroy_t d, cast_t c);
-    /// Defautl destructor
-    virtual ~ComponentCast();
-
-  public:
-    template <typename TYPE> static void _destroy(void* p)  {
-      TYPE* q = (TYPE*)p;
-      if (q)	delete q;
-    }
-    template <typename TYPE> static void* _cast(const void* p)  {
-      TYPE* q = (TYPE*)p;
-      q = dynamic_cast<TYPE*>(q);
-      return (void*)q;
-    }
-    template <typename TYPE> static ComponentCast& instance() {
-      static ComponentCast c(typeid(TYPE),_destroy<TYPE>,_cast<TYPE>);
-      return c;
-    }
-
-    /// Apply cast using typeinfo instead of dynamic_cast
-    void* apply_dynCast(const ComponentCast& to, const void* ptr) const;
-    /// Apply cast using typeinfo instead of dynamic_cast
-    void* apply_upCast(const ComponentCast& to, const void* ptr) const;
-    /// Apply cast using typeinfo instead of dynamic_cast
-    void* apply_downCast(const ComponentCast& to, const void* ptr) const;
-  };
 
 }      // End namespace DD4hep
 
diff --git a/DDG4/include/DDG4/Geant4Callback.h b/DDG4/include/DDG4/Geant4Callback.h
index 218268c40..3010426f3 100644
--- a/DDG4/include/DDG4/Geant4Callback.h
+++ b/DDG4/include/DDG4/Geant4Callback.h
@@ -9,364 +9,7 @@
 #ifndef DD4HEP_DDG4_GEANT4CALLBACK_H
 #define DD4HEP_DDG4_GEANT4CALLBACK_H
 
-// C/C++ include files
-#include <algorithm>
-#include <typeinfo>
-#include <vector>
+// Just forward header for DD4hep callbacks
+#include "DD4hep/Callback.h"
 
-/*
- *   DD4hep namespace declaration
- */
-namespace DD4hep {
-
-  /**@class Callback  Callback.h CPP/Callback.h
-   *
-   *  Definition of the generic callback structure for member functions
-   *
-   * @author  M.Frank
-   * @date    01/03/2013
-   * @version 0.1
-   */
-  struct Callback {
-    typedef unsigned long (*func_t)(void* obj, const void* fun, const void* args[]);
-    typedef struct {
-      void *first, *second;
-    } mfunc_t;
-    typedef unsigned long ulong;
-
-    void* par;
-    func_t call;
-    mfunc_t func;
-    Callback()
-        : par(0), call(0) {
-      func.first = func.second = 0;
-    }
-    Callback(void* p)
-        : par(p), call(0) {
-      func.first = func.second = 0;
-    }
-    Callback(void* p, void* mf, func_t c)
-        : par(p), call(c) {
-      func = *(mfunc_t*) mf;
-    }
-
-    operator bool() const {
-      return (call && par && func.first);
-    }
-    unsigned long execute(const void* user_param[]) const {
-      return (*this) ? call(par, &func, user_param) : 0;
-    }
-
-    template <typename T> static T* cast(void* p) {
-      return (T*) p;
-    }
-    template <typename T> static const T* c_cast(const void* p) {
-      return (const T*) p;
-    }
-    template <typename T> struct Wrapper {
-    public:
-      typedef T pmf_t;
-      union Functor {
-        mfunc_t ptr;
-        pmf_t pmf;
-        Functor(const void* f) {
-          ptr = *(mfunc_t*) f;
-        }
-        Functor(pmf_t f) {
-          pmf = f;
-        }
-      };
-      static mfunc_t pmf(pmf_t f) {
-        const Functor func(f);
-        return func.ptr;
-      }
-    };
-    //
-    // Callback with no arguments
-    //
-    template <typename T> const Callback& _make(ulong (*fptr)(void* o, const void* f, const void* u[]), T pmf) {
-      typename Wrapper<T>::Functor f(pmf);
-      func = f.ptr;
-      call = fptr;
-      return *this;
-    }
-    template <typename R, typename T> const Callback& make(R (T::*pmf)()) {
-      typedef R (T::*pfunc_t)();
-      struct _Wrapper : public Wrapper<pfunc_t> {
-        static ulong call(void* o, const void* f, const void*[]) {
-          return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename R, typename T> const Callback& make(R (T::*pmf)() const) {
-      typedef R (T::*pfunc_t)() const;
-      struct _Wrapper : public Wrapper<pfunc_t> {
-        static ulong call(void* o, const void* f, const void*[]) {
-          return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename T> const Callback& make(void (T::*pmf)()) {
-      typedef void (T::*pfunc_t)() const;
-      struct _Wrapper : public Wrapper<pfunc_t> {
-        static ulong call(void* o, const void* f, const void*[]) {
-          (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
-          return 1;
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename T> const Callback& make(void (T::*pmf)() const) {
-      typedef void (T::*pfunc_t)() const;
-      struct _Wrapper : public Wrapper<pfunc_t> {
-        static ulong call(void* o, const void* f, const void*[]) {
-          (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))();
-          return 1;
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    //
-    // Callback with 1 argument
-    //
-    template <typename R, typename T, typename A> const Callback& make(R (T::*pmf)(A)) {
-      typedef R (T::*pfunc_t)(A);
-      struct _Wrapper : public Wrapper<pfunc_t> {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A) u[0]);
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename R, typename T, typename A> const Callback& make(R (T::*pmf)(A) const) {
-      typedef R (T::*pfunc_t)(A) const;
-      struct _Wrapper : public Wrapper<pfunc_t> {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          return (ulong) (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A) u[0]);
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename T, typename A> const Callback& make(void (T::*pmf)(A)) {
-      typedef void (T::*pfunc_t)(const A);
-      struct _Wrapper : public Wrapper<pfunc_t> {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A) u[0]);
-          return 1;
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename T, typename A> const Callback& make(void (T::*pmf)(A) const) {
-      typedef void (T::*pfunc_t)(const A) const;
-      struct _Wrapper : public Wrapper<pfunc_t> {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          (cast<T>(o)->*(typename Wrapper<pfunc_t>::Functor(f).pmf))((A) u[0]);
-          return 1;
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    //
-    // Callback with 3 arguments
-    //
-    template <typename R, typename T, typename A0, typename A1> const Callback& make(R (T::*pmf)(A0, A1)) {
-      typedef R (T::*pfunc_t)(A0, A1);
-      typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1]);
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename R, typename T, typename A0, typename A1> const Callback& make(R (T::*pmf)(A0, A1) const) {
-      typedef R (T::*pfunc_t)(A0, A1);
-      typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1]);
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename T, typename A0, typename A1> const Callback& make(void (T::*pmf)(A0, A1)) {
-      typedef void (T::*pfunc_t)(A0, A1);
-      typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1]);
-          return 1;
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename T, typename A0, typename A1> const Callback& make(void (T::*pmf)(A0, A1) const) {
-      typedef void (T::*pfunc_t)(A0, A1);
-      typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1]);
-          return 1;
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    //
-    // Callback with 3 arguments
-    //
-    template <typename R, typename T, typename A0, typename A1, typename A2> const Callback& make(R (T::*pmf)(A0, A1, A2)) {
-      typedef R (T::*pfunc_t)(A0, A1);
-      typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1], (A2) u[2]);
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename R, typename T, typename A0, typename A1, typename A2> const Callback& make(
-        R (T::*pmf)(A0, A1, A2) const) {
-      typedef R (T::*pfunc_t)(A0, A1);
-      typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          return (ulong) (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1], (A2) u[2]);
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename T, typename A0, typename A1, typename A2> const Callback& make(void (T::*pmf)(A0, A1, A2)) {
-      typedef void (T::*pfunc_t)(A0, A1);
-      typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1], (A2) u[2]);
-          return 1;
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-    template <typename T, typename A0, typename A1, typename A2> const Callback& make(void (T::*pmf)(A0, A1, A2) const) {
-      typedef void (T::*pfunc_t)(A0, A1);
-      typedef Wrapper<pfunc_t> _W;
-      struct _Wrapper : public _W {
-        static ulong call(void* o, const void* f, const void* u[]) {
-          (cast<T>(o)->*(typename _W::Functor(f).pmf))((A0) u[0], (A1) u[1], (A2) u[2]);
-          return 1;
-        }
-      };
-      return _make(_Wrapper::call, pmf);
-    }
-
-    template <typename T> static Callback make(void* p, T pmf) {
-      return Callback(p).make(pmf);
-    }
-
-    template <typename P, typename R, typename T> static T* dyn_cast(P* p, R (T::*)()) {
-      return dynamic_cast<T*>(p);
-    }
-    template <typename P, typename R, typename T> static const T* dyn_cast(const P* p, R (T::*)() const) {
-      return dynamic_cast<const T*>(p);
-    }
-
-    template <typename P, typename R, typename T, typename A> static T* dyn_cast(P* p, R (T::*)(A)) {
-      return dynamic_cast<T*>(p);
-    }
-    template <typename P, typename R, typename T, typename A> static const T* dyn_cast(const P* p, R (T::*)(A) const) {
-      return dynamic_cast<const T*>(p);
-    }
-  };
-
-  struct CallbackSequence {
-    typedef std::vector<Callback> Callbacks;
-    enum Location { FRONT, END };
-    Callbacks callbacks;
-    /// Default constructor
-    CallbackSequence() {
-    }
-    /// Copy constructor
-    CallbackSequence(const CallbackSequence& c)
-        : callbacks(c.callbacks) {
-    }
-    /// Assignment operator
-    CallbackSequence& operator=(const CallbackSequence& c)  {
-      if ( this != & c ) callbacks = c.callbacks;
-      return *this;
-    }
-
-    //template <typename TYPE, typename R, typename OBJECT>
-    //  CallbackSequence(const std::vector<TYPE*>& objects, R (TYPE::value_type::*pmf)())  {
-    //}
-    bool empty() const {
-      return callbacks.empty();
-    }
-    void clear() {
-      callbacks.clear();
-    }
-    void add(const Callback& cb,Location where) {
-      if ( where == CallbackSequence::FRONT )
-	callbacks.insert(callbacks.begin(),cb);
-      else 
-	callbacks.insert(callbacks.end(),cb);
-    }
-    void operator()() const;
-    template <typename A0> void operator()(A0 a0) const;
-    template <typename A0, typename A1> void operator()(A0 a0, A1 a1) const;
-    template <typename A0, typename A1, typename A2> void operator()(A0 a0, A1 a1, A2 a2) const;
-    /// Check the compatibility of two typed objects. The test is the result of a dynamic_cast
-    static void checkTypes(const std::type_info& typ1, const std::type_info& typ2, void* test);
-
-    template <typename TYPE, typename R, typename OBJECT>
-      void add(TYPE* pointer, R (OBJECT::*pmf)(),Location where=CallbackSequence::END) {
-      checkTypes(typeid(TYPE), typeid(OBJECT), dynamic_cast<OBJECT*>(pointer));
-      add(Callback(pointer).make(pmf),where);
-    }
-    template <typename TYPE, typename R, typename OBJECT, typename A>
-    void add(TYPE* pointer, R (OBJECT::*pmf)(A),Location where=CallbackSequence::END) {
-      checkTypes(typeid(TYPE), typeid(OBJECT), dynamic_cast<OBJECT*>(pointer));
-      add(Callback(pointer).make(pmf),where);
-    }
-    template <typename TYPE, typename R, typename OBJECT, typename A1, typename A2>
-    void add(TYPE* pointer, R (OBJECT::*pmf)(A1, A2),Location where=CallbackSequence::END) {
-      checkTypes(typeid(TYPE), typeid(OBJECT), dynamic_cast<OBJECT*>(pointer));
-      add(Callback(pointer).make(pmf),where);
-    }
-  };
-
-  inline void CallbackSequence::operator()() const {
-    if (!callbacks.empty()) {
-      const void* args[1] = { 0 };
-      for (Callbacks::const_iterator i = callbacks.begin(); i != callbacks.end(); ++i)
-        (*i).execute(args);
-    }
-  }
-  template <typename A0> inline
-  void CallbackSequence::operator()(A0 a0) const {
-    if (!callbacks.empty()) {
-      const void* args[1] = { a0 };
-      for (Callbacks::const_iterator i = callbacks.begin(); i != callbacks.end(); ++i)
-        (*i).execute(args);
-    }
-  }
-  template <typename A0, typename A1> inline
-  void CallbackSequence::operator()(A0 a0, A1 a1) const {
-    if (!callbacks.empty()) {
-      const void* args[2] = { a0, a1 };
-      for (Callbacks::const_iterator i = callbacks.begin(); i != callbacks.end(); ++i)
-        (*i).execute(args);
-    }
-  }
-  template <typename A0, typename A1, typename A2> inline
-  void CallbackSequence::operator()(A0 a0, A1 a1, A2 a2) const {
-    if (!callbacks.empty()) {
-      const void* args[3] = { a0, a1, a2 };
-      for (Callbacks::const_iterator i = callbacks.begin(); i != callbacks.end(); ++i)
-        (*i).execute(args);
-    }
-  }
-
-}       // End namespace DD4hep
 #endif  // DD4HEP_DDG4_GEANT4CALLBACK_H
diff --git a/DDG4/include/DDG4/Geant4Converter.h b/DDG4/include/DDG4/Geant4Converter.h
index 85ef8c37b..c23fb38ed 100644
--- a/DDG4/include/DDG4/Geant4Converter.h
+++ b/DDG4/include/DDG4/Geant4Converter.h
@@ -57,6 +57,7 @@ namespace DD4hep {
 
       /// Convert the geometry type volume placement into the corresponding Geant4 object(s).
       virtual void* handlePlacement(const std::string& name, const TGeoNode* node) const;
+      virtual void* handleAssembly(const std::string& name, const TGeoNode* node) const;
 
       /// Convert the geometry type field into the corresponding Geant4 object(s).
       ///virtual void* handleField(const std::string& name, Ref_t field) const;
diff --git a/DDG4/include/DDG4/Geant4DataConversion.h b/DDG4/include/DDG4/Geant4DataConversion.h
index 7a65cf4df..9174c92b8 100644
--- a/DDG4/include/DDG4/Geant4DataConversion.h
+++ b/DDG4/include/DDG4/Geant4DataConversion.h
@@ -97,10 +97,10 @@ namespace DD4hep {
       if ( i != conversions().end() ) {
         return *((*i).second);
       }
-      throw std::runtime_error(typeinfoName(typeid(self_t))+
+      throw std::runtime_error(typeName(typeid(self_t))+
           ": No appropriate LCIO_OUTPUT conversion "
           "mechanism known for tag:"+
-          typeinfoName(typ));
+          typeName(typ));
     }
 
     /** @class Geant4DataConversion Geant4DataConversion.h DDG4/Geant4DataConversion.h
@@ -117,7 +117,7 @@ namespace DD4hep {
       Geant4DataConversion(void*) : Geant4Conversion<OUTPUT,ARGS>()
       {
         this->self_t::conversions().insert(make_pair(&typeid(TAG),this));
-        //std::cout << "Registered " << typeinfoName(typeid(*this)) << std::endl;
+        //std::cout << "Registered " << typeName(typeid(*this)) << std::endl;
       }
       virtual OUTPUT* operator()(const ARGS& args) const;
     };
diff --git a/DDG4/include/DDG4/Geant4GeometryInfo.h b/DDG4/include/DDG4/Geant4GeometryInfo.h
index d56dcb41c..9426048d9 100644
--- a/DDG4/include/DDG4/Geant4GeometryInfo.h
+++ b/DDG4/include/DDG4/Geant4GeometryInfo.h
@@ -51,15 +51,14 @@ namespace DD4hep {
     struct Geant4GeometryInfo : public TNamed, public Geometry::GeoHandlerTypes::GeometryInfo {
     public:
       typedef std::vector<const G4VPhysicalVolume*> PlacementPath;
-      typedef std::vector<std::pair<size_t, const TGeoNode*> > AssemblyChildren;
       typedef std::map<const TGeoElement*, G4Element*> ElementMap;
       typedef std::map<const TGeoMedium*, G4Material*> MaterialMap;
       typedef std::map<const TNamed*, G4UserLimits*> LimitMap;
       typedef std::map<const TGeoNode*, G4VPhysicalVolume*> PlacementMap;
-      typedef std::map<const G4AssemblyVolume*, AssemblyChildren> AssemblyChildMap;
       typedef std::map<const TNamed*, G4Region*> RegionMap;
       typedef std::map<const TNamed*, G4VSensitiveDetector*> SensDetMap;
       typedef std::map<const TGeoVolume*, G4LogicalVolume*> VolumeMap;
+      typedef std::map<const TGeoVolume*, G4AssemblyVolume*>  AssemblyMap;
       typedef std::map<const TGeoShape*, G4VSolid*> SolidMap;
       typedef std::map<const TNamed*, G4VisAttributes*> VisMap;
       typedef std::map<PlacementPath, VolumeID> PathMap;
@@ -73,7 +72,7 @@ namespace DD4hep {
       SolidMap g4Solids;
       VolumeMap g4Volumes;
       PlacementMap g4Placements;
-      AssemblyChildMap g4AssemblyChildren;
+      AssemblyMap  g4Assemblies;
       RegionMap g4Regions;
       VisMap g4Vis;
       LimitMap g4Limits;
diff --git a/DDG4/include/DDG4/Geant4Mapping.h b/DDG4/include/DDG4/Geant4Mapping.h
index 84b445332..0098228d0 100644
--- a/DDG4/include/DDG4/Geant4Mapping.h
+++ b/DDG4/include/DDG4/Geant4Mapping.h
@@ -44,14 +44,13 @@ namespace DD4hep {
       typedef Geometry::Region Region;
 
       typedef Geant4GeometryInfo::PlacementPath PlacementPath;
-      typedef Geant4GeometryInfo::AssemblyChildren AssemblyChildren;
       typedef Geant4GeometryInfo::ElementMap ElementMap;
       typedef Geant4GeometryInfo::MaterialMap MaterialMap;
       typedef Geant4GeometryInfo::LimitMap LimitMap;
       typedef Geant4GeometryInfo::PlacementMap PlacementMap;
-      typedef Geant4GeometryInfo::AssemblyChildMap AssemblyChildMap;
       typedef Geant4GeometryInfo::RegionMap RegionMap;
       typedef Geant4GeometryInfo::SensDetMap SensDetMap;
+      typedef Geant4GeometryInfo::AssemblyMap AssemblyMap;
       typedef Geant4GeometryInfo::VolumeMap VolumeMap;
       typedef Geant4GeometryInfo::SolidMap SolidMap;
       typedef Geant4GeometryInfo::VisMap VisMap;
diff --git a/DDG4/include/DDG4/Parsers.h b/DDG4/include/DDG4/Parsers.h
deleted file mode 100644
index eacdb2061..000000000
--- a/DDG4/include/DDG4/Parsers.h
+++ /dev/null
@@ -1,689 +0,0 @@
-// ============================================================================
-#ifndef DD4HEP_PARSERS_H
-#define DD4HEP_PARSERS_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// STD & STL
-// ============================================================================
-#include <string>
-#include <vector>
-#include <list>
-#include <set>
-#include <map>
-#include "Math/Point3D.h"
-#include "Math/Vector3D.h"
-#include "Math/Vector4D.h"
-
-// ============================================================================
-#define PARSERS_DECL_FOR_SINGLE(Type)			\
-  int parse(Type& result, const std::string& input);
-
-#define PARSERS_DECL_FOR_PAIR(FirstType, SecondType)			\
-  int parse(std::pair<FirstType, SecondType >& result,const std::string& input);
-
-#define PARSERS_DECL_FOR_LIST(InnerType)				\
-  int parse(std::vector<InnerType>& result,const std::string& input);	\
-  int parse(std::list<InnerType>& result,const std::string& input);	\
-  int parse(std::set<InnerType>& result,const std::string& input);
-// ============================================================================
-/** @file
- *  The declaration of major parsing functions used e.g
- *  for (re)implementation of new extended properties see class Property
- *  These function also could be used in a different, much wider contex.
- *  all of them have the semantic:
- *  <c>int parse ( TYPE& result , const std::string& input )</c>
- *  where <c>input</c> is the input string to be parsed,
- *  and <c>result</c> is the the result of parsing
- *
- *  @code
- *
- *  const std::string        input = ... ;
- *  std::vector<std::string> result ;
- *
- *  // parse the input
- *  int sc = parse ( result , input ) ;
- *  if ( sc.isFailure() )
- *  {
- *    // error here ...
- *  }
- *  std::cout << "vector size " << result.size() << std::endl ;
- *
- *  @endcode
- *
- *  @see DD4hep::Parsers::parse
- *  @see Property
- *
- *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
- *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
- *  @date 2006-05-12
- */
-// ============================================================================
-namespace DD4hep {
-  namespace Parsers {
-    // ========================================================================
-    /** parse the <c>bool</c> value
-     *  @see DD4hep::Parsers::BoolGrammar
-     *  @param result (output) boolean result
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    PARSERS_DECL_FOR_SINGLE(bool)
-    // ========================================================================
-    /** parse the <c>char</c> value
-     *
-     *  @see DD4hep::Parsers::CharGrammar
-     *  @param result (output) boolean result
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    PARSERS_DECL_FOR_SINGLE(char)
-    /// @see DD4hep::Parsers::parser(char&,std::string&)
-    PARSERS_DECL_FOR_SINGLE(unsigned char)
-    /// @see DD4hep::Parsers::parser(char&,std::string&)
-    PARSERS_DECL_FOR_SINGLE(signed char)
-    // ========================================================================
-    /** parse the <c>int</c> value
-     *
-     *  @see DD4hep::Parsers::IntGrammar
-     *  @param result (output) integer result
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    PARSERS_DECL_FOR_SINGLE(int)
-    /// @see DD4hep::Parsers::parser( int&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(short)
-    /// @see DD4hep::Parsers::parser( int&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(unsigned short)
-    /// @see DD4hep::Parsers::parser( int&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(unsigned int)
-    /// @see DD4hep::Parsers::parser( int&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(long)
-    /// @see DD4hep::Parsers::parser( int&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(unsigned long)
-    /// @see DD4hep::Parsers::parser( int&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(long long)
-    /// @see DD4hep::Parsers::parser( int&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(unsigned long long)
-    // ========================================================================
-    /** parse the <c>double</c> value
-     *
-     *  @see DD4hep::Parsers::RealGrammar
-     *  @param result (output) double result
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    PARSERS_DECL_FOR_SINGLE(double)
-    /// @see DD4hep::Parsers::parser( double&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(float)
-    /// @see DD4hep::Parsers::parser( double&, const std::string& )
-    PARSERS_DECL_FOR_SINGLE(long double)
-    // ========================================================================
-    /** parse the <c>std::string</c> value
-     *
-     *  @see DD4hep::Parsers::StringGrammar
-     *  @param result (output) string result
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    PARSERS_DECL_FOR_SINGLE(std::string)
-    // ========================================================================
-
-    PARSERS_DECL_FOR_LIST(bool)
-    PARSERS_DECL_FOR_LIST(char)
-    PARSERS_DECL_FOR_LIST(unsigned char)
-    PARSERS_DECL_FOR_LIST(signed char)
-
-    PARSERS_DECL_FOR_LIST(int)
-    PARSERS_DECL_FOR_LIST(short)
-    PARSERS_DECL_FOR_LIST(unsigned short)
-    PARSERS_DECL_FOR_LIST(unsigned int)
-    PARSERS_DECL_FOR_LIST(long)
-    PARSERS_DECL_FOR_LIST(unsigned long)
-    PARSERS_DECL_FOR_LIST(long long)
-    PARSERS_DECL_FOR_LIST(unsigned long long)
-
-    PARSERS_DECL_FOR_LIST(double)
-    PARSERS_DECL_FOR_LIST(float)
-    PARSERS_DECL_FOR_LIST(long double)
-
-    PARSERS_DECL_FOR_LIST(std::string)
-    // ========================================================================
-    // Advanced parses
-    // ========================================================================
-    /** parse the <c>std::pair\<double,double\></c> value
-     *
-     *  @see DD4hep::Parsers::PairGrammar
-     *  @see DD4hep::Parsers::RealGrammar
-     *  @param result (output) pair of doubles
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    PARSERS_DECL_FOR_PAIR(double, double)
-    // ========================================================================
-    /** parse the <c>std::pair\<int,int\></c> value
-     *
-     *  @see DD4hep::Parsers::PairGrammar
-     *  @see DD4hep::Parsers::IntGrammar
-     *  @param result (output) pair of integers
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    PARSERS_DECL_FOR_PAIR(int, int)
-    // ========================================================================
-    /** parse the <c>std::vector\<std::pair\<double,double\> \></c> value
-     *
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::PairGrammar
-     *  @see DD4hep::Parsers::RealGrammar
-     *  @param result (output) vector with pairs of doubles
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::vector<std::pair<double, double> >& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::vector\<std::pair\<int,int\> \></c> value
-     *
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::PairGrammar
-     *  @see DD4hep::Parsers::IntGrammar
-     *  @param result (output) vector with pairs of int
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::vector<std::pair<int, int> >& result, const std::string& input);
-    // ========================================================================
-    // vector< vector< TYPE > >
-    // ========================================================================
-    /** parse the <c>std::vector\<std::vector\<std::string\> \></c> value
-     *
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::StringGrammar
-     *  @param result (output) vector with vectors of strings
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::vector<std::vector<std::string> >& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::vector\<std::vector\<double\> \></c> value
-     *
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::RealGrammar
-     *  @param result (output) vector with vectors of doubles
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::vector<std::vector<double> >& result, const std::string& input);
-    // ========================================================================
-    // map< TYPE, TYPE >
-    // ========================================================================
-    /** parse the <c>std::map\<int , int\></c> value
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @see DD4hep::Parsers::IntGrammar
-     *  @param result (output) map with integer key and double value
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::map<int, int>& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<int , double\></c> value
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @see DD4hep::Parsers::IntGrammar
-     *  @see DD4hep::Parsers::RealGrammar
-     *  @param result (output) map with integer key and double value
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::map<int, double>& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<std::string , std::string\></c> value
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @see DD4hep::Parsers::StringGrammar
-     *  @param result (output) map with string key and value
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::map<std::string, std::string>& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<std::string , int\></c> value
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @see DD4hep::Parsers::StringGrammar
-     *  @see DD4hep::Parsers::IntGrammar
-     *  @param result (output) map with string key and integer value
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::map<std::string, int>& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<std::string , double\></c> value
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @see DD4hep::Parsers::StringGrammar
-     *  @see DD4hep::Parsers::RealGrammar
-     *  @param result (output) map with string key and integer value
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::map<std::string, double>& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<std::string , std::vector\<std::string\> \></c>
-     *  value
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @see DD4hep::Parsers::StringGrammar
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @param result (output) map with string value and
-     *                 vector of strings as value
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::map<std::string, std::vector<std::string> >& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<std::string , std::vector\<int\> \></c> value
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @see DD4hep::Parsers::StringGrammar
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::IntGrammar
-     *  @param result (output) map with string value and
-     *                 vector of integers as value
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::map<std::string, std::vector<int> >& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<std::string , std::vector\<double\> \></c> value
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @see DD4hep::Parsers::StringGrammar
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::RealGrammar
-     *  @param result (output) map with string value and
-     *                 vector of doubles as value
-     *  @param input  (input) the string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    int parse(std::map<std::string, std::vector<double> >& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<int,std::string\> \></c> objects
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @date 2007-12-06
-     */
-    int parse(std::map<int, std::string>& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<unsigned int,std::string\> \></c> objects
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @date 2007-12-06
-     */
-    int parse(std::map<unsigned int, std::string>& result, const std::string& input);
-    // ========================================================================
-    /** parse the <c>std::map\<unsigned int,std::string\> \></c> objects
-     *
-     *  @see DD4hep::Parsers::MapGrammar
-     */
-    int parse(std::map<std::string, unsigned int>& result, const std::string& input);
-
-    // ========================================================================
-    /** parse the pair expression (map-component)  " 'name' :value"
-     *
-     *  @code
-     *
-     *  const std::string input = "'PackageName':DD4hepKernel" ;
-     *  std::string name  ;
-     *  std::string value ;
-     *  int sc = DD4hep::Parsers::parse ( name , value , input ) ;
-     *  if ( sc.isFailure() ) { ... }
-     *  std::cout <<  "\tParsed name  is " << name
-     *            <<  "\tParsed value is " << value << std::endl
-     *  @endcode
-     *
-     *  @param  name  (output) the parsed name of the component, defined
-     *                as 'name' or "name" before the column symbol ":",
-     *                the leading and trailing blans are omitted
-     *  @param  value (output) the parsed value of the component,
-     *                defined as everything after the column symbol ":"
-     *                till the end of the string
-     *  @param  input (input) string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    int parse(std::string& name, std::string& value, const std::string& input);
-
-    // ========================================================================
-    /** helper function, needed for implementation of map of pairs
-     *  It is very useful construction for monitoring to
-     *  represent the value and error or the allowed range for
-     *  some parameter
-     *  @param params the map of pair
-     *  @param input the string to be parsed
-     *  @return status code
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @date 2009-05-19
-     */
-    int parse(std::map<std::string, std::pair<double, double> >& params, const std::string& input);
-    // ========================================================================
-    /** parser function for C-arrays
-     *  @param params C-array
-     *  @param input the string to be parsed
-     *  @return status code
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-15
-     */
-    template <class T, unsigned int N>
-    int parse(T (&result)[N], const std::string& input) {
-      typedef std::vector<T> _Vct;
-      // create the temporary vector
-      _Vct tmp;
-      int sc = parse(tmp, input);
-      if (!sc) {
-        return sc;
-      }   //  RETURN
-      if (N != tmp.size()) {
-        return 0;
-      }   //  RETURN
-      //
-      std::copy(tmp.begin(), tmp.end(), result);
-      //
-      return 1;                            //  RETURN
-    }
-    // ========================================================================
-    /** parser function for C-strings
-     *  @param params C-string
-     *  @param input the string to be parsed
-     *  @return status code
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-15
-     */
-    template <unsigned int N>
-    int parse(char (&result)[N], const std::string& input) {
-      // clear the string
-      std::fill_n(result, N, ' ');
-      // create the temporary string
-      std::string tmp;
-      int sc = parse(tmp, input);
-      if (!sc) {
-        return sc;
-      }   //  RETURN
-      if (N == tmp.size()) {
-        std::copy(tmp.begin(), tmp.end(), result);
-      }
-      else if (N + 2 == tmp.size() && ('\'' == tmp[0] || '\"' == tmp[0]) && (tmp[0] == tmp[tmp.size() - 1])) {
-        std::copy(tmp.begin() + 1, tmp.end() - 1, result);
-      }
-      else {
-        return 0;
-      }
-      //
-      return 1;                            //  RETURN
-    }
-
-    // ========================================================================
-    /** parse 3D-point 
-     *
-     *  Valid representations of 3D-point:
-     *
-     *      - a'la python tuple with 3 elements ("canonical")
-     *      - a'la python list with 3 elements 
-     *      - tuple or list with named ordered fields 
-     *
-     *  @code
-     *
-     *    " (1,2,3) " 
-     *    " [1,2,3] " 
-     *    " [ x : 1, 2, Z:3 ] " 
-     *    " [ pX : 1 , PY : 2, 3] " 
-     *     
-     *  @endcode 
-     *
-     *  Valid keys for names fields:
-     *
-     *  @code
-     *
-     *    "x", "X" , "pX" , "Px" , "PX "
-     *    "y", "Y" , "pY" , "Py" , "PY "
-     *    "z", "Z" , "pZ" , "Pz" , "PZ "
-     *
-     *  @endcode 
-     *
-     *  @attention Named fields must be ordered <code>(x,y,z)</code>
-     *
-     *  @param result (output) the parsed point 
-     *  @param input  (input)  the input string 
-     *  @return status code 
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    int parse(ROOT::Math::XYZPoint& result, const std::string& input);
-
-    // ========================================================================
-    /** parse 3D-vector 
-     *
-     *  Valid representations of 3D-vector:
-     *
-     *      - a'la python tuple with 3 elements ("canonical")
-     *      - a'la python list with 3 elements 
-     *      - tuple or list with named ordered fields 
-     *
-     *  @code
-     *
-     *    " (1,2,3) " 
-     *    " [1,2,3] " 
-     *    " [ x : 1, 2, Z:3 ] " 
-     *    " [ pX : 1 , PY : 2, 3] " 
-     *     
-     *  @endcode 
-     *
-     *  Valid keys for names fields:
-     *
-     *  @code
-     *
-     *    "x", "X" , "pX" , "Px" , "PX "
-     *    "y", "Y" , "pY" , "Py" , "PY "
-     *    "z", "Z" , "pZ" , "Pz" , "PZ "
-     *
-     *  @endcode 
-     *
-     *  @attention Named fields must be ordered <code>(x,y,z)</code>
-     *
-     *  @param result (output) the parsed vector
-     *  @param input  (input)  the input string 
-     *  @return status code 
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    int parse( ROOT::Math::XYZVector& result, const std::string& input);
-
-    // ========================================================================
-    /** parse PxPyPzEVector
-     *
-     *  Valid representations of Lorenzt vector
-     *
-     *      - a'la python tuple with 4 elements ("canonical")
-     *      - a'la python list with 4 elements 
-     *      - python/list with inner representation of 3D-point/vector
-     *      - tuple or list with named ordered fields 
-     *
-     *  @code
-     *
-     *    " (1,2,3,4) "     
-     *    " (1,2,3;4) "
-     *
-     *    " [1,2,3,4] " 
-     *    " [1,2,3;4] " 
-     *
-     *    " [ x:1 ,2,3; e= 4] " 
-     *    " [ pX : 1 , PY : 2, 3 , T= 4] " 
-     *
-     *    " [ ( pX : 1 , PY : 2, 3 ) , 4] " 
-     *    " [ ( pX : 1 , PY : 2, 3 ) ; 4] " 
-     *
-     *    " [ 4 , ( pX : 1 , PY : 2, 3 ) ] " 
-     *    " [ 4 ; ( pX : 1 , PY : 2, 3 ) ] " 
-     *
-     *    " [ [ pX : 1 , PY : 2, 3 ] , 4] " 
-     *    " [ [ pX : 1 , PY : 2, 3 ] ; 4] " 
-     *
-     *    " [ 4 , [ pX : 1 , PY : 2, 3 ] ] " 
-     *    " [ 4 ; [ pX : 1 , PY : 2, 3 ] ] " 
-     *
-     *    " ( ( pX : 1 , PY : 2, 3 ) , 4 )" 
-     *    " ( ( pX : 1 , PY : 2, 3 ) ; 4 )" 
-     *
-     *    " ( 4 , ( pX : 1 , PY : 2, 3 ) )" 
-     *    " ( 4 ; ( pX : 1 , PY : 2, 3 ) )" 
-     *
-     *    " ( [ pX : 1 , PY : 2, 3 ] , 4 )" 
-     *    " ( [ pX : 1 , PY : 2, 3 ] ; 4 )" 
-     *
-     *    " ( 4 , [ pX : 1 , PY : 2, 3 ] )" 
-     *    " ( 4 ; [ pX : 1 , PY : 2, 3 ] )" 
-     *
-     *     
-     *  @endcode 
-     *
-     *  Note that "eenrgy" element can be separated with semicolumn.
-     *
-     *  Valid keys for names fields:
-     *
-     *  @code
-     *
-     *    "x", "X" , "pX" , "Px" , "PX "
-     *    "y", "Y" , "pY" , "Py" , "PY "
-     *    "z", "Z" , "pZ" , "Pz" , "PZ "
-     *    "t", "T" , "e"  , "E" 
-     *
-     *  @endcode 
-     *
-     *  @attention Named fields must be ordered <code>(x,y,z)</code>
-     *
-     *  @param result (output) the parsed lorentz vector  
-     *  @param input  (input)  the input string 
-     *  @return status code 
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    int parse(ROOT::Math::PxPyPzEVector& result, const std::string& input);
-    // ========================================================================
-    /** parse the vector of points 
-     *  @param resut (OUTPUT) the parser vector 
-     *  @param input (INPIUT) the string to be parsed 
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    int parse( std::vector<ROOT::Math::XYZPoint>& result, const std::string& input);
-    // ========================================================================
-    /** parse the vector of vectors 
-     *  @param resut (OUTPUT) the parser vector 
-     *  @param input (INPIUT) the string to be parsed 
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    int parse( std::vector<ROOT::Math::XYZVector>& result, const std::string& input);
-    // ========================================================================
-    /** parse the vector of vectors 
-     *  @param resut (OUTPUT) the parser vector 
-     *  @param input (INPIUT) the string to be parsed 
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    int parse(std::vector<ROOT::Math::PxPyPzEVector>& result, const std::string& input);
-
-  // ========================================================================
-  }//                                          end of namespace Parsers
-// ==========================================================================
-}//                                                     end of namespace DD4hep
-// ============================================================================
-// The END
-// ============================================================================
-#endif // DD4HEP_PARSERS_H
-// ============================================================================
diff --git a/DDG4/include/DDG4/ToStream.h b/DDG4/include/DDG4/ToStream.h
deleted file mode 100644
index 4e59d803e..000000000
--- a/DDG4/include/DDG4/ToStream.h
+++ /dev/null
@@ -1,302 +0,0 @@
-// $Id: ToStream.h,v 1.8 2008/10/30 23:38:46 marcocle Exp $
-// ============================================================================
-// CVS tag $Name:  $, version $Revision: 1.8 $
-// ============================================================================
-#ifndef DD4HEPPROPERTYPARSERS_PARSERVALUETOSTREAM_H
-#define DD4HEPPROPERTYPARSERS_PARSERVALUETOSTREAM_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// STD & STL
-// ============================================================================
-#include <iostream>
-#include <iomanip>
-#include <vector>
-#include <map>
-#include <set>
-#include <list>
-#include <string>
-#include <sstream>
-#include "Math/Point3D.h"
-#include "Math/Vector3D.h"
-#include "Math/Vector4D.h"
-
-// ============================================================================
-/** @file DD4hepKernel/ToStream.h
- *  implemenattiono fvarioud functions for streaming.
- *  this functionality is essenital for usag eof varuodu types as property for
- *  the various DD4hep components
- *  @attention the implemenation of the specific specializations must be done
- *                    before the inclusion of this file
- *  @todo ToStream.h : reimplement in terms of functors, to allow
- *                     easier especializations
- */
-// ============================================================================
-namespace DD4hep {
-  // ==========================================================================
-  namespace Utils {
-    // ========================================================================
-    /** the generic implementation of the printout to the std::ostream
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    template <class TYPE>
-    std::ostream& toStream(const TYPE& obj, std::ostream& s);
-    // ========================================================================
-    /** the helper function to print the sequence
-     *  @param first (INPUT)  begin-iterator for the sequence
-     *  @param last  (INPUT)  end-iterator for the sequence
-     *  @param s     (UPDATE) the stream itself
-     *  @param open  (INPUT)  "open"-symbol
-     *  @param close (INPUT)  "close"-symbol
-     *  @param delim (INPUT)  "delimiter"-symbol
-     *  @return the stream
-     *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
-     *  @date 2009-09-15
-     */
-    template <class ITERATOR>
-    inline std::ostream& toStream(ITERATOR first, // begin of the sequence
-        ITERATOR last,                            //   end of the sequence
-        std::ostream& s,                          //            the stream
-        const std::string& open,                  //               opening
-        const std::string& close,                 //               closing
-        const std::string& delim);                //             delimiter
-    // ========================================================================
-    /** the printtout of the strings.
-     *  the string is printed a'la Python using the quotes
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    inline std::ostream& toStream(const std::string& obj, std::ostream& s) {
-      if (std::string::npos == obj.find('\'')) {
-        s << "\'" << obj << "\'";
-      }
-      else {
-        s << "\"" << obj << "\"";
-      }
-      return s;
-    }
-    /** the printout of boolean values "a'la Python"
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-09-09
-     */
-    inline std::ostream& toStream(const bool obj, std::ostream& s) {
-      return s << (obj ? "True" : "False");
-    }
-    /** the printout of float values with the reasonable precision
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-09-09
-     */
-    inline std::ostream& toStream(const float obj, std::ostream& s, const int prec = 6) {
-      const int p = s.precision();
-      return s << std::setprecision(prec) << obj << std::setprecision(p);
-    }
-    /** the printout of double values with the reasonable precision
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-09-09
-     */
-    inline std::ostream& toStream(const double obj, std::ostream& s, const int prec = 8) {
-      const int p = s.precision();
-      return s << std::setprecision(prec) << obj << std::setprecision(p);
-    }
-    /** the printout of long double values with the reasonable precision
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-09-09
-     */
-    inline std::ostream& toStream(const long double obj, std::ostream& s, const int prec = 10) {
-      const int p = s.precision();
-      return s << std::setprecision(prec) << obj << std::setprecision(p);
-    }
-    // ========================================================================
-    /** the partial template specialization of
-     *  <c>std::pair<KTYPE,VTYPE></c> printout
-     *  the pair is printed a'la Python tuple: " ( a , b )"
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    template <class KTYPE, class VTYPE>
-    inline std::ostream& toStream(const std::pair<KTYPE, VTYPE>& obj, std::ostream& s) {
-      s << "( ";
-      toStream(obj.first, s);
-      s << " , ";
-      toStream(obj.second, s);
-      return s << " )";
-    }
-    // ========================================================================
-    /** the partial template specialization of <c>std::vector<TYPE,ALLOCATOR></c>
-     *  printout. The vector is printed a'la Python list: "[ a, b, c ]"
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    template <class TYPE, class ALLOCATOR>
-    inline std::ostream& toStream(const std::vector<TYPE, ALLOCATOR>& obj, std::ostream& s) {
-      return toStream(obj.begin(), obj.end(), s, "[ ", " ]", " , ");
-    }
-    // ========================================================================
-    /** the partial template specialization of <c>std::list<TYPE,ALLOCATOR></c>
-     *  printout. The vector is printed a'la Python list: "[ a, b, c ]"
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2007-04-08
-     */
-    template <class TYPE, class ALLOCATOR>
-    inline std::ostream& toStream(const std::list<TYPE, ALLOCATOR>& obj, std::ostream& s) {
-      return toStream(obj.begin(), obj.end(), s, "[ ", " ]", " , ");
-    }
-    // ========================================================================
-    /** the partial template specialization of <c>std::set<TYPE,CMP,ALLOCATOR></c>
-     *  printout. The vector is printed a'la Python list: "[ a, b, c ]"
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    template <class TYPE, class CMP, class ALLOCATOR>
-    inline std::ostream& toStream(const std::set<TYPE, CMP, ALLOCATOR>& obj, std::ostream& s) {
-      return toStream(obj.begin(), obj.end(), s, "[ ", " ]", " , ");
-    }
-    // ========================================================================
-    /** the partial template specialization of
-     *  <c>std::map<KTYPE,VTYPE,CMP,ALLOCATOR></c> printout
-     *  the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    template <class KTYPE, class VTYPE, class CMP, class ALLOCATOR>
-    inline std::ostream& toStream(const std::map<KTYPE, VTYPE, CMP, ALLOCATOR>& obj, std::ostream& s) {
-      s << "{ ";
-      for (typename std::map<KTYPE, VTYPE, CMP, ALLOCATOR>::const_iterator cur = obj.begin(); obj.end() != cur; ++cur) {
-        if (obj.begin() != cur) {
-          s << " , ";
-        }
-        toStream(cur->first, s);
-        s << " : ";
-        toStream(cur->second, s);
-      }
-      return s << " }";
-    }
-
-    // ========================================================================
-    /** the specialization for C-arrays, a'la python tuple
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhenf.nl
-     *  @date 2009-10-05
-     */
-    template <class TYPE, unsigned int N>
-    std::ostream& toStream(TYPE (&obj)[N], std::ostream& s) {
-      return toStream(obj, obj + N, s, "( ", " )", " , ");
-    }
-    // ========================================================================
-    /** the specialization for C-arrays, a'la python tuple
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhenf.nl
-     *  @date 2009-10-05
-     */
-    template <class TYPE, unsigned int N>
-    std::ostream& toStream(const TYPE (&obj)[N], std::ostream& s) {
-      return toStream(obj, obj + N, s, "( ", " )", " , ");
-    }
-    // ========================================================================
-    /** the specialization for C-string, a'la python tuple
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhenf.nl
-     *  @date 2009-10-05
-     */
-    template <unsigned int N>
-    std::ostream& toStream(char (&obj)[N], std::ostream& s) {
-      return toStream(std::string(obj, obj + N), s);
-    }
-    // ========================================================================
-    /** the specialization for C-string, a'la python tuple
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhenf.nl
-     *  @date 2009-10-05
-     */
-    template <unsigned int N>
-    std::ostream& toStream(const char (&obj)[N], std::ostream& s) {
-      return toStream(std::string(obj, obj + N), s);
-    }
-    // ========================================================================
-    /** the specialization for C-string, a'la python tuple
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhenf.nl
-     *  @date 2009-10-05
-     */
-    inline std::ostream& toStream(const char* obj, std::ostream& s) {
-      return toStream(std::string(obj), s);
-    }
-    // ========================================================================
-    /** the generic implementation of the printout to the std::ostream
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     */
-    template <class TYPE>
-    inline std::ostream& toStream(const TYPE& obj, std::ostream& s) {
-      return s << obj;
-    }
-    // ========================================================================
-    /** the helper function to print the sequence
-     *  @param first (INPUT)  begin-iterator for the sequence
-     *  @param last  (INPUT)  end-iterator for the sequence
-     *  @param s     (UPDATE) the stream itself
-     *  @param open  (INPUT)  "open"-symbol
-     *  @param close (INPUT)  "close"-symbol
-     *  @param delim (INPUT)  "delimiter"-symbol
-     *  @return the stream
-     *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
-     *  @date 2009-09-15
-     */
-    template <class ITERATOR>
-    inline std::ostream& toStream(ITERATOR first,     // begin of the sequence
-        ITERATOR last,                                //   end of the sequence
-        std::ostream& s,                              //            the stream
-        const std::string& open,                      //               opening
-        const std::string& close,                     //               closing
-        const std::string& delim)                     //             delimiter
-        {
-      s << open;
-      for (ITERATOR curr = first; curr != last; ++curr) {
-        if (first != curr) {
-          s << delim;
-        }
-        toStream(*curr, s);
-      }
-      s << close;
-      //
-      return s;
-    }
-    // ========================================================================
-    /** the generic implementation of the type conversion to the string
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-05-12
-     *  @see DD4hep::Utils::toStream
-     *  @todo need to be compared with boost::lexical_cast
-     */
-    template <class TYPE>
-    inline std::string toString(const TYPE& obj) {
-      std::ostringstream s;
-      std::ios::fmtflags orig_flags = s.flags();
-      s.setf(std::ios::showpoint);   // to display correctly floats
-      toStream(obj, s);
-      s.flags(orig_flags);
-      return s.str();
-    }
-    // ============================================================================
-    /// print XYZ point 
-    std::ostream& toStream(const ROOT::Math::XYZPoint& obj, std::ostream& s);
-    // print XYZ-vector
-    std::ostream& toStream(const ROOT::Math::XYZVector& obj, std::ostream& s);
-    /// print Lorentz vector  
-    std::ostream& toStream(const ROOT::Math::PxPyPzEVector& obj, std::ostream& s);
-
-  // ========================================================================
-  }//                                            end of namespace DD4hep::Utils
-// ==========================================================================
-}//                                                     end of namespace DD4hep
-// ============================================================================
-// The END
-// ============================================================================
-#endif
-// ============================================================================
-
diff --git a/DDG4/parsers/Grammars.h b/DDG4/parsers/Grammars.h
deleted file mode 100644
index 37513082b..000000000
--- a/DDG4/parsers/Grammars.h
+++ /dev/null
@@ -1,530 +0,0 @@
-// ============================================================================
-#ifndef DD4HEPKERNEL_GRAMMARS_H
-#define DD4HEPKERNEL_GRAMMARS_H 1
-#ifdef __GNUC__
-#warning \
-  The headers Grammars.h and Parsers.icpp are deprecated \
-  and will be removed from the next release of Gaudi. You should migrate your \
-  code the new pasers based on Boost.Spirit 2.
-#endif
-// ============================================================================
-// Include files
-// ============================================================================
-// STD & STL
-// ============================================================================
-#include <cctype>
-// ============================================================================
-// Boost.Spirit
-// ============================================================================
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 103800
-// FIXME: Move to the new boost::spirit::classic namespace
-#if !defined(BOOST_SPIRIT_USE_OLD_NAMESPACE)
-#define BOOST_SPIRIT_USE_OLD_NAMESPACE
-#endif
-#include <boost/spirit/include/classic.hpp>
-#include <boost/spirit/include/phoenix1.hpp>
-#else
-#include <boost/spirit.hpp>
-#include <boost/spirit/phoenix.hpp>
-#endif
-#include <boost/bind.hpp>
-
-// ============================================================================
-/** @file
- *  Collection of grammars for property types
- *
- *  @see Dd4hep::Parsers::parse
- *  @see Property
- *
- *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
- *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
- *  @date 2006-05-12
- */
-// ============================================================================
-namespace DD4hep
-{
-  namespace Parsers
-  {
-    // ========================================================================
-    using namespace boost::spirit ;
-    // ========================================================================
-    using namespace phoenix ;
-    // ========================================================================
-    /** @struct ClosureGrammar
-     *  Grammar or grammar rule which derive from this struct will have
-     *  attribute of type <c>T</c> and name <c>val</c>
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-   template <typename T>
-    struct ClosureGrammar : public boost::spirit::closure < ClosureGrammar<T>,T >
-    {
-      typedef  boost::spirit::closure<ClosureGrammar, T> closure;
-      typename closure::member1 val;
-    };
-    // ========================================================================
-    /** @struct AttributesClosureGrammar
-     *
-     *  Grammar or grammar rule which derive from this struct will have
-     *  two attributes: type <c>T1</c> and name <c>val</c>, type <c>T2</c>
-     *  and name <c>attrs</c>
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    template <typename T1,typename T2>
-    struct AttributesClosureGrammar
-      : public boost::spirit::closure<AttributesClosureGrammar<T1,T2>,T1,T2>
-    {
-      typedef boost::spirit::closure<AttributesClosureGrammar, T1,T2> closure;
-      typename closure::member1 val;
-      typename closure::member2 attrs;
-    };
-    // ========================================================================
-    /** @class BoolGrammar
-     *
-     *  The valid represenation of boolean values are:
-     *
-     *   - true  , True  , TRUE  or 1
-     *   - false , False , FALSE or 0
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    class BoolGrammar : public grammar
-    <
-      BoolGrammar,
-      ClosureGrammar<bool>::context_t
-    >
-    {
-    public:
-      typedef bool ResultT;
-    public:
-      template <typename ScannerT>
-      struct definition
-      {
-        definition( BoolGrammar const &self)
-        {
-          boolean_literal
-            = true_literal[self.val = true] | false_literal[self.val = false];
-          true_literal
-            = str_p("true" ) | str_p("True" ) | str_p("TRUE" ) | str_p("1");
-          false_literal
-            = str_p("false") | str_p("False") | str_p("FALSE") | str_p("0");
-        }
-        rule<ScannerT> const& start() const
-        { return boolean_literal;}
-        rule<ScannerT> boolean_literal,true_literal,false_literal;
-      };
-    };
-    // ========================================================================
-    /** @class CharGrammar
-     *
-     *  The valid represenation of char values are:
-     *
-     *   - 'a', 'b','\''
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    template<typename RT=char>
-    class CharGrammar : public grammar
-    <
-      CharGrammar<RT> , typename ClosureGrammar<RT>::context_t
-    >
-    {
-    public:
-      typedef RT ResultT;
-    public:
-      template <typename ScannerT>
-      struct definition
-      {
-        definition( CharGrammar<RT> const &self)
-        {
-          char_literal
-            = int_parser<RT>()[self.val=arg1]
-            | ('\''
-               >> ( str_p("\\'")[self.val='\'']
-                    | (anychar_p[self.val=arg1]-'\'') )>>'\'');
-        }
-        rule<ScannerT> const& start() const
-        { return char_literal; }
-        rule<ScannerT> char_literal;
-      };
-    };
-    // ========================================================================
-    /** @class IntGrammar
-     *
-     *  The valid representation of integers values are:
-     *
-     *   - 1, 100, 123
-     *
-     *  @todo implement suffixes u U l L
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    template<typename RT=int>
-    class IntGrammar : public grammar
-    <
-      IntGrammar<RT>,
-      typename ClosureGrammar<RT>::context_t
-    >
-    {
-    public:
-      typedef RT ResultT;
-    public:
-      template <typename ScannerT>
-      struct definition
-      {
-        definition( IntGrammar<RT> const &self)
-        {
-          int_literal = lexeme_d[int_parser<RT>()[self.val=arg1]
-            >> !(ch_p('u') | ch_p('U') | ch_p('l') | ch_p('L'))];
-        }
-        rule<ScannerT> const& start() const { return int_literal; }
-        rule<ScannerT> int_literal;
-      };
-    };
-    // ========================================================================
-    /** @class RealGrammar
-     *
-     *  The valid represenation of real values are:
-     *
-     *   - 1, 1.0 ,1.123, 1E+2, 0.5e-2
-     *
-     *  @todo implement suffixes f l F L
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    template<typename RT=double>
-    class RealGrammar : public grammar
-    <
-      RealGrammar<RT>,typename ClosureGrammar<RT>::context_t
-    >
-    {
-    public:
-      typedef RT ResultT;
-    public:
-      template <typename ScannerT>
-      struct definition
-      {
-        definition( RealGrammar const &self)
-        {
-          real_literal
-            = lexeme_d[real_parser<RT,
-            real_parser_policies<RT> >()[self.val = arg1]
-            >> !(ch_p('f') | ch_p('F') | ch_p('l') | ch_p('L'))];
-        }
-        rule<ScannerT> const& start() const
-        { return real_literal; }
-        rule<ScannerT> real_literal;
-      };
-    };
-    // ========================================================================
-    /** @class StringGrammar
-     *
-     *  The valid represenation of string values are:
-     *
-     *   - "abc" , "\"abc\""
-     *   - 'abs' , '\'abc\''
-     *
-     *  @todo implement not ASCII chars in strings
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-
-    class StringGrammar : public grammar
-    <
-      StringGrammar, ClosureGrammar<std::string>::context_t
-    >
-    {
-    public:
-      typedef std::string ResultT;
-      /** remove CR/LF symbols form the parsed strings
-       *  @attention it is a bit dangerous operation
-       *  The operation allows to write "very long" input strings
-       *  for opts-files (it is actual e.g. for DataOnDemandSvc configuration)
-       *  by splitting the strings into few lines
-       *  All new-line symbols (as well as '\n', '\t', CR/LF etc
-       *  are substituted by ordinary blanks.
-       */
-      void matchString() const
-      {
-        for ( std::string::iterator cur=this->val().begin();
-              cur!=this->val().end();cur++)
-        { if(std::isspace(*cur) ) { *cur = ' '; } }
-      }
-    public:
-        template <typename ScannerT>
-        struct definition
-        {
-          definition( StringGrammar const &self )
-          {
-            string_literal = (lexeme_d
-              [
-               ('"' >> (*( str_p("\\\"")
-                           |
-                           (anychar_p-'"') ))
-                [self.val = construct_<std::string>
-                 (arg1,arg2)] >>
-                '"')
-               |
-               ('\'' >> (*( str_p("\\'")
-                            |
-                            (anychar_p-'\'') ))
-                [self.val = construct_<std::string>
-                 (arg1,arg2)]>>
-                '\'')])[boost::bind(&StringGrammar::matchString,&self)];
-          }
-          rule<ScannerT> const& start() const { return string_literal; }
-          rule<ScannerT> string_literal;
-        };
-      };
-    // ========================================================================
-    /** @class SkipperGrammar
-     *
-     *  Skipping spaces and comments. Comments can be
-     *
-     *   - // ... - one line
-     *   - \/\* ... \*\/ - multiline
-     *
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    class SkipperGrammar : public grammar<SkipperGrammar>
-    {
-    public:
-      /** Constructor
-       *  @param skipnewline Skip new line symbols or not
-       */
-      SkipperGrammar ( const bool skipnewline = true )
-        : m_skipnewline(skipnewline){}
-    public:
-      /// @return true - skip new line symbols, false - not skip
-      bool skipnewline() const{return m_skipnewline;}
-    public:
-      template <typename ScannerT>
-      struct definition
-      {
-        definition( SkipperGrammar const& self)
-        {
-          if ( self.skipnewline() )
-          {
-            skip
-              =   space_p
-              |   comment_p("//")     // C++ comment
-              |   comment_p("/*", "*/")     // C comment
-              ;
-          }
-          else
-          {
-            skip
-              =   (space_p-eol_p)
-              |   comment_p("//")     // C++ comment
-              |   comment_p("/*", "*/")     // C comment
-              ;
-          }
-        }
-        rule<ScannerT>  skip;
-        rule<ScannerT> const& start() const { return skip; }
-      };
-    private:
-      bool m_skipnewline;
-    };
-    // ========================================================================
-    /** @class PairGrammar
-     *
-     *  The valid represenation of pairs are:
-     *  ("abc",123) or ("abc","def")
-     *  Inner types of pair depends on KeyGrammarT and ValueGrammarT grammars
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    template <typename KeyGrammarT, typename ValueGrammarT>
-    class PairGrammar : public grammar
-    <
-      PairGrammar<KeyGrammarT,ValueGrammarT>,
-      typename ClosureGrammar<
-      std::pair<typename KeyGrammarT::ResultT,
-                typename ValueGrammarT::ResultT> >::context_t
-    >
-    {
-    public:
-      typedef typename KeyGrammarT::ResultT KeyT;
-      typedef typename ValueGrammarT::ResultT ValueT;
-      typedef std::pair<KeyT,ValueT> ResultT;
-    public:
-      /** Constructor
-       *  @param delim Delimiter for pair values
-       */
-      PairGrammar ( const std::string&  delim = "," )
-        : m_delim(delim) {}
-    public:
-      /// callback. Action when we match first value
-      void matchFirst  ( const KeyT&   first  ) const { this->val().first = first; }
-      /// callback. Action when we match second value
-      void matchSecond ( const ValueT& second ) const { this->val().second = second; }
-    public:
-      template <typename ScannerT>
-      struct definition
-      {
-        definition( PairGrammar const &self)
-        {
-          para
-            = (
-               str_p("(")
-               >> (grkey[boost::bind(&PairGrammar::matchFirst,&self,_1)])
-               >> self.delim().c_str()
-               >> (grvalue[boost::bind(&PairGrammar::matchSecond,&self,_1)])
-               >> str_p(")")
-               ) ;
-        }
-        rule<ScannerT> const& start() const { return para; }
-        rule<ScannerT> para;
-        KeyGrammarT grkey;
-        ValueGrammarT grvalue;
-      };
-    public:
-      /// @return Delimiter for pair values
-      const std::string& delim() const { return m_delim ; }
-      /** Set delimiters for pair values
-       *  @param delim Delimiter
-       */
-      void setDelim ( const std::string& delim ) { m_delim = delim;}
-    private:
-      std::string m_delim;
-    };
-    // ========================================================================
-    /** @class VectorGrammar
-     *
-     *  The valid represenation of vector are:
-     *   - {"abc","defj","i"} or {1,2,3,4,5}
-     *   - ["abc","defj","i"] or [1,2,3,4,5]
-     *  Inner type depends on GrammarT grammar
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    template <typename GrammarT>
-    class VectorGrammar : public grammar
-    <
-      VectorGrammar<GrammarT> ,
-      typename ClosureGrammar<std::vector<typename GrammarT::ResultT> >::context_t
-    >
-    {
-    public:
-      typedef typename GrammarT::ResultT ValueT;
-      typedef std::vector<ValueT> ResultT;
-      typedef VectorGrammar<GrammarT> SelfT;
-    public:
-      /// callback. Action when we match inner value
-      void matchItem(const ValueT& value) const { this->val().push_back(value); }
-    public:
-      template <typename ScannerT>
-      struct definition
-      {
-        definition(SelfT const &self)
-        {
-          inner =
-            !(gr[boost::bind(&VectorGrammar::matchItem,&self,_1)]
-              >> *(','>>gr[boost::bind(&VectorGrammar::matchItem,&self,_1)]));
-          vec =
-            '[' >> inner >> ']' |  // a'la python list
-            '(' >> inner >> ')' |  // a'la python tuple
-            '{' >> inner >> '}' ;  // like obsolete list from opts-grammar
-        }
-        rule<ScannerT> const& start() const { return vec; }
-        rule<ScannerT> vec,inner;
-        GrammarT gr;
-      };
-    };
-    // ========================================================================
-    /** @class MapGrammar
-     *
-     *  The valid represenation of map are:
-     *   - {"file1":"path1","something":"nothing"}
-     *   - {"file1"="path1","something"="nothing"}
-     *   - ["file1":10,"something":20]
-     *   - ["file1"=30,"something"=40]
-     *  Inner key type depends on KeyGrammarT grammar
-     *  Inner value type depends on ValueGrammarT grammar
-     *
-     *  @author Alexander MAZUROV Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV  ibelyaev@physics.syr.edu
-     *  @date 2006-05-14
-     */
-    template <typename KeyGrammarT, typename ValueGrammarT>
-    class MapGrammar : public grammar
-    <
-      MapGrammar<KeyGrammarT,ValueGrammarT>,
-      typename AttributesClosureGrammar
-      < std::map<typename KeyGrammarT::ResultT,
-                 typename ValueGrammarT::ResultT>,
-        std::pair<typename KeyGrammarT::ResultT,
-                  typename ValueGrammarT::ResultT> >::context_t
-    >
-    {
-    public:
-      typedef typename KeyGrammarT::ResultT KeyT;
-      typedef typename ValueGrammarT::ResultT ValueT;
-      typedef std::map<KeyT,ValueT> ResultT;
-    public:
-      /// call backs. Action when we match pair in map
-      void matchItem  () const
-      {
-        //this->val().insert(this->attrs());
-        this->val()[this->attrs().first] = this->attrs().second ;
-      }
-      /// call backs. Action when we match key of pair
-      void matchFirst ( const KeyT&   value ) const {  this->attrs().first = value ; }
-      /// call backs. Action when we match value pf pair
-      void matchSecond( const ValueT& value ) const { this->attrs().second = value ; }
-    public:
-      template <typename ScannerT>
-      struct definition
-      {
-        definition( MapGrammar const &self)
-        {
-          vec
-            = ('{'>> inner_list >> '}') | ('['>>inner_list>>']');
-          inner_list
-            =
-            !( inner[boost::bind(&MapGrammar::matchItem,&self)]
-               >> *( ch_p(',') >>
-                     inner[boost::bind(&MapGrammar::matchItem,&self)] )
-               );
-          inner
-            =
-            grKey[boost ::bind(&MapGrammar::matchFirst,&self,_1)]
-              >> ( ch_p('=') | ch_p(':'))
-              >> grValue[boost::bind(&MapGrammar::matchSecond,&self,_1)] ;
-        }
-        KeyGrammarT grKey;
-        ValueGrammarT grValue;
-        rule<ScannerT> const& start() const { return vec; }
-        rule<ScannerT> vec,inner, inner_list ;
-      };
-    };
-    // ========================================================================
-  } // end of namespace Dd4hep::Parsers
-} // end of namespace Dd4hep
-// ============================================================================
-// The END
-// ============================================================================
-#endif // DD4HEPKERNEL_GRAMMARS_H
-// ============================================================================
diff --git a/DDG4/parsers/GrammarsV2.h b/DDG4/parsers/GrammarsV2.h
deleted file mode 100644
index d9b3f3c48..000000000
--- a/DDG4/parsers/GrammarsV2.h
+++ /dev/null
@@ -1,471 +0,0 @@
-// ============================================================================
-#ifndef DD4HEPKERNEL_GRAMMARSV2_H
-#define DD4HEPKERNEL_GRAMMARSV2_H 1
-#ifdef __GNUC__
-#pragma GCC system_header
-#endif
-// ============================================================================
-// Include files
-// ============================================================================
-// STD:
-//==============================================================================
-#include <string>
-#include <vector>
-#include <list>
-#include <set>
-#include <map>
-//==============================================================================
-// Boost:
-//==============================================================================
-#include <boost/spirit/include/qi.hpp>
-#include <boost/fusion/include/unused.hpp>
-#include <boost/fusion/include/std_pair.hpp>
-
-#include <boost/spirit/include/phoenix_core.hpp>
-#include <boost/spirit/include/phoenix_operator.hpp>
-
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits.hpp>
-
-#include <boost/spirit/repository/include/qi_confix.hpp>
-
-#include "Math/Point3D.h"
-#include "Math/Vector3D.h"
-#include "Math/Vector4D.h"
-
-//==============================================================================
-namespace DD4hep {  namespace Parsers {
-    //==============================================================================
-    // Namespace aliases:
-    //==============================================================================
-    namespace sp    = boost::spirit;
-    namespace ph    = boost::phoenix;
-    namespace qi    = sp::qi;
-    namespace enc   = sp::ascii;
-    namespace rep  = sp::repository;
-
-    template <typename T> T evaluate_string(const std::string& value);
-
-    //==============================================================================
-    // Grammars
-    //==============================================================================
-    typedef std::string::const_iterator DefaultIterator;
-    typedef enc::space_type DefaultSkipper;
-    //==============================================================================
-    template <typename Iterator, typename T,  typename Skipper, class Enable=void>
-      struct Grammar_ {
-	/* READ THIS IF YOUR COMPILE BREAKS ON THE FOLLOWING LINE
-	 *
-	 * To users: You have to ask developers to implement parser for your type T
-	 * To developer: You have to implement and register Grammar for type T
-	 *
-	 */
-	BOOST_MPL_ASSERT_MSG(false, GRAMMAR_FOR_TYPE_DOES_NOT_EXISTS, (T));
-      };
-
-#define REGISTER_GRAMMAR(ResultType, GrammarName)	\
-    template <typename Iterator, typename Skipper>	\
-      struct Grammar_<Iterator, ResultType, Skipper>	\
-      {							\
-        typedef GrammarName<Iterator, Skipper> Grammar;	\
-      }
-    //==============================================================================
-    template< typename Iterator> struct SkipperGrammar  : qi::grammar<Iterator>
-      {
-      SkipperGrammar() : SkipperGrammar::base_type(comments) {
-	  comments = enc::space | rep::confix("/*", "*/")[*(qi::char_ - "*/")]
-	    |
-	    rep::confix("//", (sp::eol | sp::eoi))[*(qi::char_ - (sp::eol|sp::eoi))];
-	}
-	qi::rule<Iterator> comments;
-      };
-    //==============================================================================
-    template< typename Iterator, typename Skipper>
-      struct StringGrammar : qi::grammar<Iterator, std::string(), qi::locals<char>,Skipper>
-      {
-	//------------------------------------------------------------------------------
-	typedef std::string ResultT;
-	//------------------------------------------------------------------------------
-      StringGrammar() : StringGrammar::base_type( str ) {
-	  begin_quote   = enc::char_("\"'");
-	  quote     = enc::char_(qi::_r1);
-
-	  str = qi::lexeme[begin_quote[qi::_a = qi::_1]
-			   > *( (enc::char_('\\') >> quote(qi::_a))[qi::_val += qi::_a]
-				| (enc::char_[qi::_val += qi::_1] - quote(qi::_a))) >
-			   quote(qi::_a)]
-	    ;
-	}
-	//------------------------------------------------------------------------------
-	qi::rule<Iterator, std::string(), qi::locals<char>, Skipper> str;
-	qi::rule<Iterator, char()> begin_quote;
-	qi::rule<Iterator, void(char)> quote;
-	//------------------------------------------------------------------------------
-      };
-    REGISTER_GRAMMAR(std::string, StringGrammar);
-    //==============================================================================
-    template< typename Iterator, typename Skipper>
-      struct CharGrammar : qi::grammar<Iterator, char(), Skipper>  {
-      typedef char ResultT;
-    CharGrammar() : CharGrammar::base_type( ch ) {
-	ch = qi::int_parser<char>()
-	  |
-	  '\'' >> (qi::char_-'\'') >> '\'';
-      }
-      qi::rule<Iterator, char(), Skipper> ch;
-    };
-    REGISTER_GRAMMAR(char, CharGrammar);
-    //==============================================================================
-    template< typename Iterator, typename Skipper>
-      struct BoolGrammar : qi::grammar<Iterator, bool(), Skipper>
-      {
-	typedef bool ResultT;
-      BoolGrammar() : BoolGrammar::base_type( boolean_literal ) {
-	  boolean_literal =
-            (qi::lit("true") | "True" | "TRUE" | "1")[qi::_val=true]
-            |
-            (qi::lit("false") | "False" | "FALSE" | "0")[qi::_val=false];
-	}
-	qi::rule<Iterator, bool(), Skipper> boolean_literal;
-      };
-    REGISTER_GRAMMAR(bool, BoolGrammar);
-    //==============================================================================
-    template< typename Iterator, typename RT , typename Skipper>
-      struct IntGrammar : qi::grammar<Iterator, RT(), Skipper>      {
-	typedef RT ResultT;
-      IntGrammar() : IntGrammar::base_type( integer ) {
-	  integer = qi::int_parser<RT>()[qi::_val = qi::_1] 
-            >> -qi::no_case[qi::char_('L')];
-	}
-	qi::rule<Iterator, RT(), Skipper> integer;
-      };
-    // ----------------------------------------------------------------------------
-    // Register IntGrammar:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename T, typename Skipper>
-      struct Grammar_<Iterator, T,  Skipper,
-      typename boost::enable_if<boost::is_integral<T> >::type>
-	{
-	  typedef IntGrammar<Iterator, T, Skipper> Grammar;
-	};
-    //==============================================================================
-    template< typename Iterator, typename RT, typename Skipper>
-      struct RealGrammar : qi::grammar<Iterator, RT(), Skipper>  {
-	typedef RT ResultT;
-      RealGrammar() : RealGrammar::base_type(real) {
-	  real = qi::real_parser<RT>();
-	}
-	qi::rule<Iterator, RT(), Skipper> real;
-      };
-    // ----------------------------------------------------------------------------
-    // Register RealGrammar:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename T, typename Skipper >
-      struct Grammar_<Iterator, T, Skipper,
-      typename boost::enable_if<boost::is_floating_point<T> >::type >	{
-	  typedef RealGrammar<Iterator, T, Skipper> Grammar;
-	};
-    //==============================================================================
-    template< typename Iterator, typename VectorT, typename Skipper>
-      struct VectorGrammar : qi::grammar<Iterator, VectorT(), qi::locals<char>,Skipper>
-      {
-	//------------------------------------------------------------------------------
-	typedef VectorT ResultT;
-	//------------------------------------------------------------------------------
-      VectorGrammar() : VectorGrammar::base_type(vec) {
-	  begin = enc::char_('[')[qi::_val=']'] | enc::char_('{')[qi::_val='}']
-	    | enc::char_('(')[qi::_val=')'];
-	  end = enc::char_(qi::_r1);
-	  list = elementGrammar % ',';
-	  vec = begin[qi::_a = qi::_1] >> -list[qi::_val=qi::_1] >> end(qi::_a);
-	}
-	// ----------------------------------------------------------------------------
-	typename
-	  Grammar_<Iterator, typename VectorT::value_type, Skipper>::Grammar
-	  elementGrammar;
-	qi::rule<Iterator, char()> begin;
-	qi::rule<Iterator, void(char)> end;
-
-	qi::rule<Iterator, ResultT(), qi::locals<char>,Skipper> vec;
-	qi::rule<Iterator, ResultT(), Skipper> list;
-	// ----------------------------------------------------------------------------
-      };
-    // ----------------------------------------------------------------------------
-    // Register VectorGrammar for std::vector:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator,typename InnerT,typename AllocatorT,typename Skipper>
-      struct Grammar_<Iterator, std::vector<InnerT, AllocatorT>, Skipper >    {
-      typedef
-	VectorGrammar<Iterator, std::vector<InnerT, AllocatorT>,Skipper>
-	Grammar;
-    };
-    // ----------------------------------------------------------------------------
-    // Register VectorGrammar for std::list:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename InnerT, typename AllocatorT,typename Skipper>
-      struct Grammar_<Iterator, std::list<InnerT, AllocatorT>, Skipper >      {
-      typedef
-	VectorGrammar<Iterator, std::list<InnerT, AllocatorT>,Skipper>
-	Grammar;
-    };
-    // ----------------------------------------------------------------------------
-    // Register VectorGrammar for std::set:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename InnerT, typename CompareT,typename AllocatorT, typename Skipper>
-      struct Grammar_<Iterator, std::set<InnerT, CompareT, AllocatorT>, Skipper >      {
-      typedef
-	VectorGrammar<Iterator, std::set<InnerT, CompareT, AllocatorT>,Skipper>
-	Grammar;
-    };
-
-    //==============================================================================
-    template< typename Iterator, typename PairT, typename Skipper>
-      struct PairGrammar :
-      qi::grammar<Iterator,PairT(), qi::locals<char>, Skipper> {
-      //------------------------------------------------------------------------------
-      typedef PairT ResultT;
-      typedef typename PairT::first_type first_type;
-      typedef typename PairT::second_type second_type;
-      //------------------------------------------------------------------------------
-    PairGrammar() : PairGrammar::base_type(pair) {
-        init(",");
-      }
-
-    PairGrammar(const std::string& delimeter) : PairGrammar::base_type(pair) {
-        init(delimeter);
-      }
-      //------------------------------------------------------------------------------
-      struct first {};
-      struct second {};
-      void init(const std::string& delimeter) {
-	begin = enc::char_('(')[qi::_val=')']
-	  |
-	  enc::char_('[')[qi::_val=']'];
-	end =  qi::char_(qi::_r1);
-	pair = begin[qi::_a = qi::_1] >> pair_in[qi::_val = qi::_1] >> end(qi::_a);
-	pair_in =  key >> qi::lit(delimeter) >> value;
-      }
-      // ----------------------------------------------------------------------------
-      typename
-	Grammar_<Iterator, typename PairT::first_type, Skipper>::Grammar key;
-      typename
-	Grammar_<Iterator, typename PairT::second_type, Skipper>::Grammar
-	value;
-      qi::rule<Iterator, char()> begin;
-      qi::rule<Iterator, void(char)> end;
-      qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> pair;
-      qi::rule<Iterator, ResultT(), Skipper> pair_in;
-      //ph::function<Operations> op;
-      // ----------------------------------------------------------------------------
-    }; // END PairGrammar
-    // ----------------------------------------------------------------------------
-    // Register PairGrammar:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename KeyT, typename ValueT,
-      typename Skipper>
-      struct Grammar_<Iterator, std::pair<KeyT, ValueT>, Skipper >
-      {
-	typedef PairGrammar<Iterator, std::pair<KeyT, ValueT>, Skipper> Grammar;
-      };
-    // ============================================================================
-    template< typename Iterator, typename MapT, typename Skipper>
-      struct MapGrammar : qi::grammar<Iterator,MapT(), Skipper>      {
-      //------------------------------------------------------------------------------
-      typedef MapT ResultT;
-      typedef typename MapT::key_type KeyT;
-      typedef typename MapT::mapped_type MappedT;
-      typedef std::pair<KeyT, MappedT> PairT;
-
-      typedef std::vector<PairT> VectorPairT;
-      //------------------------------------------------------------------------------
-      struct tag_key{};
-      struct tag_mapped{};
-      struct Operations   {
-	template <typename A, typename B = boost::fusion::unused_type,
-	  typename C = boost::fusion::unused_type,
-	  typename D = boost::fusion::unused_type>
-	  struct result { typedef void type; };
-	//----------------------------------------------------------------------
-	void operator()(ResultT& res, const VectorPairT& vec) const{
-	  for(typename VectorPairT::const_iterator cur = vec.begin();
-	      cur != vec.end(); cur++){
-	    res.insert(*cur);
-	  }
-	}
-	void operator()(PairT& res, const KeyT& key, tag_key) const{
-	  res.first = key;
-	}
-	void operator()(PairT& res, const MappedT& value, tag_mapped) const{
-	  res.second = value;
-	}
-	//----------------------------------------------------------------------
-      };
-      //------------------------------------------------------------------------------
-    MapGrammar() : MapGrammar::base_type(map) {
-	pair = key[op(qi::_val,qi::_1, tag_key())] > (qi::lit(':') | '=')  >
-	  value[op(qi::_val,qi::_1, tag_mapped())];
-	list = -(pair % enc::char_(','));
-	map = (('['  >> list >> ']')
-	       | ('{'  >> list >> '}'))[op(qi::_val,qi::_1)];
-      }
-      // ----------------------------------------------------------------------------
-      typename
-	Grammar_<Iterator, typename MapT::key_type, Skipper>::Grammar key;
-      typename
-	Grammar_<Iterator, typename MapT::mapped_type, Skipper>::Grammar value;
-      qi::rule<Iterator, PairT(), Skipper> pair;
-      qi::rule<Iterator, VectorPairT(), Skipper> list;
-      qi::rule<Iterator, ResultT(), Skipper> map;
-      ph::function<Operations> op;
-      // ----------------------------------------------------------------------------
-    };
-    // ----------------------------------------------------------------------------
-    // Register MapGrammar for std::map:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename KeyT, typename ValueT,
-      typename KeyCompareT, typename AllocatorT, typename Skipper>
-      struct Grammar_<Iterator, std::map<KeyT, ValueT, KeyCompareT, AllocatorT>,
-      Skipper > {
-      typedef MapGrammar<Iterator,
-        std::map<KeyT, ValueT, KeyCompareT, AllocatorT>, Skipper> Grammar;
-    };
-
-    // ============================================================================
-    template< typename Iterator, typename Skipper>
-      struct KeyValueGrammar :
-      qi::grammar<Iterator, std::pair<std::string, std::string>(), Skipper> {
-      //------------------------------------------------------------------------------
-      typedef std::pair<std::string, std::string> ResultT;
-      //------------------------------------------------------------------------------
-      struct first {};
-      struct second {};
-
-    KeyValueGrammar() : KeyValueGrammar::base_type(pair) {
-	//------------------------------------------------------------------------------
-	pair =  gstring >> ":" >> +enc::char_;
-      }
-      // ----------------------------------------------------------------------------
-      StringGrammar<Iterator, Skipper> gstring;
-      qi::rule<Iterator, ResultT(), Skipper> pair;
-      // ----------------------------------------------------------------------------
-    }; // END KeyValueGrammar
-    // We don't register KeyalueGrammar because it's a special parser
-
-
-    // ============================================================================
-    template< typename Iterator, typename PointT, typename Skipper>
-      struct Pnt3DGrammar : qi::grammar<Iterator, PointT(), Skipper> {
-      typedef PointT ResultT;
-      typedef std::string Scalar;
-      // ----------------------------------------------------------------------------
-      struct Operations {
-        template <typename A, typename B = boost::fusion::unused_type,
-	  typename C = boost::fusion::unused_type,
-	  typename D = boost::fusion::unused_type>
-	  struct result { typedef void type; };
-        void operator()(ResultT& res, const Scalar& value,const char xyz) const{
-	  typename PointT::Scalar val = evaluate_string<typename PointT::Scalar>(value);
-	  switch(xyz)  {
-	  case 'x': res.SetX(val); break;
-	  case 'y': res.SetY(val); break;
-	  case 'z': res.SetZ(val); break;
-	  default: break;
-	  }
-        }
-      }; //  Operations
-      // ----------------------------------------------------------------------------
-    Pnt3DGrammar() : Pnt3DGrammar::base_type(point) {
-        point = list | ('(' >> list >> ')') | ('[' >> list >> ']');
-        list = -(enc::no_case[qi::lit("x") | qi::lit("px")]  >> ':')
-	  >> scalar[op(qi::_val,qi::_1,'x')] >>
-	  ',' >> -(enc::no_case[qi::lit("y") | qi::lit("py")] >> ':')
-	  >> scalar[op(qi::_val,qi::_1,'y')] >>
-	  ',' >> -(enc::no_case[qi::lit("z") | qi::lit("pz")] >> ':')
-	  >> scalar[op(qi::_val,qi::_1,'z')];
-      }
-      // ----------------------------------------------------------------------------
-      qi::rule<Iterator, ResultT(), Skipper> point, list;
-      typename Grammar_<Iterator, Scalar, Skipper>::Grammar scalar;
-      ph::function<Operations> op;
-      // ----------------------------------------------------------------------------
-    }; //   Pnt3DGrammar
-    // ----------------------------------------------------------------------------
-    // Register Pnt3DGrammar for ROOT::Math::PositionVector3D:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename T1, typename T2, typename Skipper>
-      struct Grammar_<Iterator, ROOT::Math::PositionVector3D<T1,T2>, Skipper>{
-      typedef Pnt3DGrammar<Iterator, ROOT::Math::PositionVector3D<T1,T2>, Skipper> Grammar;
-    };
-    // ----------------------------------------------------------------------------
-    // Register Pnt3DGrammar for ROOT::Math::DisplacementVector3D:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename T1, typename T2, typename Skipper>
-      struct Grammar_<Iterator, ROOT::Math::DisplacementVector3D<T1,T2>, Skipper>{
-      typedef Pnt3DGrammar<Iterator,ROOT::Math::DisplacementVector3D<T1,T2>, Skipper> Grammar;
-    };
-    // ============================================================================
-    template< typename Iterator, typename PointT, typename Skipper>
-      struct Pnt4DGrammar : qi::grammar<Iterator, PointT(), Skipper>   {
-      typedef PointT ResultT;
-      typedef std::string ScalarT;
-      //-----------------------------------------------------------------------------
-      struct Operations {
-	template <typename A, typename B = boost::fusion::unused_type,
-	  typename C = boost::fusion::unused_type,
-	  typename D = boost::fusion::unused_type>
-	  struct result { typedef void type; };
-
-	void operator()(ResultT& res, const ScalarT& value,const char xyz) const{
-	  typename PointT::Scalar val = evaluate_string<typename PointT::Scalar>(value);
-	  switch(xyz){
-	  case 'x': res.SetPx(val); break;
-	  case 'y': res.SetPy(val); break;
-	  case 'z': res.SetPz(val); break;
-	  case 'e': res.SetE(val);  break;
-	  default: break;
-	  }
-	}
-	void operator()(ResultT& res, const ResultT& xyz) const{
-	  res.SetPx(xyz.Px());
-	  res.SetPy(xyz.Py());
-	  res.SetPz(xyz.Pz());
-	}
-      }; //   Operations
-      // ----------------------------------------------------------------------------
-    Pnt4DGrammar() : Pnt4DGrammar::base_type(point4d) {
-	point4d = list4d | ('(' >> list4d >> ')') | ('[' >> list4d >> ']');
-	list4d = (point3d[op(qi::_val,qi::_1)] >> enc::char_(";,")
-		  >> e[op(qi::_val, qi::_1, 'e')])
-	  |
-	  (e[op(qi::_val,qi::_1, 'e')] >> enc::char_(";,")
-	   >> point3d[op(qi::_val, qi::_1)]);
-	e =  -(enc::no_case[enc::char_("te")]  >> ':')
-	  >> scalar[qi::_val = qi::_1];
-
-	point3d = list3d | ('(' >> list3d >> ')') | ('[' >> list3d >> ']');
-	list3d = -(enc::no_case[qi::lit("x") | qi::lit("px")]  >> ':')
-	  >> scalar[op(qi::_val, qi::_1,'x')] >>
-	  ',' >> -(enc::no_case[qi::lit("y") | qi::lit("py")] >> ':')
-	  >> scalar[op(qi::_val, qi::_1,'y')] >>
-	  ',' >> -(enc::no_case[qi::lit("z") | qi::lit("pz")] >> ':')
-	  >> scalar[op(qi::_val, qi::_1,'z')];
-      }
-      // ----------------------------------------------------------------------------
-      qi::rule<Iterator, ResultT(), Skipper> point3d, point4d, list3d,
-	list4d;
-      qi::rule<Iterator, ScalarT(), Skipper> e;
-      typename Grammar_<Iterator, ScalarT, Skipper>::Grammar scalar;
-      ph::function<Operations> op;
-      // ----------------------------------------------------------------------------
-    }; //   Pnt4DGrammar
-    // ----------------------------------------------------------------------------
-    // Register Pnt4DGrammar for ROOT::Math::LorentzVector:
-    // ----------------------------------------------------------------------------
-    template <typename Iterator, typename T1, typename Skipper>
-      struct Grammar_<Iterator, ROOT::Math::LorentzVector<T1>, Skipper >   {
-	typedef Pnt4DGrammar<Iterator, ROOT::Math::LorentzVector<T1>, Skipper> Grammar;
-      };
-    // ============================================================================
-  }} //   DD4hep::Parsers
-//============================================================================
-#endif
diff --git a/DDG4/parsers/Parsers.icpp b/DDG4/parsers/Parsers.icpp
deleted file mode 100644
index ec4ab1ef0..000000000
--- a/DDG4/parsers/Parsers.icpp
+++ /dev/null
@@ -1,232 +0,0 @@
-// $Id: Parsers.icpp,v 1.5 2008/10/28 14:02:18 marcocle Exp $
-// ============================================================================
-#ifndef DD4HEP_PARSERS_ICPP
-#define DD4HEP_PARSERS_ICPP 1
-// ============================================================================
-// Include files
-// ============================================================================
-// STD&STL
-// ============================================================================
-#include <vector>
-#include <map>
-#include <string>
-// ============================================================================
-// Boost.Bind
-// ============================================================================
-#include "boost/bind.hpp"
-// ============================================================================
-// Boost.Spirit, Boost.Spirit.Phoenix
-// ============================================================================
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 103800
-// FIXME: Move to the new boost::spirit::classic namespace
-#if !defined(BOOST_SPIRIT_USE_OLD_NAMESPACE)
-#define BOOST_SPIRIT_USE_OLD_NAMESPACE
-#endif
-#include <boost/spirit/include/classic.hpp>
-#include <boost/spirit/include/phoenix1.hpp>
-#else
-#include <boost/spirit.hpp>
-#include <boost/spirit/phoenix.hpp>
-#endif
-// ============================================================================
-// DD4hepKernel
-// ============================================================================
-#include "DDG4/Parsers.h"
-#include "Grammars.h"
-// ============================================================================
-/** @file
- *
- *  Helper inline functions for implementation of real parsing function
- *  from the namespace DD4hep::Parsers
- *
- *  For adding new type you should have only grammar class which recognize
- *  this type. Then by combining this grammar with such already implemented
- *  grammars  like VectorGrammar, MapGrammar, PairGrammar you can very simply
- *  implement container types which will work with your type.
- *
- *  If you want your type can be handled in property file - see ValueGrammar
- *  in JobOptionsSvc which lays in DD4hepCoreSvc.
- *
- *  @author Alexander MAZUROV  Alexander.Mazurov@gmail.com
- *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
- *  @date   2006-05-12
- */
-// ============================================================================
-namespace DD4hep   {
-  namespace Parsers  {
-    using namespace std;
-    using namespace boost::spirit ;
-
-    /// the actual type of position iterator
-    typedef boost::spirit::position_iterator<string::const_iterator> IteratorT;
-
-    /// create the position iterator from the input
-    inline IteratorT createIterator( const std::string& input)
-    { return IteratorT ( input.begin(), input.end() ) ; }
-
-    // ========================================================================
-    /** helper function to "merge" the implementation of all parsers
-     *  for integer-like quantities into one templated grammar
-     *  @see DD4hep::Parsers::IntGrammar
-     *
-     *  @param result (output) parsing result
-     *  @param input  (input) string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV  Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2006-05-12
-     */
-    // ========================================================================
-    template<typename IntegerT>
-    inline StatusCode parse_integer
-    (IntegerT& result,const string& input)
-    {
-      IntGrammar<IntegerT> g;
-      return parse
-        ( createIterator(input),
-          IteratorT(),
-          g[var(result)=arg1]).full;
-    }
-    // ========================================================================
-    /** helper function to "merge" the implementation of all parsers
-     *  for vector of integer-like quantities
-     *  into the combination of templated grammars
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::IntGrammar
-     *  @see DD4hep::Parsers::SkipperGrammar
-     *
-     *  @param result (output) parsing result
-     *  @param input  (input) string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV  Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2006-05-12
-     */
-    // ========================================================================
-    template<typename IntegerT>
-    inline  StatusCode parse_integer_vector
-    ( std::vector<IntegerT>& result,const string& input)
-    {
-      VectorGrammar<IntGrammar<IntegerT> > g;
-      return parse
-        ( createIterator(input),
-          IteratorT(),
-          g[var(result)=arg1],
-          SkipperGrammar()).full;
-    }
-    // ========================================================================
-    /** helper function to "merge" the implementation of all parsers
-     *  for "char-like" quantities into one templated grammar
-     *  @see DD4hep::Parsers::CharGrammar
-     *
-     *  @param result (output) parsing result
-     *  @param input  (input) string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV  Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2006-05-12
-     */
-    // ========================================================================
-    template<typename CharT>
-    inline StatusCode  parse_char
-    ( CharT& result , const string& input )
-    {
-      CharGrammar<CharT> g;
-      return parse
-        ( createIterator(input),
-          IteratorT(),
-          g[var(result)=arg1]).full;
-    }
-    // ========================================================================
-    /** helper function to "merge" the implementation of all parsers
-     *  for vector of 'char-like' quantities
-     *  into the combination of templated grammars
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::CharGrammar
-     *  @see DD4hep::Parsers::SkipperGrammar
-     *
-     *  @param result (output) parsing result
-     *  @param input  (input) string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV  Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2006-05-12
-     */
-    // ========================================================================
-    template<typename CharT>
-    inline StatusCode parse_char_vector
-    (std::vector<CharT>& result,const string& input)
-    {
-      VectorGrammar<CharGrammar<CharT> > g;
-      return parse
-        ( createIterator(input),
-          IteratorT(),
-          g[var(result)=arg1],
-          SkipperGrammar()).full;
-    }
-    // ========================================================================
-    /** helper function to "merge" the implementation of all parsers
-     *  for "float-like" quantities into one templated grammar
-     *  @see DD4hep::Parsers::RealGrammar
-     *
-     *  @param result (output) parsing result
-     *  @param input  (input) string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV  Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2006-05-12
-     */
-    template<typename RealT>
-    inline StatusCode parse_real
-    ( RealT& result , const string& input)
-    {
-      RealGrammar<RealT> g;
-      return parse
-        ( createIterator(input),
-          IteratorT(),
-          g[var(result)=arg1],
-          SkipperGrammar()).full;
-    }
-    // ========================================================================
-    /** helper function to "merge" the implementation of all parsers
-     *  for vector of 'char-like' quantities
-     *  into the combination of templated grammars
-     *  @see DD4hep::Parsers::VectorGrammar
-     *  @see DD4hep::Parsers::RealGrammar
-     *  @see DD4hep::Parsers::SkipperGrammar
-     *
-     *  @param result (output) parsing result
-     *  @param input  (input) string to be parsed
-     *  @return status code
-     *
-     *  @author Alexander MAZUROV  Alexander.Mazurov@gmail.com
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2006-05-12
-     */
-    // ========================================================================
-    template<typename RealT>
-    StatusCode parse_real_vector
-    ( std::vector<RealT>& result,const string& input)
-    {
-      VectorGrammar< RealGrammar<RealT> > g;
-      return parse
-        ( createIterator(input),
-          IteratorT(),
-          g[var(result)=arg1],
-          SkipperGrammar()).full;
-    }
-  } // end of namespace Parsers
-} // end of namespace DD4hep
-// ============================================================================
-#endif
-// ============================================================================
-// The END
-// ============================================================================
-
-
diff --git a/DDG4/parsers/ParsersFactory.h b/DDG4/parsers/ParsersFactory.h
deleted file mode 100644
index b0b936b0b..000000000
--- a/DDG4/parsers/ParsersFactory.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// ============================================================================
-#ifndef DD4HEPPROPERTYPARSERS_PARSERSGENERATOR_H
-#define DD4HEPPROPERTYPARSERS_PARSERSGENERATOR_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// STD & STL
-// ============================================================================
-#include <string>
-#include <vector>
-#include <map>
-// ============================================================================
-// Boost:
-// ============================================================================
-#include <boost/mpl/assert.hpp>
-#include <boost/type_traits.hpp>
-// ============================================================================
-// DD4hep
-// ============================================================================
-#include "GrammarsV2.h"
-// ============================================================================
-namespace DD4hep  {
-  namespace Parsers {
-    // ========================================================================
-    typedef std::string::const_iterator IteratorT;
-    //typedef boost::spirit::ascii::space_type Skipper;
-    typedef SkipperGrammar<IteratorT> Skipper;
-    // ========================================================================
-    template<typename ResultT> inline int
-    parse_(ResultT& result, const std::string& input){
-      Skipper skipper;
-      typename Grammar_<IteratorT, ResultT, Skipper>::Grammar g;
-      IteratorT iter = input.begin(), end = input.end();
-      return qi::phrase_parse( iter, end, g, skipper , result) && (iter==end);
-    }
-    //=========================================================================
-    template<> inline int
-    parse_(std::string& result, const std::string& input){
-      Skipper skipper;
-      Grammar_<IteratorT, std::string, Skipper>::Grammar g;
-      IteratorT iter = input.begin(), end = input.end();
-      if (!(qi::phrase_parse( iter, end, g, skipper, result) && (iter==end))){
-        result = input;
-      }
-      //@attention always
-      return true;
-    }
-    //=========================================================================
-  }/* Parsers */
-} /*  DD4hep */
-//=============================================================================
-#endif // DD4HEPPROPERTYPARSERS_PARSERSGENERATOR_H
-
diff --git a/DDG4/parsers/ParsersObjects.cpp b/DDG4/parsers/ParsersObjects.cpp
deleted file mode 100644
index dc84c595e..000000000
--- a/DDG4/parsers/ParsersObjects.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// ============================================================================
-// Include files
-// ============================================================================
-#include "ParsersFactory.h"
-#include "DDG4/ToStream.h"
-
-using namespace std;
-
-// ============================================================================
-namespace DD4hep { 
-  namespace Parsers {
-    // ==========================================================================
-    template<typename T1, typename T2> inline int
-    parse_(ROOT::Math::PositionVector3D<T1,T2>& result, const string& input){
-      Skipper skipper;
-      typename Grammar_<IteratorT,ROOT::Math::PositionVector3D<T1,T2>,Skipper>::Grammar g;
-      IteratorT iter = input.begin(), end = input.end();
-      if (qi::phrase_parse( iter, end, g, skipper, result)){
-	return 1;
-      }
-      return 0;
-    }
-    // ==========================================================================
-    int parse(ROOT::Math::XYZPoint& result,const string& input) {
-      return parse_(result, input);
-    }
-    // ==========================================================================
-    /*  parse 3D-vector
-     *  @param result (output) the parsed vector
-     *  @param input  (input)  the input string
-     *  @return status code
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    int parse(ROOT::Math::XYZVector& result,const string& input) {
-      ROOT::Math::XYZPoint point;
-      int sc = parse(point,input);
-      if ( 0 == sc ){ return sc; }                               // RETURN
-      result = point;
-      return 1;
-    }
-    int parse(ROOT::Math::PxPyPzEVector& result, const string& input) {
-      return parse_(result, input);
-    }
-
-    // ==========================================================================
-    /*  parse the vector of points
-     *  @param resut (OUTPUT) the parser vector
-     *  @param input (INPIUT) the string to be parsed
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    // ==========================================================================
-    int parse(vector<ROOT::Math::XYZPoint>& result, const string&  input) {
-      result.clear();
-      return parse_(result, input);
-    }
-    // ==========================================================================
-    /*  parse the vector of vectors
-     *  @param resut (OUTPUT) the parser vector
-     *  @param input (INPIUT) the string to be parsed
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    // ==========================================================================
-    int parse(vector<ROOT::Math::XYZVector>& result, const string&  input) {
-      result.clear();
-      return parse_(result, input);
-    }
-    // ==========================================================================
-    /*  parse the vector of vectors
-     *  @param resut (OUTPUT) the parser vector
-     *  @param input (INPIUT) the string to be parsed
-     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date 2009-09-05
-     */
-    // ==========================================================================
-    int parse(vector<ROOT::Math::PxPyPzEVector>& result,const string& input)  {
-      result.clear();
-      return parse_(result, input);
-    }
-
-  }
-}
diff --git a/DDG4/parsers/ParsersStandardList1.cpp b/DDG4/parsers/ParsersStandardList1.cpp
deleted file mode 100644
index ad28873f7..000000000
--- a/DDG4/parsers/ParsersStandardList1.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "ParsersStandardListCommon.h"
-PARSERS_DEF_FOR_LIST(bool)
-PARSERS_DEF_FOR_LIST(char)
-PARSERS_DEF_FOR_LIST(unsigned char)
-PARSERS_DEF_FOR_LIST(signed char)
diff --git a/DDG4/parsers/ParsersStandardList2.cpp b/DDG4/parsers/ParsersStandardList2.cpp
deleted file mode 100644
index f32362c9b..000000000
--- a/DDG4/parsers/ParsersStandardList2.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "ParsersStandardListCommon.h"
-PARSERS_DEF_FOR_LIST(int)
-PARSERS_DEF_FOR_LIST(short)
-PARSERS_DEF_FOR_LIST(unsigned short)
-PARSERS_DEF_FOR_LIST(unsigned int)
diff --git a/DDG4/parsers/ParsersStandardList3.cpp b/DDG4/parsers/ParsersStandardList3.cpp
deleted file mode 100644
index f7e32e55d..000000000
--- a/DDG4/parsers/ParsersStandardList3.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "ParsersStandardListCommon.h"
-PARSERS_DEF_FOR_LIST(long)
-PARSERS_DEF_FOR_LIST(unsigned long)
-PARSERS_DEF_FOR_LIST(long long)
-PARSERS_DEF_FOR_LIST(unsigned long long)
diff --git a/DDG4/parsers/ParsersStandardList4.cpp b/DDG4/parsers/ParsersStandardList4.cpp
deleted file mode 100644
index 04d9c5150..000000000
--- a/DDG4/parsers/ParsersStandardList4.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "ParsersStandardListCommon.h"
-PARSERS_DEF_FOR_LIST(double)
-PARSERS_DEF_FOR_LIST(float)
-PARSERS_DEF_FOR_LIST(long double)
-PARSERS_DEF_FOR_LIST(std::string)
diff --git a/DDG4/parsers/ParsersStandardListCommon.h b/DDG4/parsers/ParsersStandardListCommon.h
deleted file mode 100644
index a169872b2..000000000
--- a/DDG4/parsers/ParsersStandardListCommon.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef PARSERS_STANDARD_LIST_COMMON_H
-#define PARSERS_STANDARD_LIST_COMMON_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-#include "DDG4/Parsers.h"
-#include "ParsersFactory.h"
-// ============================================================================
-#define PARSERS_DEF_FOR_LIST(InnerType)\
-    int DD4hep::Parsers::parse(std::vector<InnerType>& result,const std::string& input)\
-    {      return DD4hep::Parsers::parse_(result, input); }		\
-    int DD4hep::Parsers::parse(std::list<InnerType>& result,const std::string& input)\
-    {      return DD4hep::Parsers::parse_(result, input); }		\
-    int DD4hep::Parsers::parse(std::set<InnerType>& result,const std::string& input)\
-    {      return DD4hep::Parsers::parse_(result, input); }		\
-
-// ============================================================================
-#endif /* PARSERS_STANDARD_LIST_COMMON_H */
diff --git a/DDG4/parsers/ParsersStandardMisc1.cpp b/DDG4/parsers/ParsersStandardMisc1.cpp
deleted file mode 100644
index 8ae34a8c2..000000000
--- a/DDG4/parsers/ParsersStandardMisc1.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "ParsersStandardMiscCommon.h"
-
-int DD4hep::Parsers::parse(std::pair<double,double>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::pair<int, int>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::vector<std::pair<double, double> >& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::vector<std::pair<int, int> >& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::vector<std::vector<std::string> >& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
diff --git a/DDG4/parsers/ParsersStandardMisc2.cpp b/DDG4/parsers/ParsersStandardMisc2.cpp
deleted file mode 100644
index bb4ed696a..000000000
--- a/DDG4/parsers/ParsersStandardMisc2.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "ParsersStandardMiscCommon.h"
-
-int DD4hep::Parsers::parse(std::vector<std::vector<double> >& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::map<int, int>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::map<int, double>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::map<std::string, std::string>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
diff --git a/DDG4/parsers/ParsersStandardMisc3.cpp b/DDG4/parsers/ParsersStandardMisc3.cpp
deleted file mode 100644
index 9cc2a0348..000000000
--- a/DDG4/parsers/ParsersStandardMisc3.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "ParsersStandardMiscCommon.h"
-
-int DD4hep::Parsers::parse(std::map<std::string, int>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::map<std::string, unsigned int>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::map<std::string, double>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::map<std::string, std::vector<std::string> >& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
diff --git a/DDG4/parsers/ParsersStandardMisc4.cpp b/DDG4/parsers/ParsersStandardMisc4.cpp
deleted file mode 100644
index 5867cd25e..000000000
--- a/DDG4/parsers/ParsersStandardMisc4.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "ParsersStandardMiscCommon.h"
-
-int DD4hep::Parsers::parse(std::map<std::string, std::vector<int> >& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::map<std::string, std::vector<double> >& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::map<int, std::string>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
diff --git a/DDG4/parsers/ParsersStandardMisc5.cpp b/DDG4/parsers/ParsersStandardMisc5.cpp
deleted file mode 100644
index 5984100be..000000000
--- a/DDG4/parsers/ParsersStandardMisc5.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "ParsersStandardMiscCommon.h"
-
-int DD4hep::Parsers::parse(std::map<unsigned int, std::string>& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
-
-int DD4hep::Parsers::parse(std::string& name, std::string& value ,
-    const std::string& input ) {
-  Skipper skipper;
-  KeyValueGrammar<IteratorT, Skipper> g;
-  KeyValueGrammar<IteratorT, Skipper>::ResultT result;
-  std::string::const_iterator iter = input.begin();
-  bool parse_result = qi::phrase_parse(iter, input.end(), g, skipper,
-      result) && (iter==input.end());
-  if (parse_result) {
-    name = result.first;
-    value = result.second;
-  }
-  return parse_result;
-}
-
-int DD4hep::Parsers::parse(std::map<std::string, std::pair<double, double> >& result, const std::string& input) {
-    return DD4hep::Parsers::parse_(result, input);
-}
diff --git a/DDG4/parsers/ParsersStandardMiscCommon.h b/DDG4/parsers/ParsersStandardMiscCommon.h
deleted file mode 100644
index b062b1161..000000000
--- a/DDG4/parsers/ParsersStandardMiscCommon.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef PARSERS_STANDARD_MISC_COMMON_H
-#define PARSERS_STANDARD_MISC_COMMON_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-#include "DDG4/Parsers.h"
-#include "ParsersFactory.h"
-// ============================================================================
-#endif /* PARSERS_STANDARD_MISC_COMMON_H */
diff --git a/DDG4/parsers/ParsersStandardSingle.cpp b/DDG4/parsers/ParsersStandardSingle.cpp
deleted file mode 100644
index 258f0f881..000000000
--- a/DDG4/parsers/ParsersStandardSingle.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// ============================================================================
-// Include files
-// ============================================================================
-#include "DDG4/Parsers.h"
-#include "ParsersFactory.h"
-// ============================================================================
-#define PARSERS_DEF_FOR_SINGLE(Type)\
-  int DD4hep::Parsers::parse(Type& result, const std::string& input) \
-    {  return DD4hep::Parsers::parse_(result, input);  }
-// ============================================================================
-PARSERS_DEF_FOR_SINGLE(bool)
-PARSERS_DEF_FOR_SINGLE(char)
-PARSERS_DEF_FOR_SINGLE(unsigned char)
-PARSERS_DEF_FOR_SINGLE(signed char)
-PARSERS_DEF_FOR_SINGLE(int)
-PARSERS_DEF_FOR_SINGLE(short)
-PARSERS_DEF_FOR_SINGLE(unsigned short)
-PARSERS_DEF_FOR_SINGLE(unsigned int)
-PARSERS_DEF_FOR_SINGLE(long)
-PARSERS_DEF_FOR_SINGLE(unsigned long)
-PARSERS_DEF_FOR_SINGLE(long long)
-PARSERS_DEF_FOR_SINGLE(unsigned long long)
-PARSERS_DEF_FOR_SINGLE(double)
-PARSERS_DEF_FOR_SINGLE(float)
-PARSERS_DEF_FOR_SINGLE(long double)
-PARSERS_DEF_FOR_SINGLE(std::string)
diff --git a/DDG4/python/DDG4Dict.C b/DDG4/python/DDG4Dict.C
index e2c87bb45..4caaba735 100644
--- a/DDG4/python/DDG4Dict.C
+++ b/DDG4/python/DDG4Dict.C
@@ -182,6 +182,7 @@ namespace DD4hep {
 
 typedef DD4hep::Simulation::Geant4ActionCreation Geant4ActionCreation;
 
+#include "DD4hep/objects/DetectorInterna.h"
 // CINT configuration for DDG4
 #if defined(__MAKECINT__)
 #pragma link C++ class PropertyResult;
@@ -249,6 +250,8 @@ using namespace DD4hep::Geometry;
 #if defined(__MAKECINT__)
 
 //#pragma link C++ class Handle<TObject>;
+#pragma link C++ class ObjectExtensions;
+
 #pragma link C++ class Handle<TNamed>;
 #pragma link C++ class LCDD::HandleMap;
 #pragma link C++ class LCDD::HandleMap::iterator;
@@ -276,11 +279,16 @@ using namespace DD4hep::Geometry;
 // Readout.h
 #pragma link C++ class Readout;
 #pragma link C++ class Alignment;
+#pragma link C++ class Condition;
 #pragma link C++ class Conditions;
 
 // DetElement.h
 #pragma link C++ class DetElement;
+#pragma link C++ class DetElementObject;
+#pragma link C++ class Handle<DetElementObject>;
+#pragma link C++ class SensitiveDetectorObject;
 #pragma link C++ class SensitiveDetector;
+#pragma link C++ class Handle<SensitiveDetectorObject>;
 
 // Volume.h
 #pragma link C++ class Volume;
diff --git a/DDG4/src/ComponentProperties.cpp b/DDG4/src/ComponentProperties.cpp
index 00e5d3ee8..01fa9bb4a 100644
--- a/DDG4/src/ComponentProperties.cpp
+++ b/DDG4/src/ComponentProperties.cpp
@@ -9,19 +9,18 @@
 
 // Framework include files
 #include "DD4hep/Printout.h"
-#include "DDG4/ComponentProperties_inl.h"
-#include "DDG4/ToStream.h"
+#include "DD4hep/BasicGrammar.h"
+#include "DDG4/ComponentProperties.h"
 
 // C/C++ include files
 #include <stdexcept>
 #include <cstring>
-#include <set>
 
 using namespace std;
 using namespace DD4hep;
 
 /// Default constructor
-PropertyGrammar::PropertyGrammar() {
+PropertyGrammar::PropertyGrammar(const BasicGrammar& g) : m_grammar(g) {
 }
 
 /// Default destructor
@@ -29,23 +28,33 @@ PropertyGrammar::~PropertyGrammar() {
 }
 
 /// Error callback on invalid conversion
-void PropertyGrammar::invalidConversion(const string& value, const type_info& to) {
-  string to_name = typeinfoName(to);
-  throw unrelated_value_error(to,
-      "The Property data conversion of '" + value + "' to type " + to_name + " is not defined.");
+void PropertyGrammar::invalidConversion(const std::type_info& from, const std::type_info& to)  {
+  BasicGrammar::invalidConversion(from,to);
 }
 
 /// Error callback on invalid conversion
-void PropertyGrammar::invalidConversion(const type_info& from, const type_info& to) {
-  string to_name = typeinfoName(to);
-  string from_name = typeinfoName(from);
-  throw unrelated_type_error(from, to,
-      "The Property data conversion from type " + from_name + " to " + to_name + " is not implemented.");
+void PropertyGrammar::invalidConversion(const std::string& value, const std::type_info& to)   {
+  BasicGrammar::invalidConversion(value,to);
+}
+
+/// Access to the type information
+const std::type_info& PropertyGrammar::type() const  {
+  return m_grammar.type();
+}
+
+/// Serialize an opaque value to a string
+std::string PropertyGrammar::str(const void* ptr) const  {
+  return m_grammar.str(ptr);
+}
+
+/// Set value from serialized string. On successful data conversion TRUE is returned.
+bool PropertyGrammar::fromString(void* ptr, const std::string& value) const  {
+  return m_grammar.fromString(ptr,value);
 }
 
 /// Default constructor
 Property::Property()
-    : m_par(0), m_hdl(0) {
+  : m_par(0), m_hdl(0) {
 }
 
 /// Copy constructor
@@ -69,7 +78,7 @@ string Property::type(const Property& property) {
 
 /// Property type name
 string Property::type(const type_info& typ) {
-  return typeinfoName(typ);
+  return typeName(typ);
 }
 
 /// Property type name
@@ -196,168 +205,35 @@ void PropertyManager::dump() const {
   }
 }
 
-#include "XML/Evaluator.h"
-namespace DD4hep { XmlTools::Evaluator& g4Evaluator();  }
-namespace {  static XmlTools::Evaluator& s__eval(DD4hep::g4Evaluator());  }
-
-static string pre_parse_obj(const string& in)   {
-  string res = "";
-  res.reserve(1024);
-  for(const char* c = in.c_str(); *c; ++c)   {
-    switch(*c)  {
-    case '\'':
-      return "Bad object representation";
-    case ',':
-      res += "','";
-      break;
-    case '(':
-    case '[':
-      res += "['";
-      break;
-    case ')':
-    case ']':
-      res += "']";
-      break;
-    default:
-      res += *c;
-      break;
-    }
-  }
-  //cout << "Pre-parsed:" << res << endl;
-  return res;
-}
-
-template <typename TYPE> static int fill(std::vector<TYPE>* p,const std::vector<string>& temp)  {
-  const Grammar<TYPE>& g = Grammar<TYPE>::instance();
-  TYPE val;
-  for(std::vector<string>::const_iterator i=temp.begin(); i != temp.end(); ++i)  {
-    if ( !g.fromString(&val,*i) )
-      return 0;
-    p->push_back(val);
-  }
-  return 1;
-}
-template <typename TYPE> static int fill(std::list<TYPE>* p,const std::vector<string>& temp)  {
-  const Grammar<TYPE>& g = Grammar<TYPE>::instance();
-  TYPE val;
-  for(std::vector<string>::const_iterator i=temp.begin(); i != temp.end(); ++i)  {
-    if ( !g.fromString(&val,*i) )
-      return 0;
-    p->push_back(val);
-  }
-  return 1;
-}
-template <typename TYPE> static int fill(std::set<TYPE>* p,const std::vector<string>& temp)  {
-  const Grammar<TYPE>& g = Grammar<TYPE>::instance();
-  TYPE val;
-  for(std::vector<string>::const_iterator i=temp.begin(); i != temp.end(); ++i)  {
-    if ( !g.fromString(&val,*i) )
-      return 0;
-    p->insert(val);
-  }
-  return 1;
-}
-
-template <typename TYPE> static int eval(TYPE* p, const string& str)  {
-#ifdef DD4HEP_USE_BOOST
-  std::vector<string> buff;
-  int sc = Parsers::parse(buff,str);
-  if ( sc )  {
-    return fill(p,buff);
-  }
-  else   {
-    TYPE temp;
-    std::string temp_str = pre_parse_obj(str);
-    sc = Parsers::parse(temp,temp_str);
-    if ( sc )   {
-      *p = temp;
-      return 1;
-    }
-    buff.clear();
-    sc = Parsers::parse(buff,temp_str);
-    if ( sc )  {
-      return fill(p,buff);
-    }
-  }
-#else
-  if ( p && str.empty() ) return 0;
-#endif
-  return 0;
-}
-
-template <typename T> static int _eval(T* p, string s)  {
-  size_t idx = s.find("(int)");
-  if (idx != string::npos)
-    s.erase(idx, 5);
-  while (s[0] == ' ')
-    s.erase(0, 1);
-  double result = s__eval.evaluate(s.c_str());
-  if (s__eval.status() != XmlTools::Evaluator::OK) {
-    return 0;
-  }
-  *p = (T)result;
-  return 1;
-}
-
-static int _eval(ROOT::Math::XYZPoint* p, const string& str)
-{  return Grammar<ROOT::Math::XYZPoint>::instance().fromString(p,pre_parse_obj(str));  }
-static int _eval(ROOT::Math::XYZVector* p, const string& str)
-{  return Grammar<ROOT::Math::XYZVector>::instance().fromString(p,pre_parse_obj(str));  }
-static int _eval(ROOT::Math::PxPyPzEVector* p, const string& str)
-{  return Grammar<ROOT::Math::PxPyPzEVector>::instance().fromString(p,pre_parse_obj(str));  }
-
-#define DD4HEP_INSTANTIATE_PROPERTY_EVALUATE(x) \
-  template<> int Grammar<x >::evaluate(void* p, const string& v) const { return _eval((x*)p,v); }
-
-#define DD4HEP_INSTANTIATE_PROPERTY_EVALUATE1(x) DD4HEP_INSTANTIATE_PROPERTY_EVALUATE(x)\
-  template<> int Grammar<vector<x> >::evaluate(void* p,const string& v)const{return eval((std::vector<x>*)p,v);} \
-  template<> int Grammar<list<x>   >::evaluate(void* p,const string& v)const{return eval((std::list<x>*)p,v);} \
-  template<> int Grammar<set<x>    >::evaluate(void* p,const string& v)const{return eval((std::set<x>*)p,v);}
-
-#define DD4HEP_INSTANTIATE_PROPERTY_TYPE1(x)            \
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(x);			\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::vector<x>);	\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::list<x>);	\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(std::set<x>)
-
-#define DD4HEP_INSTANTIATE_PROPERTY_TYPE2(x)	\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(x);		\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(unsigned x)
-
-// Macros for evaluated properties:
-
-#define DD4HEP_INSTANTIATE_PROPERTY_TYPE0E(x)   \
-  DD4HEP_INSTANTIATE_PROPERTY_EVALUATE(x)       \
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(x)
-
-#define DD4HEP_INSTANTIATE_PROPERTY_TYPE1E(x)   \
-  DD4HEP_INSTANTIATE_PROPERTY_EVALUATE1(x)      \
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(x)
+#include "DDG4/ComponentProperties_inl.h"
+#include <vector>
+#include <list>
+#include <set>
+#include <map>
 
-#define DD4HEP_INSTANTIATE_PROPERTY_TYPE2E(x)	\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1E(x);	\
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1E(unsigned x)
+#include "Math/Point3D.h"
+#include "Math/Vector3D.h"
+#include "Math/Vector4D.h"
 
 namespace DD4hep {
+  DD4HEP_DEFINE_PROPERTY_U_CONT(char);
+  DD4HEP_DEFINE_PROPERTY_U_CONT(short);
+  DD4HEP_DEFINE_PROPERTY_U_CONT(int);
+  DD4HEP_DEFINE_PROPERTY_U_CONT(long);
+  DD4HEP_DEFINE_PROPERTY_U_CONT(long long);
 
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE2E(char);
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE2E(short);
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE2E(int);
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE2E(long);
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE2E(long long);
-
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1E(bool);
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1E(float);
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1E(double);
+  DD4HEP_DEFINE_PROPERTY_CONT(bool);
+  DD4HEP_DEFINE_PROPERTY_CONT(float);
+  DD4HEP_DEFINE_PROPERTY_CONT(double);
 
   // STL objects
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE1(string);
+  DD4HEP_DEFINE_PROPERTY_CONT(string);
 
   typedef map<string, int> map_string_int;
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE(map_string_int);
+  DD4HEP_DEFINE_PROPERTY_TYPE(map_string_int);
 
   // ROOT::Math Object instances
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE0E(ROOT::Math::XYZPoint);
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE0E(ROOT::Math::XYZVector);
-  DD4HEP_INSTANTIATE_PROPERTY_TYPE0E(ROOT::Math::PxPyPzEVector);
+  DD4HEP_DEFINE_PROPERTY_TYPE(ROOT::Math::XYZPoint);
+  DD4HEP_DEFINE_PROPERTY_TYPE(ROOT::Math::XYZVector);
+  DD4HEP_DEFINE_PROPERTY_TYPE(ROOT::Math::PxPyPzEVector);
 }
diff --git a/DDG4/src/ComponentUtils.cpp b/DDG4/src/ComponentUtils.cpp
deleted file mode 100644
index f7007fcd2..000000000
--- a/DDG4/src/ComponentUtils.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
-//====================================================================
-//  AIDA Detector description implementation for LCD
-//--------------------------------------------------------------------
-//
-//  Author     : M.Frank
-//
-//====================================================================
-
-// Framework include files
-#include "DD4hep/Printout.h"
-#include "DDG4/ComponentUtils.h"
-
-// C/C++ include files
-#include <stdexcept>
-#include <cstring>
-#include <map>
-
-#if defined(__linux) || defined(__APPLE__)
-#include <cxxabi.h>
-#ifndef __APPLE__
-typedef abi::__class_type_info class_t;
-using   abi::__dynamic_cast;
-#endif
-#endif
-
-using namespace std;
-using namespace DD4hep;
-
-namespace {
-
-  const std::string __typename(const char* class_name) {
-    std::string result;
-#ifdef _WIN32
-    long off = 0;
-    if ( ::strncmp(class_name, "class ", 6) == 0 ) {
-      // The returned name is prefixed with "class "
-      off = 6;
-    }
-    if ( ::strncmp(class_name, "struct ", 7) == 0 ) {
-      // The returned name is prefixed with "struct "
-      off = 7;
-    }
-    if ( off > 0 ) {
-      std::string tmp = class_name + off;
-      long loc = 0;
-      while( (loc = tmp.find("class ")) > 0 ) {
-        tmp.erase(loc, 6);
-      }
-      loc = 0;
-      while( (loc = tmp.find("struct ")) > 0 ) {
-        tmp.erase(loc, 7);
-      }
-      result = tmp;
-    }
-    else {
-      result = class_name;
-    }
-    // Change any " *" to "*"
-    while ( (off=result.find(" *")) != std::string::npos ) {
-      result.replace(off, 2, "*");
-    }
-    // Change any " &" to "&"
-    while ( (off=result.find(" &")) != std::string::npos ) {
-      result.replace(off, 2, "&");
-    }
-
-#elif defined(__linux) || defined(__APPLE__)
-    if (::strlen(class_name) == 1) {
-      // See http://www.realitydiluted.com/mirrors/reality.sgi.com/dehnert_engr/cxx/abi.pdf
-      // for details
-      switch (class_name[0]) {
-      case 'v':
-        result = "void";
-        break;
-      case 'w':
-        result = "wchar_t";
-        break;
-      case 'b':
-        result = "bool";
-        break;
-      case 'c':
-        result = "char";
-        break;
-      case 'a':
-        result = "signed char";
-        break;
-      case 'h':
-        result = "unsigned char";
-        break;
-      case 's':
-        result = "short";
-        break;
-      case 't':
-        result = "unsigned short";
-        break;
-      case 'i':
-        result = "int";
-        break;
-      case 'j':
-        result = "unsigned int";
-        break;
-      case 'l':
-        result = "long";
-        break;
-      case 'm':
-        result = "unsigned long";
-        break;
-      case 'x':
-        result = "long long";
-        break;
-      case 'y':
-        result = "unsigned long long";
-        break;
-      case 'n':
-        result = "__int128";
-        break;
-      case 'o':
-        result = "unsigned __int128";
-        break;
-      case 'f':
-        result = "float";
-        break;
-      case 'd':
-        result = "double";
-        break;
-      case 'e':
-        result = "long double";
-        break;
-      case 'g':
-        result = "__float128";
-        break;
-      case 'z':
-        result = "ellipsis";
-        break;
-      }
-    }
-    else {
-      int status;
-      char* realname;
-      realname = abi::__cxa_demangle(class_name, 0, 0, &status);
-      if (realname == 0)
-        return class_name;
-      result = realname;
-      free(realname);
-      /// substitute ', ' with ','
-      std::string::size_type pos = result.find(", ");
-      while (std::string::npos != pos) {
-        result.replace(pos, 2, ",");
-        pos = result.find(", ");
-      }
-    }
-#endif
-    return result;
-  }
-}
-
-/// ABI information about type names
-std::string DD4hep::typeinfoName(const std::type_info& type) {
-  return __typename(type.name());
-}
-
-void DD4hep::typeinfoCheck(const std::type_info& typ1, const std::type_info& typ2, const std::string& text) {
-  if (typ1 != typ2) {
-    throw unrelated_type_error(typ1, typ2, text);
-  }
-}
-
-string unrelated_type_error::msg(const std::type_info& typ1, const std::type_info& typ2, const string& text) {
-  std::string m = "The types " + __typename(typ1.name()) + " and " + __typename(typ2.name()) + " are not related. " + text;
-  return m;
-}
-
-string unrelated_value_error::msg(const std::type_info& typ, const string& text) {
-  std::string m = "The type " + __typename(typ.name()) + " cannot be converted: " + text;
-  return m;
-}
-
-/// Initializing Constructor
-ComponentCast::ComponentCast(const std::type_info& t, destroy_t d, cast_t c)
-  : type(t), destroy(d), cast(c) {
-#ifdef __APPLE__
-  abi_class = 0;
-#else
-  abi_class = dynamic_cast<const class_t*>(&type);
-  if (!abi_class) {
-    throw std::runtime_error("Class type " + typeinfoName(type) + " is not an abi object type!");
-  }
-#endif
-}
-
-/// Defautl destructor
-ComponentCast::~ComponentCast() {
-}
-
-#if 0
-// Dynamic cast runtime.
-// src2dst has the following possible values
-//  >-1: src_type is a unique public non-virtual base of dst_type
-//       dst_ptr + src2dst == src_ptr
-//   -1: unspecified relationship
-//   -2: src_type is not a public base of dst_type
-//   -3: src_type is a multiple public non-virtual base of dst_type
-extern "C" void*
-__dynamic_cast(const void* __src_ptr,// Starting object.
-	       const abi::__class_type_info* __src_type,// Static type of object.
-	       const abi::__class_type_info* __dst_type,// Desired target type.
-	       ptrdiff_t __src2dst);// How src and dst are related.
-#endif
-
-#ifndef __APPLE__
-static inline void* cast_wrap(const void* p,
-			      const abi::__class_type_info* src,
-			      const abi::__class_type_info* dst,
-			      ptrdiff_t src2dst)
-{
-  return abi::__dynamic_cast(p,src,dst,src2dst);
-}
-#endif
-
-/// Apply cast using typeinfo instead of dynamic_cast
-void* ComponentCast::apply_dynCast(const ComponentCast& to, const void* ptr) const {
-  if (&to == this) {
-    return (void*) ptr;
-  }
-#ifdef __APPLE__
-  // First try down cast
-  void *r = (*to.cast)(ptr);
-  if (r) 
-    return r;
-  {
-    // Now try the up-cast
-    r = (*cast)(ptr);
-#else
-  const class_t* src_type = (const class_t*)to.abi_class;
-  if (src_type) {
-    // First try down cast
-    void *r = cast_wrap(ptr, src_type, (const class_t*) abi_class, -1);
-    if (r)
-      return r;
-    // Now try the up-cast
-    r = cast_wrap(ptr, (const class_t*) abi_class, src_type, -1);
-#endif
-    if (r)
-      return r;
-    throw unrelated_type_error(type, to.type, "Failed to apply abi dynamic cast operation!");
-  }
-  throw unrelated_type_error(type, to.type, "Target type is not an abi class type!");
-}
-
-/// Apply cast using typeinfo instead of dynamic_cast
-void* ComponentCast::apply_upCast(const ComponentCast& to, const void* ptr) const {
-  if (&to == this) {
-    return (void*) ptr;
-  }
-  return apply_dynCast(to, ptr);
-}
-
-/// Apply cast using typeinfo instead of dynamic_cast
-void* ComponentCast::apply_downCast(const ComponentCast& to, const void* ptr) const {
-  if (&to == this) {
-    return (void*) ptr;
-  }
-#ifdef __APPLE__
-  void *r = (*to.cast)(ptr);
-  {
-#else
-  const class_t* src_type = (const class_t*)to.abi_class;
-  if (src_type)    {
-    void *r = cast_wrap(ptr, src_type, (const class_t*)abi_class, -1);
-#endif
-    if (r)
-      return r;
-    throw unrelated_type_error(type, to.type, "Failed to apply abi dynamic cast operation!");
-  }
-  throw unrelated_type_error(type, to.type, "Target type is not an abi class type!");
-}
-
diff --git a/DDG4/src/Geant4Action.cpp b/DDG4/src/Geant4Action.cpp
index f5289888c..b98102266 100644
--- a/DDG4/src/Geant4Action.cpp
+++ b/DDG4/src/Geant4Action.cpp
@@ -60,7 +60,7 @@ long Geant4Action::release() {
   long count = --m_refCount;
   if (m_refCount <= 0) {
     cout << "Geant4Action: Deleting object " << name() 
-	 << " of type " << typeinfoName(typeid(*this)) 
+	 << " of type " << typeName(typeid(*this)) 
 	 << " Ptr:" << (void*)this
 	 << endl;
     delete this;
@@ -188,7 +188,7 @@ void Geant4Action::except(const string& fmt, ...) const {
 
 /// Abort Geant4 Run by throwing a G4Exception with type RunMustBeAborted
 void Geant4Action::abortRun(const string& exception, const string& fmt, ...) const {
-  string desc, typ = typeinfoName(typeid(*this));
+  string desc, typ = typeName(typeid(*this));
   string issuer = name()+" ["+typ+"]";
   va_list args;
   va_start(args, fmt);
diff --git a/DDG4/src/Geant4Callback.cpp b/DDG4/src/Geant4Callback.cpp
deleted file mode 100644
index 1ced20b11..000000000
--- a/DDG4/src/Geant4Callback.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
-//====================================================================
-//  AIDA Detector description implementation for LCD
-//--------------------------------------------------------------------
-//
-//  Author     : M.Frank
-//
-//====================================================================
-#include <algorithm>
-#include "DDG4/Geant4Callback.h"
-#include "DDG4/ComponentUtils.h"
-
-using namespace DD4hep;
-
-/// Check the compatibility of two typed objects. The test is the result of a dynamic_cast
-void CallbackSequence::checkTypes(const std::type_info& typ1, const std::type_info& typ2, void* test) {
-  if (!test) {
-    throw unrelated_type_error(typ1, typ2, "Cannot install a callback for these 2 types.");
-  }
-}
-
diff --git a/DDG4/src/Geant4Converter.cpp b/DDG4/src/Geant4Converter.cpp
index d0a15f295..ad8bd1a59 100644
--- a/DDG4/src/Geant4Converter.cpp
+++ b/DDG4/src/Geant4Converter.cpp
@@ -11,6 +11,8 @@
 #include "DD4hep/Plugins.h"
 #include "DD4hep/Volumes.h"
 #include "DD4hep/Printout.h"
+#include "DD4hep/objects/DetectorInterna.h"
+
 #include "DDG4/Geant4Field.h"
 #include "DDG4/Geant4Converter.h"
 #include "DDG4/Factories.h"
@@ -71,6 +73,7 @@
 #include "G4ElectroMagneticField.hh"
 #include "G4FieldManager.hh"
 #include "G4ReflectionFactory.hh"
+#include "G4AssemblyVolume.hh"
 
 #include <iostream>
 #include <iomanip>
@@ -81,47 +84,50 @@ using namespace DD4hep::Geometry;
 using namespace DD4hep;
 using namespace std;
 
-#define private public
-#include "G4AssemblyVolume.hh"
-#undef private
-
-struct Geant4AssemblyVolume : public G4AssemblyVolume {
-  Geant4AssemblyVolume() {
-  }
-  size_t placeVolume(G4LogicalVolume* pPlacedVolume, G4Transform3D& transformation) {
-    size_t id = fTriplets.size();
-    this->AddPlacedVolume(pPlacedVolume, transformation);
-    return id;
-  }
-  void imprint(std::vector<G4VPhysicalVolume*>& nodes, G4LogicalVolume* pMotherLV, G4Transform3D& transformation,
-      G4int copyNumBase, G4bool surfCheck);
-
-};
+#if 0
+#include "G4RotationMatrix.hh"
+#include "G4AffineTransform.hh"
+#include "G4LogicalVolume.hh"
+#include "G4VPhysicalVolume.hh"
+#include "G4ReflectionFactory.hh"
 
-void Geant4AssemblyVolume::imprint(std::vector<G4VPhysicalVolume*>& nodes, G4LogicalVolume* pMotherLV,
-    G4Transform3D& transformation, G4int copyNumBase, G4bool surfCheck) {
-  G4AssemblyVolume* pAssembly = this;
-  unsigned int numberOfDaughters;
-  if (copyNumBase == 0) {
+void G4AssemblyVolume::MakeImprint( G4AssemblyVolume* pAssembly,
+                                    G4LogicalVolume*  pMotherLV,
+                                    G4Transform3D&    transformation,
+                                    G4int copyNumBase,
+                                    G4bool surfCheck )
+{
+  static int level=0;
+  ++level;
+  unsigned int  numberOfDaughters;
+
+  if( copyNumBase == 0 )
+  {
     numberOfDaughters = pMotherLV->GetNoDaughters();
   }
-  else {
+  else
+  {
     numberOfDaughters = copyNumBase;
   }
+
   // We start from the first available index
+  //
   numberOfDaughters++;
+
   ImprintsCountPlus();
+  
+  std::vector<G4AssemblyTriplet> triplets = pAssembly->fTriplets;
 
-  std::vector < G4AssemblyTriplet > triplets = pAssembly->fTriplets;
-  for (unsigned int i = 0; i < triplets.size(); i++) {
-    G4Transform3D Ta(*(triplets[i].GetRotation()), triplets[i].GetTranslation());
-    if (triplets[i].IsReflection()) {
-      Ta = Ta * G4ReflectZ3D();
-    }
+  for( unsigned int   i = 0; i < triplets.size(); i++ )
+  {
+    G4Transform3D Ta( *(triplets[i].GetRotation()),
+                      triplets[i].GetTranslation() );
+    if ( triplets[i].IsReflection() )  { Ta = Ta * G4ReflectZ3D(); }
 
     G4Transform3D Tfinal = transformation * Ta;
-
-    if (triplets[i].GetVolume()) {
+    
+    if ( triplets[i].GetVolume() )
+    {
       // Generate the unique name for the next PV instance
       // The name has format:
       //
@@ -133,45 +139,66 @@ void Geant4AssemblyVolume::imprint(std::vector<G4VPhysicalVolume*>& nodes, G4Log
       // ZZZ - the log. volume index inside the assembly volume
       //
       std::stringstream pvName;
-      pvName << "av_" << GetAssemblyID() << "_impr_" << GetImprintsCount() << "_" << triplets[i].GetVolume()->GetName().c_str()
-          << "_pv_" << i << std::ends;
+      pvName << "av_"
+             << GetAssemblyID()
+             << "_impr_"
+             << GetImprintsCount()
+             << "_"
+             << triplets[i].GetVolume()->GetName().c_str()
+             << "_pv_"
+             << i
+             << std::ends;
 
       // Generate a new physical volume instance inside a mother
-      // (as we allow 3D transformation use G4ReflectionFactory to
+      // (as we allow 3D transformation use G4ReflectionFactory to 
       //  take into account eventual reflection)
       //
-      G4PhysicalVolumesPair pvPlaced = G4ReflectionFactory::Instance()->Place(Tfinal, pvName.str().c_str(),
-          triplets[i].GetVolume(), pMotherLV, false, numberOfDaughters + i, surfCheck);
+      G4PhysicalVolumesPair pvPlaced
+        = G4ReflectionFactory::Instance()->Place( Tfinal,
+                                                  pvName.str().c_str(),
+                                                  triplets[i].GetVolume(),
+                                                  pMotherLV,
+                                                  false,
+                                                  numberOfDaughters + i,
+                                                  surfCheck );
 
       // Register the physical volume created by us so we can delete it later
       //
-      fPVStore.push_back(pvPlaced.first);
-      nodes.push_back(pvPlaced.first);
-      if (pvPlaced.second) {   // Supported by G4, but not by TGeo!
-        fPVStore.push_back(pvPlaced.second);
-        G4Exception("G4AssemblyVolume::MakeImprint(..)", "GeomVol0003", FatalException,
-            "Fancy construct popping new mother from the stack!");
-      }
+      fPVStore.push_back( pvPlaced.first );
+      if ( pvPlaced.second )  { fPVStore.push_back( pvPlaced.second ); }
     }
-    else if (triplets[i].GetAssembly()) {
+    else if ( triplets[i].GetAssembly() )
+    {
       // Place volumes in this assembly with composed transformation
-      G4Exception("G4AssemblyVolume::MakeImprint(..)", "GeomVol0003", FatalException,
-          "Assemblies within assembliesare not supported.");
-    }
-    else {
-      G4Exception("G4AssemblyVolume::MakeImprint(..)", "GeomVol0003", FatalException, "Triplet has no volume and no assembly");
-    }
-  }
-}
+      //
+      MakeImprint( triplets[i].GetAssembly(), pMotherLV,
+                   Tfinal, i*100+copyNumBase, surfCheck ); 
+    }
+    else
+    {
+      --level;
+      G4Exception("G4AssemblyVolume::MakeImprint(..)",
+                  "GeomVol0003", FatalException,
+                  "Triplet has no volume and no assembly");
+    }  
+  }  
+  cout << "Imprinted assembly level:" << level << " in mother:" << pMotherLV->GetName() << endl;
+  --level;
+}    
+#endif
 
 namespace {
   static TGeoNode* s_topPtr;
   static string indent = "";
+  static Double_t s_identity_rot[] = { 1., 0., 0., 0., 1., 0., 0., 0., 1. };
   struct MyTransform3D : public G4Transform3D {
     MyTransform3D(double XX, double XY, double XZ, double DX, double YX, double YY, double YZ, double DY, double ZX, double ZY,
         double ZZ, double DZ)
         : G4Transform3D(XX, XY, XZ, DX, YX, YY, YZ, DY, ZX, ZY, ZZ, DZ) {
     }
+    MyTransform3D(const double* t, const double* r = s_identity_rot) 
+      : G4Transform3D(r[0],r[1],r[2],t[0]*CM_2_MM,r[3],r[4],r[5],t[1]*CM_2_MM,r[6],r[7],r[8],t[2]*CM_2_MM)  {
+    }
   };
 
   void handleName(const TGeoNode* n) {
@@ -379,8 +406,6 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c
       TGeoMatrix* m = boolean->GetRightMatrix();
       G4VSolid* left = (G4VSolid*) handleSolid(name + "_left", boolean->GetLeftShape());
       G4VSolid* right = (G4VSolid*) handleSolid(name + "_right", boolean->GetRightShape());
-      const Double_t *t = m->GetTranslation();
-      const Double_t *r = m->GetRotationMatrix();
 
       if (!left) {
         throw runtime_error("G4Converter: No left Geant4 Solid present for composite shape:" + name);
@@ -390,8 +415,7 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c
       }
 
       if (m->IsRotation()) {
-        MyTransform3D transform(r[0], r[1], r[2], t[0] * CM_2_MM, r[3], r[4], r[5], t[1] * CM_2_MM, r[6], r[7], r[8],
-            t[2] * CM_2_MM);
+        MyTransform3D transform(m->GetTranslation(),m->GetRotationMatrix());
         if (oper == TGeoBoolNode::kGeoSubtraction)
           solid = new G4SubtractionSolid(name, left, right, transform);
         else if (oper == TGeoBoolNode::kGeoUnion)
@@ -400,6 +424,7 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c
           solid = new G4IntersectionSolid(name, left, right, transform);
       }
       else {
+	const Double_t *t = m->GetTranslation();
         G4ThreeVector transform(t[0] * CM_2_MM, t[1] * CM_2_MM, t[2] * CM_2_MM);
         if (oper == TGeoBoolNode::kGeoSubtraction)
           solid = new G4SubtractionSolid(name, left, right, 0, transform);
@@ -422,8 +447,9 @@ void* Geant4Converter::handleSolid(const string& name, const TGeoShape* shape) c
 /// Dump logical volume in GDML format to output stream
 void* Geant4Converter::handleVolume(const string& name, const TGeoVolume* volume) const {
   Geant4GeometryInfo& info = data();
-  G4LogicalVolume* vol = info.g4Volumes[volume];
-  if (!vol) {
+  VolumeMap::const_iterator volIt = info.g4Volumes.find(volume);
+  AssemblyMap::const_iterator assIt = info.g4Assemblies.find(volume);
+  if (volIt == info.g4Volumes.end() && assIt == info.g4Assemblies.end() ) {
     const TGeoVolume* v = volume;
     Volume _v = Ref_t(v);
     string n = v->GetName();
@@ -431,7 +457,7 @@ void* Geant4Converter::handleVolume(const string& name, const TGeoVolume* volume
     TGeoShape* s = v->GetShape();
     G4VSolid* solid = (G4VSolid*) handleSolid(s->GetName(), s);
     G4Material* medium = 0;
-    bool assembly = s->IsA() == TGeoShapeAssembly::Class();
+    bool assembly = s->IsA() == TGeoShapeAssembly::Class() || v->IsA() == TGeoVolumeAssembly::Class();
 
     SensitiveDetector det = _v.sensitiveDetector();
     G4VSensitiveDetector* sd = 0;
@@ -469,12 +495,12 @@ void* Geant4Converter::handleVolume(const string& name, const TGeoVolume* volume
     }
 
     printout(DEBUG, "Geant4Converter", "++ Convert Volume %-32s: %p %s/%s assembly:%s sensitive:%s", n.c_str(), v,
-        s->IsA()->GetName(), v->IsA()->GetName(), (assembly ? "YES" : "NO"), (det.isValid() ? "YES" : "NO"));
+        s->IsA()->GetName(), v->IsA()->GetName(), yes_no(assembly), yes_no(det.isValid()));
 
     if (assembly) {
-      vol = (G4LogicalVolume*) new G4AssemblyVolume();
-      info.g4Volumes[v] = vol;
-      return vol;
+      G4AssemblyVolume* ass = new G4AssemblyVolume();
+      info.g4Assemblies[v] = ass;
+      return 0;
     }
     medium = (G4Material*) handleMaterial(m->GetName(), m);
     if (!solid) {
@@ -486,7 +512,7 @@ void* Geant4Converter::handleVolume(const string& name, const TGeoVolume* volume
     if (user_limits) {
       printout(DEBUG, "Geant4Converter", "++ Volume     + Apply LIMITS settings:%-24s to volume %s.", lim.name(), _v.name());
     }
-    vol = new G4LogicalVolume(solid, medium, n, 0, sd, user_limits);
+    G4LogicalVolume* vol = new G4LogicalVolume(solid, medium, n, 0, sd, user_limits);
     if (region) {
       printout(DEBUG, "Geant4Converter", "++ Volume     + Apply REGION settings: %s to volume %s.", reg.name(), _v.name());
       vol->SetRegion(region);
@@ -502,7 +528,7 @@ void* Geant4Converter::handleVolume(const string& name, const TGeoVolume* volume
     info.g4Volumes[v] = vol;
     printout(DEBUG, "Geant4Converter", "++ Volume     + %s converted: %p ---> G4: %p", n.c_str(), v, vol);
   }
-  return vol;
+  return 0;
 }
 
 /// Dump logical volume in GDML format to output stream
@@ -523,17 +549,66 @@ void* Geant4Converter::collectVolume(const string& /* name */, const TGeoVolume*
   return (void*) v;
 }
 
+/// Dump volume placement in GDML format to output stream
+void* Geant4Converter::handleAssembly(const std::string& name, const TGeoNode* node) const {
+  TGeoVolume* vol = node->GetVolume();
+  bool assembly = vol->GetShape()->IsA() == TGeoShapeAssembly::Class() || vol->IsA() == TGeoVolumeAssembly::Class();
+  if ( !assembly )    {
+    return 0;
+  }
+  Geant4GeometryInfo& info = data();
+  G4AssemblyVolume* g4 = info.g4Assemblies[vol];
+  if ( !node || !g4 )  {
+    printout(FATAL, "Geant4Converter", "+++ Invalid assembly pointer at %s : %d "
+	     "G4AssemblyVolume: %16p, TGeoNode: %16p [%s]",
+	     __FILE__, __LINE__, g4, node, name.c_str());
+  }
+  if ( g4->TotalImprintedVolumes() == 0 )  {
+    TGeoVolume* mot_vol = node->GetVolume();
+    for(Int_t i=0; i < vol->GetNdaughters(); ++i)   {
+      TGeoNode* d = vol->GetNode(i);
+      TGeoVolume* dau_vol = d->GetVolume();
+      TGeoMatrix* tr = d->GetMatrix();
+      MyTransform3D transform(tr->GetTranslation(),tr->IsRotation() ? tr->GetRotationMatrix() : s_identity_rot);
+      if ( dau_vol->IsA() == TGeoVolumeAssembly::Class() )  {
+	AssemblyMap::iterator assIt = info.g4Assemblies.find(dau_vol);
+	if ( assIt == info.g4Assemblies.end() )  {
+	  printout(FATAL, "Geant4Converter", "+++ Invalid child assembly at %s : %d  parent: %s child:%s",
+		   __FILE__, __LINE__, node->GetName(), d->GetName());
+	}
+	g4->AddPlacedAssembly((*assIt).second,transform);
+        printout(DEBUG, "Geant4Converter", "+++ Assembly: AddPlacedAssembly : dau:%s "
+		 "to mother %s Tr:x=%8.3f y=%8.3f z=%8.3f",
+		 dau_vol->GetName(), mot_vol->GetName(),
+		 transform.dx(), transform.dy(), transform.dz());
+      }
+      else   {
+	VolumeMap::iterator volIt = info.g4Volumes.find(dau_vol);
+	if ( volIt == info.g4Volumes.end() )  {
+	  printout(FATAL, "Geant4Converter", "+++ Invalid child volume at %s : %d  parent: %s child:%s",
+		   __FILE__, __LINE__, node->GetName(), d->GetName());
+	}
+	g4->AddPlacedVolume((*volIt).second, transform);
+        printout(DEBUG, "Geant4Converter", "+++ Assembly: AddPlacedVolume : dau:%s "
+		 "to mother %s Tr:x=%8.3f y=%8.3f z=%8.3f",
+		 dau_vol->GetName(), mot_vol->GetName(),
+		 transform.dx(), transform.dy(), transform.dz());
+      }
+    }
+  }
+  return g4;
+}
+
 /// Dump volume placement in GDML format to output stream
 void* Geant4Converter::handlePlacement(const string& name, const TGeoNode* node) const {
-  static Double_t identity_rot[] = { 1., 0., 0., 0., 1., 0., 0., 0., 1. };
   Geant4GeometryInfo& info = data();
   PlacementMap::const_iterator g4it = info.g4Placements.find(node);
   G4VPhysicalVolume* g4 = (g4it == info.g4Placements.end()) ? 0 : (*g4it).second;
   if (!g4) {
     TGeoVolume* mot_vol = node->GetMotherVolume();
     TGeoVolume* vol = node->GetVolume();
-    TGeoMatrix* trafo = node->GetMatrix();
-    if (!trafo) {
+    TGeoMatrix* tr = node->GetMatrix();
+    if (!tr) {
       printout(FATAL, "Geant4Converter", "++ Attempt to handle placement without transformation:%p %s of type %s vol:%p", node,
           node->GetName(), node->IsA()->GetName(), vol);
     }
@@ -543,55 +618,37 @@ void* Geant4Converter::handlePlacement(const string& name, const TGeoNode* node)
     }
     else {
       int copy = node->GetNumber();
-      G4LogicalVolume* g4vol = info.g4Volumes[vol];
-      G4LogicalVolume* g4mot = info.g4Volumes[mot_vol];
-      Geant4AssemblyVolume* ass_mot = (Geant4AssemblyVolume*) g4mot;
-      Geant4AssemblyVolume* ass_dau = (Geant4AssemblyVolume*) g4vol;
-      const Double_t* trans = trafo->GetTranslation();
-      const Double_t* rot = trafo->IsRotation() ? trafo->GetRotationMatrix() : identity_rot;
       bool daughter_is_assembly = vol->IsA() == TGeoVolumeAssembly::Class();
       bool mother_is_assembly = mot_vol ? mot_vol->IsA() == TGeoVolumeAssembly::Class() : false;
-      MyTransform3D transform(rot[0], rot[1], rot[2], trans[0] * CM_2_MM, rot[3], rot[4], rot[5], trans[1] * CM_2_MM, rot[6],
-          rot[7], rot[8], trans[2] * CM_2_MM);
-      CLHEP::HepRotation rotmat = transform.getRotation();
-
-      if (mother_is_assembly) {	  // Mother is an assembly:
-        printout(DEBUG, "Geant4Converter", "++ Assembly: AddPlacedVolume: %16p dau:%s "
-            "Tr:x=%8.3f y=%8.3f z=%8.3f  Rot:phi=%7.3f theta=%7.3f psi=%7.3f\n", ass_mot,
-            g4vol ? g4vol->GetName().c_str() : "---", transform.dx(), transform.dy(), transform.dz(), rotmat.getPhi(),
-            rotmat.getTheta(), rotmat.getPsi());
-        size_t id = ass_mot->placeVolume(g4vol, transform);
-        info.g4AssemblyChildren[ass_mot].push_back(make_pair(id, node));
+      MyTransform3D transform(tr->GetTranslation(),tr->IsRotation() ? tr->GetRotationMatrix() : s_identity_rot);
+      VolumeMap::const_iterator volIt = info.g4Volumes.find(mot_vol);
+
+      if ( daughter_is_assembly && volIt != info.g4Volumes.end() )   {
+        printout(DEBUG, "Geant4Converter", "+++ Assembly: makeImprint: dau:%s in mother %s "
+		 "Tr:x=%8.3f y=%8.3f z=%8.3f",
+		 node->GetName(), mot_vol->GetName(), 
+		 transform.dx(), transform.dy(), transform.dz());
+	G4AssemblyVolume* ass = info.g4Assemblies[vol];
+	ass->MakeImprint((*volIt).second, transform, copy, m_checkOverlaps);
+	info.g4Placements[node] = (G4VPhysicalVolume*)node;
+	return 0;
+      }
+      else if ( mother_is_assembly )   {	  // Mother is an assembly:
+        printout(DEBUG, "Geant4Converter", "+++ Assembly: **** : dau:%s "
+		 "to mother %s Tr:x=%8.3f y=%8.3f z=%8.3f",
+		 vol->GetName(), mot_vol->GetName(),
+		 transform.dx(), transform.dy(), transform.dz());
+	info.g4Placements[node] = (G4VPhysicalVolume*)node;
         return 0;
       }
-      else if ( node != gGeoManager->GetTopNode() && 0 == g4mot )  {
+      else if ( node != gGeoManager->GetTopNode() && volIt == info.g4Volumes.end() )  {
 	throw logic_error("Geant4Converter: Invalid mother volume found!");
       }
-      else if ( g4mot && daughter_is_assembly ) {
-        printout(DEBUG, "Geant4Converter", "++ Assembly: makeImprint: %16p dau:%s "
-            "Tr:x=%8.3f y=%8.3f z=%8.3f  Rot:phi=%7.3f theta=%7.3f psi=%7.3f\n", ass_dau,
-            g4mot->GetName().c_str(), transform.dx(), transform.dy(), transform.dz(), rotmat.getPhi(),
-            rotmat.getTheta(), rotmat.getPsi());
-        std::vector<G4VPhysicalVolume*> phys_volumes;
-        AssemblyChildMap::iterator i = info.g4AssemblyChildren.find(ass_dau);
-        if (i == info.g4AssemblyChildren.end()) {
-          printout(ERROR, "Geant4Converter", "++ Non-existing assembly [%p]", ass_dau);
-	  throw logic_error("Geant4Converter: Dealing with invalid daughter assembly!");
-        }
-        const AssemblyChildren& v = (*i).second;
-        ass_dau->imprint(phys_volumes, g4mot, transform, copy, m_checkOverlaps);
-        if (v.size() != phys_volumes.size()) {
-          printout(ERROR, "Geant4Converter", "++ Unexpected number of placements in assembly: %ld <> %ld.", v.size(),
-              phys_volumes.size());
-        }
-        for (size_t j = 0; j < v.size(); ++j) {
-          info.g4Placements[v[j].second] = phys_volumes[j];
-        }
-        return 0;
-      }
       else if ( daughter_is_assembly ) {  // g4mot is NULL !
 	throw logic_error("Geant4Converter: Invalid mother - daughter relationship in assembly! ["+name+"]");
       }
+      G4LogicalVolume* g4vol = info.g4Volumes[vol];
+      G4LogicalVolume* g4mot = info.g4Volumes[mot_vol];
       g4 = new G4PVPlacement(transform,   // no rotation
           g4vol,     // its logical volume
           name,      // its name
@@ -861,8 +918,10 @@ template <typename O, typename C, typename F> void handleMap(const O* o, const C
 }
 
 template <typename O, typename C, typename F> void handleRMap(const O* o, const C& c, F pmf) {
-  for (typename C::const_reverse_iterator i = c.rbegin(); i != c.rend(); ++i)
+  for (typename C::const_reverse_iterator i = c.rbegin(); i != c.rend(); ++i)  {
+    //cout << "Handle RMAP [ " << (*i).first << " ]" << endl;
     handle(o, (*i).second, pmf);
+  }
 }
 
 /// Create geometry conversion
@@ -896,6 +955,7 @@ Geant4Converter& Geant4Converter::create(DetElement top) {
   printout(INFO, "Geant4Converter", "++ Handled %ld regions.", geo.regions.size());
   handle(this, geo.volumes, &Geant4Converter::handleVolume);
   printout(INFO, "Geant4Converter", "++ Handled %ld volumes.", geo.volumes.size());
+  handleRMap(this, *m_data, &Geant4Converter::handleAssembly);
   // Now place all this stuff appropriately
   handleRMap(this, *m_data, &Geant4Converter::handlePlacement);
   //==================== Fields
diff --git a/DDG4/src/Geant4Handle.cpp b/DDG4/src/Geant4Handle.cpp
index e12c4a5b2..a4baccf78 100644
--- a/DDG4/src/Geant4Handle.cpp
+++ b/DDG4/src/Geant4Handle.cpp
@@ -36,7 +36,7 @@ template <typename TYPE> static inline TYPE* checked_value(TYPE* p) {
     return p;
   }
   throw runtime_error(
-      format("Geant4Handle", "Attempt to access an invalid object of type:%s!", typeinfoName(typeid(TYPE)).c_str()));
+      format("Geant4Handle", "Attempt to access an invalid object of type:%s!", typeName(typeid(TYPE)).c_str()));
 }
 
 template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle()
@@ -62,7 +62,7 @@ template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(const Geant4Kernel& ke
   Geant4Context* ctxt = kernel.context();
   Geant4Action* object = PluginService::Create<Geant4Action*>(typ.first, ctxt, typ.second);
   if (!object && typ.first == typ.second) {
-    typ.first = typeinfoName(typeid(TYPE));
+    typ.first = typeName(typeid(TYPE));
     printout(DEBUG, "Geant4Handle<Geant4Sensitive>", "Object factory for %s not found. Try out %s", typ.second.c_str(),
         typ.first.c_str());
     object = PluginService::Create<Geant4Action*>(typ.first, ctxt, typ.second);
@@ -82,7 +82,7 @@ template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(const Geant4Kernel& ke
     }
     throw runtime_error(
         format("Geant4Handle", "Failed to convert object of type %s to handle of type %s!", type_name.c_str(),
-            typeinfoName(typeid(TYPE)).c_str()));
+            typeName(typeid(TYPE)).c_str()));
   }
   throw runtime_error(format("Geant4Handle", "Failed to create object of type %s!", type_name.c_str()));
 }
@@ -94,7 +94,7 @@ template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(const Geant4Kernel& ke
   Geant4Context* ctxt = kernel.context();
   Geant4Action* object = PluginService::Create<Geant4Action*>(typ.first, ctxt, typ.second);
   if (!object && typ.first == typ.second) {
-    typ.first = typeinfoName(typeid(TYPE));
+    typ.first = typeName(typeid(TYPE));
     printout(DEBUG, "Geant4Handle<Geant4Sensitive>", "Object factory for %s not found. Try out %s", typ.second.c_str(),
         typ.first.c_str());
     object = PluginService::Create<Geant4Action*>(typ.first, ctxt, typ.second);
@@ -114,7 +114,7 @@ template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(const Geant4Kernel& ke
     }
     throw runtime_error(
         format("Geant4Handle", "Failed to convert object of type %s to handle of type %s!", type_name.c_str(),
-            typeinfoName(typeid(TYPE)).c_str()));
+            typeName(typeid(TYPE)).c_str()));
   }
   throw runtime_error(format("Geant4Handle", "Failed to create object of type %s!", type_name.c_str()));
 }
diff --git a/DDG4/src/Geant4HierarchyDump.cpp b/DDG4/src/Geant4HierarchyDump.cpp
index eccd587e1..6e212f8b0 100644
--- a/DDG4/src/Geant4HierarchyDump.cpp
+++ b/DDG4/src/Geant4HierarchyDump.cpp
@@ -114,7 +114,7 @@ void Geant4HierarchyDump::dump(const string& indent, const G4VPhysicalVolume* v)
   }
   if (sd && (m_flags & G4DUMP_SENSDET)) {
     printout(INFO, "Geant4Hierarchy", "%s    Sens.det:%p %s path:%s Active:%-3s #Coll:%d", indent.c_str(), sd,
-        _T(sd->GetName()), _T(sd->GetFullPathName()), sd->isActive() ? "YES" : "NO", sd->GetNumberOfCollections());
+	     _T(sd->GetName()), _T(sd->GetFullPathName()), yes_no(sd->isActive()), sd->GetNumberOfCollections());
   }
   if (ul && (m_flags & G4DUMP_LIMITS)) {
     printout(INFO, "Geant4Hierarchy", "%s    Limits:%s ", indent.c_str(), _T(ul->GetType()));
diff --git a/DDG4/src/Geant4Kernel.cpp b/DDG4/src/Geant4Kernel.cpp
index cd3d71dbb..9744ad2e0 100644
--- a/DDG4/src/Geant4Kernel.cpp
+++ b/DDG4/src/Geant4Kernel.cpp
@@ -83,7 +83,6 @@ Geant4Kernel::Geant4Kernel(LCDD& lcdd)
   m_sensDetActions = new Geant4SensDetSequences();
   m_context = new Geant4Context(this);
   m_lcdd.addExtension < Geant4Kernel > (this);
-
   declareProperty("UI",m_uiName);
   declareProperty("NumEvents",m_numEvent = 10);
   m_controlName = "/ddg4/";
@@ -111,6 +110,7 @@ Geant4Kernel::~Geant4Kernel() {
   releasePtr (m_runAction);
   deletePtr  (m_sensDetActions);
   deletePtr  (m_context);
+  m_lcdd.removeExtension < Geant4Kernel > (false);
   m_lcdd.destroyInstance();
   InstanceCount::decrement(this);
 }
@@ -221,7 +221,7 @@ Geant4Kernel& Geant4Kernel::registerGlobalAction(Geant4Action* action) {
       action->addRef();
       m_globalActions[nam] = action;
       printout(INFO,"Geant4Kernel","++ Registered global action %s of type %s",
-	       nam.c_str(),typeinfoName(typeid(*action)).c_str());
+	       nam.c_str(),typeName(typeid(*action)).c_str());
       return *this;
     }
     throw runtime_error(format("Geant4Kernel", "DDG4: The action '%s' is already globally "
diff --git a/DDG4/src/Geant4Output2ROOT.cpp b/DDG4/src/Geant4Output2ROOT.cpp
index e4e180823..e5bc2e6a5 100644
--- a/DDG4/src/Geant4Output2ROOT.cpp
+++ b/DDG4/src/Geant4Output2ROOT.cpp
@@ -82,7 +82,7 @@ int Geant4Output2ROOT::fill(const std::string& nam, const ComponentCast& type, v
         m_branches.insert(make_pair(nam, b));
       }
       else {
-        throw runtime_error("No ROOT TClass object availible for object type:" + typeinfoName(type.type));
+        throw runtime_error("No ROOT TClass object availible for object type:" + typeName(type.type));
       }
     }
     else {
diff --git a/DDG4/src/Geant4SensDetAction.cpp b/DDG4/src/Geant4SensDetAction.cpp
index 37adf5d6b..2e906889f 100644
--- a/DDG4/src/Geant4SensDetAction.cpp
+++ b/DDG4/src/Geant4SensDetAction.cpp
@@ -44,7 +44,7 @@ namespace {
           format("Geant4Sensitive", "DDG4: You may only configure actions "
               "for sensitive detectors of type Geant4ActionSD.\n"
               "DDG4: The sensitive detector of %s is of type %s, which is incompatible.", name.c_str(),
-              typeinfoName(typeid(*sd)).c_str()));
+              typeName(typeid(*sd)).c_str()));
     }
     return action_sd;
   }
diff --git a/DDG4/src/Geant4UIManager.cpp b/DDG4/src/Geant4UIManager.cpp
index 1c6990872..a2fbc2107 100644
--- a/DDG4/src/Geant4UIManager.cpp
+++ b/DDG4/src/Geant4UIManager.cpp
@@ -28,7 +28,7 @@ Geant4UIManager::Geant4UIManager(Geant4Context* context, const std::string& name
 {
   declareProperty("SetupUI", m_uiSetup="");
   declareProperty("SetupVIS", m_visSetup="");
-  declareProperty("SessionType", m_sessionType="cmd");
+  declareProperty("SessionType", m_sessionType="tcsh");
   declareProperty("HaveVIS", m_haveVis=false);
   declareProperty("HaveUI", m_haveUI=true);
 }
@@ -40,6 +40,7 @@ Geant4UIManager::~Geant4UIManager()   {
 /// Start visualization
 G4VisManager* Geant4UIManager::startVis()  {
   // Initialize visualization
+  printout(INFO,"Geant4UIManager","+++ Starting G4VisExecutive ....");
   G4VisManager* vis = new G4VisExecutive();
   vis->Initialize();
   return vis;
@@ -49,7 +50,9 @@ G4VisManager* Geant4UIManager::startVis()  {
 G4UIExecutive* Geant4UIManager::startUI()   {
   G4UIExecutive* ui = 0;
   const char* args[] = {"DDG4","",""};
-  ui = new G4UIExecutive(1,(char**)args) ; //,m_sessionType.c_str());
+  printout(INFO,"Geant4UIManager","+++ Starting G4UIExecutive '%s' of type %s....",
+	   args[0], m_sessionType.c_str());
+  ui = new G4UIExecutive(1,(char**)args,m_sessionType.c_str());
   return ui;
 }
 
diff --git a/DDG4/src/ToStream.cpp b/DDG4/src/ToStream.cpp
deleted file mode 100644
index 407c1870b..000000000
--- a/DDG4/src/ToStream.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-// $Id: Geant4Converter.cpp 603 2013-06-13 21:15:14Z markus.frank $
-//====================================================================
-//  AIDA Detector description implementation for LCD
-//--------------------------------------------------------------------
-//
-//  Author     : M.Frank
-//
-//====================================================================
-
-// Framework include files
-#include "DDG4/ToStream.h"
-#include "XML/Evaluator.h"
-
-// C/C++ include files
-#include <stdexcept>
-
-namespace DD4hep {
-  XmlTools::Evaluator& g4Evaluator();
-}
-namespace {
-  XmlTools::Evaluator& eval(DD4hep::g4Evaluator());
-}
-
-using namespace std;
-//==============================================================================
-namespace DD4hep {  namespace Parsers {
-    template <typename T> T evaluate_string(const string& value)   {
-      throw "Bad undefined call";
-    }
-
-    template <> double evaluate_string<double>(const string& value)   {
-      double result = eval.evaluate(value.c_str());
-      if (eval.status() != XmlTools::Evaluator::OK) {
-	cerr << value << ": ";
-	eval.print_error();
-	throw runtime_error("DD4hep::Properties: Severe error during expression evaluation of " + value);
-      }
-      return result;
-    }
-    template <> float evaluate_string<float>(const string& value)   {
-      double result = eval.evaluate(value.c_str());
-      if (eval.status() != XmlTools::Evaluator::OK) {
-	cerr << value << ": ";
-	eval.print_error();
-	throw runtime_error("DD4hep::Properties: Severe error during expression evaluation of " + value);
-      }
-      return (float) result;
-    }
-  }
-}
-
-// ============================================================================
-// print XYZ-point
-ostream& DD4hep::Utils::toStream(const ROOT::Math::XYZPoint&  obj, ostream& s)  {
-  s << "( ";
-  toStream(obj.X () , s );
-  s << " , ";
-  toStream(obj.Y () , s );
-  s << " , ";
-  toStream(obj.Z () , s );
-  s << " )";
-  return s;
-}
-// ============================================================================
-// print XYZ-vector
-ostream& DD4hep::Utils::toStream(const ROOT::Math::XYZVector& obj, ostream& s)  {
-  s << "( ";
-  toStream(obj.X () , s );
-  s << " , ";
-  toStream(obj.Y () , s );
-  s << " , ";
-  toStream(obj.Z () , s );
-  s << " )";
-  return s;
-}
-// ============================================================================
-// print LorentzVector
-ostream& DD4hep::Utils::toStream(const ROOT::Math::PxPyPzEVector& obj, ostream& s){
-  s << "( ";
-  toStream(obj.Px () , s , 12 );
-  s << " , ";
-  toStream(obj.Py () , s , 12 );
-  s << " , ";
-  toStream(obj.Pz () , s , 13 );
-  s << " , ";
-  toStream(obj.E  () , s , 14 );
-  s << " )";
-  return s;
-}
-- 
GitLab