23def Map(tf, browsable_to, tpath = None):
25 Maps objets as dict[obj_name][0] using a TFile (tf)
and TObject to browse.
28 for k
in browsable_to.GetListOfKeys():
33 m[n] = [tf.Get(tpath +
"/" + n)]
39 A deep-mapping function for one TDirectory
43 names = sorted(to_map.keys())
47 if len(to_map[n]) != 1:
52 tpath_ = tpath +
"/" + n
54 tobject = to_map[n][0]
55 if type(tobject)
is ROOT.TDirectoryFile:
56 m =
Map(tf, tobject, tpath_)
65 Get TTree names from one Data Frame
67 if filename.endswith(
"txt")
or filename.endswith(
"text"):
68 with open(filename)
as f:
71 if line.endswith(
".root"):
72 logging.info(
"Converter manager will use this file from text list : %s", line)
76 f = ROOT.TFile(filename)
84 """ Get TTrees from one DF
87 aod (CLI Argument): CLI Argument for AO2D.root File
90 list: list of all ttres names
in provided AO2D.root File
92 textAodList = aod.startswith("@")
93 endsWithTxt = aod.endswith(
"txt")
or aod.endswith(
"text")
97 if textAodList
and endsWithTxt:
98 aod = aod.replace(
"@",
"")
101 if line.endswith(
".root"):
108 if isinstance(i, dict):
110 ttreeList.append(key)
def Map(tf, browsable_to, tpath=None)
def MappingTFile(filename)
def ExpandDeepTDirs(tf, to_map)