The Gaudi Framework  master (e68eea06)
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
11def getMetaData(path):
12 """
13 Extract job metadata recorded by Gaudi::MetaDataSvc from a file.
14 """
15 import re
16
17 import ROOT
18 from ROOT import TFile
19
20 version = tuple(int(i, 10) for i in re.split(r"\D", ROOT.__version__))
21
22 f = TFile.Open(path)
23 if not f:
24 raise RuntimeError("cannot open {0}".format(path))
25 try:
26 if version < (6, 32):
27 return dict(f.info)
28 else:
29 return {k.decode("utf-8"): v.decode("utf-8") for k, v in f["info"]}
30 except AttributeError:
31 return {}
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition MsgStream.cpp:93
getMetaData(path)
(c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations # # This software i...
Definition __init__.py:11