From 65aa83094a760c97abc83b69ca61aa0cb53b3b38 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Mon, 23 Nov 2015 15:47:26 +0000
Subject: [PATCH] Add Geant4 and DD4hep versions to runHeader

---
 DDG4/lcio/Geant4Output2LCIO.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/DDG4/lcio/Geant4Output2LCIO.cpp b/DDG4/lcio/Geant4Output2LCIO.cpp
index b48f58c9e..abbdf18d9 100644
--- a/DDG4/lcio/Geant4Output2LCIO.cpp
+++ b/DDG4/lcio/Geant4Output2LCIO.cpp
@@ -19,6 +19,9 @@
 #include "DD4hep/VolumeManager.h"
 #include "DDG4/Geant4OutputAction.h"
 
+#include "DD4hep/LCDD.h"
+#include <G4Version.hh>
+
 // lcio include files
 #include "lcio.h"
 #include "IO/LCWriter.h"
@@ -170,6 +173,8 @@ void Geant4Output2LCIO::saveRun(const G4Run* run)  {
   for (std::map< std::string, std::string >::iterator it = m_runHeader.begin(); it != m_runHeader.end(); ++it) {
     rh->parameters().setValue( it->first, it->second );
   }
+  rh->parameters().setValue("GEANT4Version", G4Version);
+  rh->parameters().setValue("DD4HEPVersion", versionString());
   rh->setRunNumber(m_runNo=run->GetRunID());
   rh->setDetectorName(context()->lcdd().header().name());
   m_file->writeRunHeader(rh);
-- 
GitLab