Index: trunk/source/persistency/CMakeLists.txt
===================================================================
--- trunk/source/persistency/CMakeLists.txt	(revision 1350)
+++ trunk/source/persistency/CMakeLists.txt	(revision 1350)
@@ -0,0 +1,42 @@
+#------------------------------------------------------------------------------
+# CMakeLists.txt
+# Module : G4persistency
+# Package: Geant4.src.G4persistency
+#
+# Top level CMakeLists.txt for a Geant4 Global Library
+# or collection of sublibraries
+#
+# Generated on : 24/9/2010
+#
+# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:49:49 bmorgan Exp $
+#
+#------------------------------------------------------------------------------
+
+add_subdirectory(ascii)
+
+# GDML only if required
+if(GEANT4_USE_GDML)
+    add_subdirectory(gdml)
+endif()
+
+add_subdirectory(mctruth)
+
+
+if(NOT GEANT4_BUILD_GRANULAR_LIBS)
+    include(Geant4MacroLibraryTargets)
+    if(GEANT4_USE_GDML)
+        GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4persistency
+            COMPONENTS
+                ascii/sources.cmake
+                gdml/sources.cmake
+                mctruth/sources.cmake
+        )
+    else()
+        GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4persistency
+            COMPONENTS
+                ascii/sources.cmake
+                mctruth/sources.cmake
+        )
+    endif()
+endif()
+
Index: trunk/source/persistency/ascii/CMakeLists.txt
===================================================================
--- trunk/source/persistency/ascii/CMakeLists.txt	(revision 1350)
+++ trunk/source/persistency/ascii/CMakeLists.txt	(revision 1350)
@@ -0,0 +1,18 @@
+#------------------------------------------------------------------------------
+# CMakeLists.txt
+# Module : G4geomtext
+# Package: Geant4.src.G4persistency.G4geomtext
+#
+# CMakeLists.txt for building a single granular library.
+#
+# Generated on : 24/9/2010
+#
+# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:49:57 bmorgan Exp $
+#
+#------------------------------------------------------------------------------
+
+if(GEANT4_BUILD_GRANULAR_LIBS)
+    include(Geant4MacroLibraryTargets)
+    GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
+endif()
+
Index: trunk/source/persistency/ascii/sources.cmake
===================================================================
--- trunk/source/persistency/ascii/sources.cmake	(revision 1350)
+++ trunk/source/persistency/ascii/sources.cmake	(revision 1350)
@@ -0,0 +1,164 @@
+#------------------------------------------------------------------------------
+# sources.cmake
+# Module : G4geomtext
+# Package: Geant4.src.G4persistency.G4geomtext
+#
+# Sources description for a library.
+# Lists the sources and headers of the code explicitely.
+# Lists include paths needed.
+# Lists the internal granular and global dependencies of the library.
+# Source specific properties should be added at the end.
+#
+# Generated on : 24/9/2010
+#
+# $Id: sources.cmake,v 1.1 2010/09/29 18:50:05 bmorgan Exp $
+#
+#------------------------------------------------------------------------------
+
+# List external includes needed.
+include_directories(${CLHEP_INCLUDE_DIRS})
+
+# List internal includes needed.
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/divisions/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/BREPS/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/Boolean/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/CSG/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/specific/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
+
+#
+# Define the Geant4 Module.
+#
+include(Geant4MacroDefineModule)
+GEANT4_DEFINE_MODULE(NAME G4geomtext
+    HEADERS
+        G4tgbDetectorBuilder.hh
+        G4tgbDetectorConstruction.hh
+        G4tgbElement.hh
+        G4tgbGeometryDumper.hh
+        G4tgbIsotope.hh
+        G4tgbMaterial.hh
+        G4tgbMaterialMgr.hh
+        G4tgbMaterialMixture.hh
+        G4tgbMaterialMixtureByNoAtoms.hh
+        G4tgbMaterialMixtureByVolume.hh
+        G4tgbMaterialMixtureByWeight.hh
+        G4tgbMaterialSimple.hh
+        G4tgbPlaceParamCircle.hh
+        G4tgbPlaceParamLinear.hh
+        G4tgbPlaceParamSquare.hh
+        G4tgbPlaceParameterisation.hh
+        G4tgbRotationMatrix.hh
+        G4tgbRotationMatrixMgr.hh
+        G4tgbVolume.hh
+        G4tgbVolumeMgr.hh
+        G4tgrElement.hh
+        G4tgrElementFromIsotopes.hh
+        G4tgrElementSimple.hh
+        G4tgrEvaluator.hh
+        G4tgrFileIn.hh
+        G4tgrFileReader.hh
+        G4tgrIsotope.hh
+        G4tgrLineProcessor.hh
+        G4tgrMaterial.hh
+        G4tgrMaterialFactory.hh
+        G4tgrMaterialMixture.hh
+        G4tgrMaterialSimple.hh
+        G4tgrMessenger.hh
+        G4tgrParameterMgr.hh
+        G4tgrPlace.hh
+        G4tgrPlaceDivRep.hh
+        G4tgrPlaceParameterisation.hh
+        G4tgrPlaceSimple.hh
+        G4tgrRotationMatrix.hh
+        G4tgrRotationMatrixFactory.hh
+        G4tgrSolid.hh
+        G4tgrSolidBoolean.hh
+        G4tgrUtils.hh
+        G4tgrVolume.hh
+        G4tgrVolumeAssembly.hh
+        G4tgrVolumeDivision.hh
+        G4tgrVolumeMgr.hh
+    SOURCES
+        G4tgbDetectorBuilder.cc
+        G4tgbDetectorConstruction.cc
+        G4tgbElement.cc
+        G4tgbGeometryDumper.cc
+        G4tgbIsotope.cc
+        G4tgbMaterial.cc
+        G4tgbMaterialMgr.cc
+        G4tgbMaterialMixture.cc
+        G4tgbMaterialMixtureByNoAtoms.cc
+        G4tgbMaterialMixtureByVolume.cc
+        G4tgbMaterialMixtureByWeight.cc
+        G4tgbMaterialSimple.cc
+        G4tgbPlaceParamCircle.cc
+        G4tgbPlaceParamLinear.cc
+        G4tgbPlaceParamSquare.cc
+        G4tgbPlaceParameterisation.cc
+        G4tgbRotationMatrix.cc
+        G4tgbRotationMatrixMgr.cc
+        G4tgbVolume.cc
+        G4tgbVolumeMgr.cc
+        G4tgrElement.cc
+        G4tgrElementFromIsotopes.cc
+        G4tgrElementSimple.cc
+        G4tgrEvaluator.cc
+        G4tgrFileIn.cc
+        G4tgrFileReader.cc
+        G4tgrIsotope.cc
+        G4tgrLineProcessor.cc
+        G4tgrMaterial.cc
+        G4tgrMaterialFactory.cc
+        G4tgrMaterialMixture.cc
+        G4tgrMaterialSimple.cc
+        G4tgrMessenger.cc
+        G4tgrParameterMgr.cc
+        G4tgrPlace.cc
+        G4tgrPlaceDivRep.cc
+        G4tgrPlaceParameterisation.cc
+        G4tgrPlaceSimple.cc
+        G4tgrRotationMatrix.cc
+        G4tgrRotationMatrixFactory.cc
+        G4tgrSolid.cc
+        G4tgrSolidBoolean.cc
+        G4tgrUtils.cc
+        G4tgrVolume.cc
+        G4tgrVolumeAssembly.cc
+        G4tgrVolumeDivision.cc
+        G4tgrVolumeMgr.cc
+    GRANULAR_DEPENDENCIES
+        G4brep
+        G4csg
+        G4geomBoolean
+        G4geomdivision
+        G4geometrymng
+        G4globman
+        G4graphics_reps
+        G4hepnumerics
+        G4intercoms
+        G4materials
+        G4partman
+        G4specsolids
+        G4volumes
+    GLOBAL_DEPENDENCIES
+        G4geometry
+        G4global
+        G4graphics_reps
+        G4intercoms
+        G4materials
+        G4particles
+    LINK_LIBRARIES
+)
+
+# List any source specific properties here
+
Index: trunk/source/persistency/gdml/CMakeLists.txt
===================================================================
--- trunk/source/persistency/gdml/CMakeLists.txt	(revision 1350)
+++ trunk/source/persistency/gdml/CMakeLists.txt	(revision 1350)
@@ -0,0 +1,18 @@
+#------------------------------------------------------------------------------
+# CMakeLists.txt
+# Module : G4gdml
+# Package: Geant4.src.G4persistency.G4gdml
+#
+# CMakeLists.txt for building a single granular library.
+#
+# Generated on : 24/9/2010
+#
+# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:50:13 bmorgan Exp $
+#
+#------------------------------------------------------------------------------
+
+if(GEANT4_BUILD_GRANULAR_LIBS)
+    include(Geant4MacroLibraryTargets)
+    GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
+endif()
+
Index: trunk/source/persistency/gdml/include/G4GDMLMessenger.hh
===================================================================
--- trunk/source/persistency/gdml/include/G4GDMLMessenger.hh	(revision 1350)
+++ trunk/source/persistency/gdml/include/G4GDMLMessenger.hh	(revision 1350)
@@ -0,0 +1,76 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4GDMLMessenger.hh,v 1.3 2010/11/02 11:44:15 gcosmo Exp $
+// GEANT4 tag $Name: gdml-V09-03-09 $
+//
+//
+// class G4GDMLMessenger
+//
+// Class description:
+//
+// GDML UI messenger.
+
+// History:
+// - Created.                                  Witold Pokorski, October 2010
+// -------------------------------------------------------------------------
+
+#ifndef G4GDMLMessenger_h
+#define G4GDMLMessenger_h 1
+
+#include "globals.hh"
+#include "G4UImessenger.hh"
+#include "G4VPhysicalVolume.hh"
+
+class G4GDMLParser;
+class G4UIdirectory;
+class G4UIcmdWithAString;
+class G4UIcmdWithADoubleAndUnit;
+class G4UIcmdWithoutParameter;
+
+class G4GDMLMessenger : public G4UImessenger
+{
+  public:  // with description
+
+    G4GDMLMessenger(G4GDMLParser*);
+   ~G4GDMLMessenger();
+    
+    void SetNewValue(G4UIcommand*, G4String);
+    
+  private:
+
+    G4GDMLParser* myParser;
+    G4LogicalVolume* topvol;
+    
+    G4UIdirectory*             persistencyDir;
+    G4UIdirectory*             gdmlDir;
+    G4UIcmdWithAString*        ReaderCmd;
+    G4UIcmdWithAString*        WriterCmd;    
+    G4UIcmdWithAString*        TopVolCmd;    
+    G4UIcmdWithoutParameter*   ClearCmd;    
+};
+
+#endif
Index: trunk/source/persistency/gdml/sources.cmake
===================================================================
--- trunk/source/persistency/gdml/sources.cmake	(revision 1350)
+++ trunk/source/persistency/gdml/sources.cmake	(revision 1350)
@@ -0,0 +1,133 @@
+#------------------------------------------------------------------------------
+# sources.cmake
+# Module : G4gdml
+# Package: Geant4.src.G4persistency.G4gdml
+#
+# Sources description for a library.
+# Lists the sources and headers of the code explicitely.
+# Lists include paths needed.
+# Lists the internal granular and global dependencies of the library.
+# Source specific properties should be added at the end.
+#
+# Generated on : 24/9/2010
+#
+# $Id: sources.cmake,v 1.2 2010/11/02 10:40:06 gcosmo Exp $
+#
+#------------------------------------------------------------------------------
+
+# List external includes needed.
+include_directories(${CLHEP_INCLUDE_DIRS})
+
+# Need XercesC
+include_directories(${XERCESC_INCLUDE_DIRS})
+
+# List internal includes needed.
+include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/digits/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/event/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/divisions/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/Boolean/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/CSG/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/specific/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/run/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
+
+#
+# Define the Geant4 Module.
+#
+include(Geant4MacroDefineModule)
+GEANT4_DEFINE_MODULE(NAME G4gdml
+    HEADERS
+        G4GDMLEvaluator.hh
+        G4GDMLMessenger.hh
+        G4GDMLParameterisation.hh
+        G4GDMLParser.hh
+        G4GDMLParser.icc
+        G4GDMLRead.hh
+        G4GDMLReadDefine.hh
+        G4GDMLReadMaterials.hh
+        G4GDMLReadParamvol.hh
+        G4GDMLReadSetup.hh
+        G4GDMLReadSolids.hh
+        G4GDMLReadStructure.hh
+        G4GDMLWrite.hh
+        G4GDMLWriteDefine.hh
+        G4GDMLWriteMaterials.hh
+        G4GDMLWriteParamvol.hh
+        G4GDMLWriteSetup.hh
+        G4GDMLWriteSolids.hh
+        G4GDMLWriteStructure.hh
+        G4STRead.hh
+    SOURCES
+        G4GDMLEvaluator.cc
+        G4GDMLMessenger.cc
+        G4GDMLParameterisation.cc
+        G4GDMLParser.cc
+        G4GDMLRead.cc
+        G4GDMLReadDefine.cc
+        G4GDMLReadMaterials.cc
+        G4GDMLReadParamvol.cc
+        G4GDMLReadSetup.cc
+        G4GDMLReadSolids.cc
+        G4GDMLReadStructure.cc
+        G4GDMLWrite.cc
+        G4GDMLWriteDefine.cc
+        G4GDMLWriteMaterials.cc
+        G4GDMLWriteParamvol.cc
+        G4GDMLWriteSetup.cc
+        G4GDMLWriteSolids.cc
+        G4GDMLWriteStructure.cc
+        G4STRead.cc
+    GRANULAR_DEPENDENCIES
+        G4csg
+        G4digits
+        G4event
+        G4geomBoolean
+        G4geomdivision
+        G4geometrymng
+        G4globman
+        G4graphics_reps
+        G4hepnumerics
+        G4hits
+        G4intercoms
+        G4materials
+        G4navigation
+        G4partman
+        G4procman
+        G4run
+        G4specsolids
+        G4track
+        G4tracking
+        G4volumes
+    GLOBAL_DEPENDENCIES
+        G4digits_hits
+        G4event
+        G4geometry
+        G4global
+        G4graphics_reps
+        G4intercoms
+        G4materials
+        G4particles
+        G4processes
+        G4run
+        G4track
+        G4tracking
+    LINK_LIBRARIES
+        ${XERCESC_LIBRARIES}
+)
+
+# List any source specific properties here
+
Index: trunk/source/persistency/gdml/src/G4GDMLMessenger.cc
===================================================================
--- trunk/source/persistency/gdml/src/G4GDMLMessenger.cc	(revision 1350)
+++ trunk/source/persistency/gdml/src/G4GDMLMessenger.cc	(revision 1350)
@@ -0,0 +1,113 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+//
+// $Id: G4GDMLMessenger.cc,v 1.3 2010/11/02 11:44:15 gcosmo Exp $
+// GEANT4 tag $Name: gdml-V09-03-09 $
+//
+//
+// class G4GDMLMessenger Implementation
+//
+// -------------------------------------------------------------------------
+
+#include "G4GDMLMessenger.hh"
+#include "G4GDMLParser.hh"
+
+#include "globals.hh"
+#include "G4RunManager.hh"
+#include "G4UIdirectory.hh"
+#include "G4UIcmdWithAString.hh"
+#include "G4UIcmdWithoutParameter.hh"
+#include "G4GeometryManager.hh"
+#include "G4LogicalVolumeStore.hh"
+#include "G4PhysicalVolumeStore.hh"
+#include "G4SolidStore.hh"
+
+G4GDMLMessenger::G4GDMLMessenger(G4GDMLParser* myPars)
+  : myParser(myPars), topvol(0)
+{ 
+  persistencyDir = new G4UIdirectory("/persistency/");
+  persistencyDir->SetGuidance("UI commands specific to persistency.");
+  
+  gdmlDir = new G4UIdirectory("/persistency/gdml/");
+  gdmlDir->SetGuidance("GDML parser and writer.");
+  
+  ReaderCmd = new G4UIcmdWithAString("/persistency/gdml/read",this);
+  ReaderCmd->SetGuidance("Read GDML file.");
+  ReaderCmd->SetParameterName("filename",false);
+  ReaderCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+
+  TopVolCmd = new G4UIcmdWithAString("/persistency/gdml/topvol",this);
+  TopVolCmd->SetGuidance("Set the top volume for writing the GDML file.");
+  TopVolCmd->SetParameterName("topvol",false);
+
+  WriterCmd = new G4UIcmdWithAString("/persistency/gdml/write",this);
+  WriterCmd->SetGuidance("Write GDML file.");
+  WriterCmd->SetParameterName("filename",false);
+  WriterCmd->AvailableForStates(G4State_Idle);
+
+  ClearCmd = new G4UIcmdWithoutParameter("/persistency/gdml/clear",this);
+  ClearCmd->SetGuidance("Clear geometry (before reading a new one from GDML).");
+  ClearCmd->AvailableForStates(G4State_Idle);
+}
+
+G4GDMLMessenger::~G4GDMLMessenger()
+{
+  delete ReaderCmd;
+  delete WriterCmd;
+  delete ClearCmd;
+  delete TopVolCmd;
+  delete persistencyDir;
+  delete gdmlDir;
+}
+
+void G4GDMLMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
+{ 
+  if( command == ReaderCmd )
+  { 
+    G4GeometryManager::GetInstance()->OpenGeometry();
+    myParser->Read(newValue);
+    G4RunManager::GetRunManager()->DefineWorldVolume(myParser->GetWorldVolume());
+  }
+
+  if( command == TopVolCmd )
+  {
+    topvol = G4LogicalVolumeStore::GetInstance()->GetVolume(newValue);
+  }
+   
+  if( command == WriterCmd )
+  {
+    myParser->Write(newValue, topvol);
+  }  
+
+  if( command == ClearCmd )
+  { 
+    myParser->Clear();
+    G4GeometryManager::GetInstance()->OpenGeometry();
+    G4PhysicalVolumeStore::Clean();
+    G4LogicalVolumeStore::Clean();
+    G4SolidStore::Clean();
+  }  
+}
Index: trunk/source/persistency/mctruth/CMakeLists.txt
===================================================================
--- trunk/source/persistency/mctruth/CMakeLists.txt	(revision 1350)
+++ trunk/source/persistency/mctruth/CMakeLists.txt	(revision 1350)
@@ -0,0 +1,18 @@
+#------------------------------------------------------------------------------
+# CMakeLists.txt
+# Module : G4mctruth
+# Package: Geant4.src.G4persistency.G4mctruth
+#
+# CMakeLists.txt for building a single granular library.
+#
+# Generated on : 24/9/2010
+#
+# $Id: CMakeLists.txt,v 1.1 2010/09/29 18:50:29 bmorgan Exp $
+#
+#------------------------------------------------------------------------------
+
+if(GEANT4_BUILD_GRANULAR_LIBS)
+    include(Geant4MacroLibraryTargets)
+    GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
+endif()
+
Index: trunk/source/persistency/mctruth/History
===================================================================
--- trunk/source/persistency/mctruth/History	(revision 1350)
+++ trunk/source/persistency/mctruth/History	(revision 1350)
@@ -0,0 +1,312 @@
+
+     =========================================================
+     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
+     =========================================================
+
+                      Category History file
+                      ---------------------
+This file should be used by G4 developers and category coordinators
+to briefly summarize all major modifications introduced in the code
+and keep track of all category-tags.
+It DOES NOT substitute the  CVS log-message one should put at every
+committal in the CVS repository !
+
+     ----------------------------------------------------------
+     * Reverse chronological order (last date on top), please *
+     ----------------------------------------------------------
+
+14 October, 10  G.Cosmo (mctruth-V09-03-01)
+- Fixed possible case of NULL forward in G4PersistencyCenter class.
+
+19 July, 10  G.Cosmo (mctruth-V09-03-00)
+- Fixed recursive header inclusion in G4PersistencyCenter class.
+- Added dummy initialization of data members in constructors in classes:
+  G4MCTSimParticle, G4MCTSimVertex and G4PersistencyCenter.
+- Added History file to 'mctruth' module.
+
+17 October, 07  G.Cosmo
+- Moved existing classes to "mctruth" sub-module; renamed libraries.
+
+14 November, 06  G.Cosmo (persistency-V08-01-02)
+- Cleared trivial compilation warnings in G4PersistencyManager implementation.
+- Added setup for retrieving HepMC in case G4LIB_USE_HEPMC is set and the
+  HEPMC_DIR path defined in the environment.
+
+30 October, 06  W.Pokorski (persistency-V08-01-01)
+- Put 'ifdef G4LIB_USE_HEPMC' in all the places which explicitly use HepMC
+  classes to allow compilation with CLHEP 2.0.3.0.
+
+22 August, 06  G.Cosmo (persistency-V08-01-00)
+- Get Rid of useless forward declarations in G4MCTEvent and G4MCTGenParticle
+  header files. Clearing compilation warnings on icc-9.X compilers.
+
+28 June, 05  G.Cosmo (persistency-V07-01-01)
+- Trivial fixes to G4MCTSimParticle and G4MCTSimVertex to support for
+  CLHEP-2.0.X series.
+
+28 June, 05  G.Cosmo (persistency-V07-01-00)
+- Migration to <sstream> for G4MCTSimParticle and G4MCTSimVertex.
+
+07 June, 04  G.Cosmo (persistency-V06-01-00)
+- GNUmakefile: added definition of GLOBLIBS for DLLs support on Windows.
+
+04 October, 03  G.Cosmo (persistency-V05-02-00)
+- GNUmakefile:
+  o replaced "digits+hits" with "digits_hits".
+- Coworks with "geometry-V05-02-00" and "digits_hits-V05-02-00".
+
+04 June, 03   G.Cosmo (persistency-V05-01-01)
+- Fixes for inclusion of <strstream> in G4MCTSimParticle.cc and
+  G4MCTSimVertex.cc in view of the g4std wrappers migration.
+- Fixed warning on SUN-CC for G4PersistencyCenterMessenger.
+
+30 May, 03   G.Cosmo (persistency-V05-01-00)
+- Fixed few pedantic warnings...
+
+05 February, 03   G.Cosmo (persistency-V05-00-00)
+- Corrected inclusion of headers for constant and units from CLHEP.
+
+04 December, 02   Y.Morita (persistency-V04-01-02)
+- G4PersistencyManager.cc: protect for default persistency manager
+- G4PersistencyCenter.cc: bug fixes, disable HepMC/MCTruth printout
+- GetG4->Get, CurrentG4->Current
+- SetG4->Set, RegisterG4->Register, DeleteG4->Delete
+
+04 December, 02   G.Cosmo (persistency-V04-01-01)
+- Corrections to comply to G4 coding rules:
+  o use of g4std/ headers for STL classes;
+  o use G4std:: instead of std::
+  o use of G4 types (limited to G4bool, G4cout, G4endl, G4cerr)
+- Fixes for porting on Windows platform:
+  o HepMC is not currently supported by CLHEP on Windows, so must be
+    excluded from compilation  on Windows systems.
+
+29 November, 02   Y.Morita (persistency-V04-01-00)
+- tools for developers
+
+23 November, 02   Y.Morita
+- new abstract interface for persistency for release 5.0.
+- for actual implementation of HepODBMS and ROOT I/O, see
+  $G4INSTALL/examples/extended/persistency/README.
+
+7 December, 01    Y.Morita (persistency-V03-02-02)
+- added G4Pglobals.hh to G4PVHits and G4PVDigits for g++ 2.95.2 headers
+
+6 July, 01    Y.Morita (persistency-V03-02-01)
+- added more SRM descriptions
+
+4 July, 01    Y.Morita (persistency-V03-02-00)
+- STL migration: 
+   modified: G4Pglobals.hh, G4PGeometryObjectMap.ddl, G4PGeometryObjectMap.cc
+   removed: G4VPhysVolRefArray.hh, G4LogVolRefArray.hh G4VSolidRefArray.hh
+
+21 June, 01    Y.Morita (persistency-V03-01-00)
+- new tag for release 3.2
+
+28 April, 01   Y.Morita
+- Change NULL to 0
+
+25 April, 01   G.Cosmo
+- Removed redundant declarations of G4ThreeVectorList in CSG schemas:
+  G4PPara.ddl, G4PSphere.ddl and G4PTrap.ddl.
+  Required to cowork with recent migration to STL vector of geometry code.
+
+15 March, 01   Y.Morita (persistency-V03-00-02)
+- Updated GNUmakefile for new config.
+
+14 March, 01   Y.Morita (persistency-V03-00-01)
+- G4PDCofThisEvent.ddl: fixed a bug in GetNumberOfCollections()
+
+08 March, 01   G.Cosmo (persistency-V03-00-00)
+- G4Pglobals.hh: substituted inclusion of G4UnitsTest.hh with G4SIUnits.hh
+  according to tag "global-V03-00-06".
+
+15 December, 00   Y.Morita (persistency-V02-00-03)
+- added more SRM comments
+
+5 December, 00   Y.Morita (persistency-V02-00-02)
+- added SRM comments to some classes
+
+17 November, 00  Y.Morita (persistency-V02-00-01)
+- more workaround on G4PGeometryObjectMap for ooddlx
+
+2 November, 00  Y.Morita (persistency-V02-00-00)
+- created global/include/G4Pglobals.hh
+- workaround to protect old ooddlx from new STL syntax.
+
+9 June, 00   Y.Morita (persistency-V01-00-02)
+- added material in G4PersistentGeomMan::Retrieve()
+
+11 May, 00   Y.Morita (persistency-V01-00-01)
+- moved G4PHype from geometry/solids/CSG to geometry/solids/specific
+- modified GNUmakefile's to add G4pspecsolids
+
+23 Feburuary, 00   Y.Morita (persistency-V01-00-00)
+- fixed a minor typo in G4PersistentGeomMan.cc
+
+December 6, 99   Y.Morita (persistency-V00-01-12)
+- Bug fix in G4PGeometryObjectMap.cc
+
+December 5, 99   Y.Morita (persistency-V00-01-11)
+- added G4PPrimaryParticle
+
+December 2, 99   Y.Morita (persistency-V00-01-10)
+- bug fix in G4PHCofThisEvent, G4PHCofThisEvent, G4PersistentEventMan
+
+December 1, 99   Y.Morita (persistency-V00-01-09)
+- fix for HP-aCC, Geant4 NamedSchema
+- added G4TMPDIR to GNUmakefile include path
+
+November 29, 99  Y.Morita (persistency-V00-01-08)
+- bug fix for persistent hits (works with PersistentEx02-V00-01-01)
+
+November 26, 99  Y.Morita
+- Introduced G4TransactionManager for sustained transaction control
+
+November 23, 99  Y.Morita (persistency-V00-01-07)
+- bug fix in G4PersistentEventMan, G4PersistentGeomMan, G4PersistentRunMan
+- use /db commands
+
+November 22, 99  Y.Morita
+- added digits+hits/digits
+- removed dependency of transient hits
+- introduced G4PersistencyMessenger
+
+November 20, 99  Y.Morita
+- Introduced G4PersistentSchema.hh to use Geant4 named schema
+  (requires config-V00-01-12)
+
+November 19, 99  Y.Morita (persistency-V00-01-06)
+- bug fixes in G4PersistentEventMan.cc and G4PersistentRunMan.cc
+
+November 18, 99  Y.Morita
+- Use absolute path in GNUmakefile to include right dependencies for liblist
+- bug fixes in G4PBooleanSolid, G4PersistentEventMan
+
+November 17, 99  Y.Morita
+- Move schema header files from tmp to schema/include (requires new config)
+
+November 16, 99  Y.Morita
+- more fix on circular dependencies:
+  + Moved G4PVSolids and G4PAffineTransform to pgeomGlobal
+  + G4PersistencyManager: Splitted classes into separate objects
+  + Added G4PersistentHitMan
+
+November 12, 99  Y.Morita
+- GNUmakefile fix for dependency files
+- Use d_Varray<d_Ref<>> instead of HepRefVArray()
+
+November 12, 99  Y.Morita (persistency-V00-01-05)
+- Fix for RW->G4RW changes
+- Bug fixes:
+  +Container of PrimaryVertex in G4PEvent
+  +Association of Boolean Solids
+
+November 10, 99  Y.Morita (persistency-V00-01-04)
+- Added Boolean Solid Types
+
+November 9, 99  Y.Morita (persistency-V00-01-03)
+- Bug fix in G4PEvent, G4PHCofThisEvent, G4PVHitsCollection,
+  G4PersistencyManager, G4PersistentEventMan
+- Mod GNUmakefile
+
+November 8, 99  Y.Morita (persistency-V00-01-02)
+- Modified HepVArray/HepRefVArray to d_Varray<>, d_Varray<d_Ref<>>
+- Modified ooRef() to d_Ref<>
+- Some mod G4int to G4Pint
+- G4PEvent: Set associations to G4PPrimaryVertex, G4PHCofThisEvent
+- Created G4PVHitsCollection and G4PHCofThisEvent
+
+November 4, 99  Y.Morita
+- ./GNUmakefile: Added G4phits
+- digits+hits/hits/GNUmakefile:
+   Added G4OODDLX_BOOT
+   Added explicit dependencies of G4PHCofThisEvent.hh: G4PVHitsCollection.hh
+- moved G4PLogicalVolume from persistency/geometry/volumes to
+  persistency/geometry/management to avoid circular dependency
+- G4PersistencyManager: Allow constructor with the name of Boot file
+
+October 27, 99  J.Allison 
+- Created persistency/global/include.
+- Moved management/include/G4PersistentTypes.hh to global/include.
+- Modified GNUmakefiles to add persistency/global/include to -I path.
+
+October 21, 99  Y.Morita (persistency-V00-01-01)
+- One more bug fix in G4PEvent.cc (thePrimaryVertex)
+
+October 8, 99  Y.Morita (persistency-V00-01-00)
+- GNUmakefile changes for G4TMPSCHEMA_BOOT (requires config-V00-01-01)
+- Bug fix in G4PEvent.cc (thePrimaryVertex)
+
+April 29, 99  Y.Morita (persistency-00-04-01)
+- removed overlapping definition of HepRefVArray for G4PVPhysicalVolume
+  in G4PGeometryObjectMap.cc
+- Fixed a typo in G4PersistentGeomMan.cc
+
+November 15, 98  Y.Morita (persistency-00-03-03)
+- Fix bug in G4PVPhysicalVolume.cc
+
+November 10, 98  Y.Morita (persistency-00-03-02)
+- G4PersistentGeomMan now handle Replica geometry
+
+November 10, 98  Y.Morita (persistency-00-03-01)
+- G4PersistencyManager splitted into G4PersistentEventMan, 
+  G4PersistentGeomMan, G4PersistentRunMan
+- G4Run is now persistent
+
+July 23, 98   Y.Morita (persistency-00-01-09)
+- G4PVPhysicalVolume: protect declare of d_Double with 
+  OO_VARRAY_D_DOUBLE for different version of HepODBMS
+- G4PVPhysicalVolume: added G4Exception for restoring rotation matrix
+  (for now)
+
+July 15, 98   Y.Morita (persistency-00-01-08)
+- revised "cleandb" target in GNUmakefile
+- g4odbms_setup.csh cosmetics
+
+July 15, 98   Y.Morita (persistency-00-01-07)
+- absorb oodlx compiler differences on CERN AIX-AFS
+
+July 14, 98   Y.Morita (persistency-00-01-06)
+- Bug fix on store geometry
+- added G4ODBMS := true to GNUmakefile
+
+July 11, 98   Y.Morita (persistency-00-01-05)
+- script clean up for test/g4odbms_setup.csh
+
+July 10, 98   Y.Morita (persistency-00-01-04)
+- updated test/GNUmakefile
+- fixed a bug in G4PersistencyManager
+- digits+hits/hits added
+
+July 10, 98   Y.Morita (persistency-00-01-03)
+- moved GNUmakefile targes 'headers' and 'd_files' to common.gmk and
+  globlib.gmk.
+- a few bug fix in G4PPVPlacement.cc, G4PVSolid.cc,
+  G4PGeometryObjectMap.ddl, G4PersistencyManager.hh, 
+  G4PGeometryObjectMap.cc, G4PersistencyManager.cc
+
+July  9, 98   Y.Morita
+- new GNUmakefile for pre-beta01 (persistency-00-01-02)
+
+July  8, 98   Y.Morita
+- debug physics volume and logical volume (persistency-00-01-01)
+
+June 30, 98  Y.Morita
+- added geometry persistency: (persistency-00-07-01)
+
+June 15, 98  Y.Morita
+- made new subcategories: digits+hits, geometry, events, management, run
+
+June 11, 98  Y.Morita (persistency-00-06-01)
+- G4PersistencyManager uses HepDbApplication rather than inherit
+- Tagged.
+
+April 21, 98 G.Cosmo (persistency-00-05-01)
+- Tagged.
+
+March 24, 98 G.Barrand
+- GNUmakefile : MAKESHLIB changed in G4MAKESHLIB
+
+March 24, 98 G.Barrand
+- Creation of this file.
Index: trunk/source/persistency/mctruth/sources.cmake
===================================================================
--- trunk/source/persistency/mctruth/sources.cmake	(revision 1350)
+++ trunk/source/persistency/mctruth/sources.cmake	(revision 1350)
@@ -0,0 +1,113 @@
+#------------------------------------------------------------------------------
+# sources.cmake
+# Module : G4mctruth
+# Package: Geant4.src.G4persistency.G4mctruth
+#
+# Sources description for a library.
+# Lists the sources and headers of the code explicitely.
+# Lists include paths needed.
+# Lists the internal granular and global dependencies of the library.
+# Source specific properties should be added at the end.
+#
+# Generated on : 24/9/2010
+#
+# $Id: sources.cmake,v 1.1 2010/09/29 18:50:38 bmorgan Exp $
+#
+#------------------------------------------------------------------------------
+
+# List external includes needed.
+include_directories(${CLHEP_INCLUDE_DIRS})
+
+# List internal includes needed.
+include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/digits/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/event/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/run/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
+include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
+
+#
+# Define the Geant4 Module.
+#
+include(Geant4MacroDefineModule)
+GEANT4_DEFINE_MODULE(NAME G4mctruth
+    HEADERS
+        G4DCIOcatalog.hh
+        G4DCIOentryT.hh
+        G4FileUtilities.hh
+        G4HCIOcatalog.hh
+        G4HCIOentryT.hh
+        G4MCTEvent.hh
+        G4MCTGenEvent.hh
+        G4MCTGenParticle.hh
+        G4MCTSimEvent.hh
+        G4MCTSimParticle.hh
+        G4MCTSimVertex.hh
+        G4PersistencyCenter.hh
+        G4PersistencyCenterMessenger.hh
+        G4PersistencyManager.hh
+        G4PersistencyManagerT.hh
+        G4Pevent.hh
+        G4VDCIOentry.hh
+        G4VHCIOentry.hh
+        G4VHepMCIO.hh
+        G4VMCTruthIO.hh
+        G4VPDigitIO.hh
+        G4VPDigitsCollectionIO.hh
+        G4VPEventIO.hh
+        G4VPHitIO.hh
+        G4VPHitsCollectionIO.hh
+        G4VTransactionManager.hh
+    SOURCES
+        G4DCIOcatalog.cc
+        G4FileUtilities.cc
+        G4HCIOcatalog.cc
+        G4MCTEvent.cc
+        G4MCTGenEvent.cc
+        G4MCTSimEvent.cc
+        G4MCTSimParticle.cc
+        G4MCTSimVertex.cc
+        G4PersistencyCenter.cc
+        G4PersistencyCenterMessenger.cc
+        G4PersistencyManager.cc
+        G4Pevent.cc
+        G4VDCIOentry.cc
+        G4VHCIOentry.cc
+        G4VHepMCIO.cc
+        G4VMCTruthIO.cc
+        G4VPDigitIO.cc
+        G4VPDigitsCollectionIO.cc
+        G4VPEventIO.cc
+        G4VPHitIO.cc
+        G4VPHitsCollectionIO.cc
+    GRANULAR_DEPENDENCIES
+        G4digits
+        G4event
+        G4geometrymng
+        G4globman
+        G4hits
+        G4intercoms
+        G4partman
+        G4run
+        G4track
+        G4tracking
+    GLOBAL_DEPENDENCIES
+        G4digits_hits
+        G4event
+        G4geometry
+        G4global
+        G4intercoms
+        G4particles
+        G4run
+        G4track
+        G4tracking
+    LINK_LIBRARIES
+)
+
+# List any source specific properties here
+
