We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb014f6 commit cce313eCopy full SHA for cce313e
Common/Constants/include/CommonConstants/make_pdg_header.py
@@ -22,7 +22,11 @@
22
from ctypes import c_bool
23
from enum import Enum
24
25
-import ROOT # pylint: disable=import-error
+try:
26
+ import ROOT # pylint: disable=import-error
27
+ from ROOT import o2
28
+except (ModuleNotFoundError, ImportError) as exc:
29
+ raise Exception("O2 environment is not loaded.") from exc
30
31
32
# Enum of PDG_t particles
@@ -150,7 +154,7 @@ class Pdg(Enum):
150
154
kLambda1520_Py = 102134 # PYTHIA code different from PDG
151
155
152
156
153
-dbPdg = ROOT.o2.O2DatabasePDG
157
+dbPdg = o2.O2DatabasePDG
158
159
160
def mass(code):
0 commit comments