From 061f6b5e5f71868d22e0f8300dec9c9aca0fe1b5 Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Tue, 15 Mar 2022 19:13:32 +0100 Subject: [PATCH] Save KEY4HEP_STACK env var to metadata (#76) --- k4FWCore/components/PodioOutput.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/k4FWCore/components/PodioOutput.cpp b/k4FWCore/components/PodioOutput.cpp index e44681aa..769b7d49 100644 --- a/k4FWCore/components/PodioOutput.cpp +++ b/k4FWCore/components/PodioOutput.cpp @@ -1,3 +1,5 @@ +#include + #include "PodioOutput.h" #include "k4FWCore/PodioDataSvc.h" #include "TFile.h" @@ -174,6 +176,12 @@ StatusCode PodioOutput::finalize() { } //// finalize trees and file ////////////////////////////// m_file->cd(); + + if(const char* env_key4hep_stack = std::getenv("KEY4HEP_STACK")) { + std::string s_env_key4hep_stack = env_key4hep_stack; + m_metadatatree->Branch("key4hepStack", &s_env_key4hep_stack); + } + m_metadatatree->Branch("gaudiConfigOptions", &config_data); m_metadatatree->Branch("CollectionIDs", m_podioDataSvc->getCollectionIDs());