This commit is contained in:
cetin 2024-02-04 16:56:05 +01:00
parent d6e6879a21
commit c4c839bf25
12 changed files with 1534 additions and 849 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,48 @@
# flake8: noqaq
import inspect
import re
import importlib
import warnings
from collections import OrderedDict
from functools import lru_cache
from html import escape as html_escape
# String that separates a name from its unique ID
_UNIQUE_SEPARATOR = "_"
_IDENTITY_LENGTH = 8
_IDENTITY_TABLE = {}
# If a property ends with this key, it is a pseudo-property which exists to
# hold the data dependencies of another property value
_DATA_DEPENDENCY_KEY_SUFFIX = "_PyConfDataDependencies"
_FLOW_GRAPH_NODE_COLOUR = "aliceblue"
_FLOW_GRAPH_INPUT_COLOUR = "deepskyblue1"
_FLOW_GRAPH_OUTPUT_COLOUR = "coral1"
def unique_name_ext_re():
return "(?:%s[1234567890abcdef]{%s})?" % (_UNIQUE_SEPARATOR, _IDENTITY_LENGTH)
def findRootObjByName(rootFile, name):
"""
Finds the object with given name in the given root file,
where name is a regular expression or a set of them separated by '/' in case directories are used
"""
curObj = rootFile
for n in name.split("/"):
matches = [
k.GetName() for k in curObj.GetListOfKeys() if re.fullmatch(n, k.GetName())
]
if len(matches) > 1:
raise Exception(
"Collision of names in Root : found several objects with name matching %s inside %s : %s"
% (n, curObj.GetName(), matches)
)
if len(matches) == 0:
raise Exception(
"Failed to find object with name %s inside %s" % (n, curObj.GetName())
)
curObj = curObj.Get(matches[0])
return curObj

BIN
thesis/emitted_energy.pdf Normal file

Binary file not shown.

Binary file not shown.