Skip to content

Commit 061f6b5

Browse files
authored
Save KEY4HEP_STACK env var to metadata (#76)
1 parent 49c371c commit 061f6b5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: k4FWCore/components/PodioOutput.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <cstdlib>
2+
13
#include "PodioOutput.h"
24
#include "k4FWCore/PodioDataSvc.h"
35
#include "TFile.h"
@@ -174,6 +176,12 @@ StatusCode PodioOutput::finalize() {
174176
}
175177
//// finalize trees and file //////////////////////////////
176178
m_file->cd();
179+
180+
if(const char* env_key4hep_stack = std::getenv("KEY4HEP_STACK")) {
181+
std::string s_env_key4hep_stack = env_key4hep_stack;
182+
m_metadatatree->Branch("key4hepStack", &s_env_key4hep_stack);
183+
}
184+
177185
m_metadatatree->Branch("gaudiConfigOptions", &config_data);
178186
m_metadatatree->Branch("CollectionIDs", m_podioDataSvc->getCollectionIDs());
179187

0 commit comments

Comments
 (0)