diff --git a/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h b/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h
index 2c8fffe7579980355cc08581e727a7ccd86d360f..4694a71fbf1eb43ea85eebc061d0273c49db4673 100644
--- a/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h
+++ b/Control/AthAnalysisBaseComps/AthAnalysisBaseComps/AthAnalysisHelper.h
@@ -31,6 +31,8 @@
 
 #include "GaudiKernel/ToolHandle.h"
 
+#include "TFile.h"
+
 class AthAnalysisHelper { //thought about being a namespace but went for static methods instead, in case I want private data members in future
 
 public:
@@ -358,6 +360,11 @@ public:
 
 
 
+  //Obtain TFile pointer to THistSvc's output file with the given streamName
+  static TFile* getOutputFile(const std::string& streamName);
+
+
+
 
    ///we keep a static handle to the joboptionsvc, since it's very useful
    ///can e.g. do: AAH::joSvc->readOptions("myJob.opts","$JOBOPTSEARCHPATH")
diff --git a/Control/AthAnalysisBaseComps/src/AthAnalysisHelper.cxx b/Control/AthAnalysisBaseComps/src/AthAnalysisHelper.cxx
index 21bb0fed6058924bdd27d9513a76e1cb4f9a710c..e639c8aa52181ce6b9ce5e441d68d38c54f43fa4 100644
--- a/Control/AthAnalysisBaseComps/src/AthAnalysisHelper.cxx
+++ b/Control/AthAnalysisBaseComps/src/AthAnalysisHelper.cxx
@@ -6,6 +6,10 @@
 
 #include "AthContainers/AuxTypeRegistry.h"
 
+#include "GaudiKernel/AttribStringParser.h"
+#include "TROOT.h"
+#include "boost/algorithm/string/case_conv.hpp"
+
 const std::string AthAnalysisHelper::UNDEFINED = "__UNDEFINED__";
 
 ServiceHandle<IJobOptionsSvc> AthAnalysisHelper::joSvc = ServiceHandle<IJobOptionsSvc>("JobOptionsSvc","AthAnalysisHelper");
@@ -106,3 +110,37 @@ void AthAnalysisHelper::dumpProperties(const IProperty& component) {
     std::cout << p->name() << " = " << p->toString() << std::endl;
   }
 }
+
+
+TFile* AthAnalysisHelper::getOutputFile(const std::string& streamName) {
+  ServiceHandle<IProperty> histSvc("THistSvc","");
+  auto& prop = histSvc->getProperty("Output");
+
+  std::vector<std::string> outputs;
+  if( Gaudi::Parsers::parse(outputs,prop.toString()).isFailure() ) {
+    return nullptr;
+  }
+
+  //extract the DATAFILE part of the string
+  std::string fileName="";
+  for(std::string& output : outputs) {
+    if( output.substr(0,output.find(" "))!=streamName ) continue;
+
+    //got here .. means we found the stream ...
+    for(auto attrib : Gaudi::Utils::AttribStringParser(output.substr(output.find(" ")+1))) {
+      auto TAG = boost::algorithm::to_upper_copy(attrib.tag);
+     
+      if(TAG=="FILE" || TAG=="DATAFILE") {
+	fileName = attrib.value;
+	break;
+      }
+
+    }
+    if(fileName.length()) {
+      return static_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(fileName.c_str()));
+    }
+
+  }
+  return 0;
+
+}