The Gaudi Framework  master (37c0b60a)
GaudiSvc Namespace Reference

Namespaces

 ExtraModules
 

Functions

def getMetaData (path)
 (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE". More...
 

Function Documentation

◆ getMetaData()

def GaudiSvc.getMetaData (   path)

(c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".

# # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. #

Extract job metadata recorded by Gaudi::MetaDataSvc from a file.

Definition at line 11 of file __init__.py.

11 def 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 {}
GaudiSvc.getMetaData
def getMetaData(path)
(c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations # # This software i...
Definition: __init__.py:11
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119