Skip to content

Commit 5182261

Browse files
committed
Fix #27
This was a regression introduced in 2023-12-07
1 parent f39f57d commit 5182261

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

wirecell/util/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ def convert_multitpc_wires(ctx, face_style, input_file, output_file):
162162
(Optional) "--face-style" allows user to choose a different naming
163163
convention for numbering face. Currently, only "sbnd" is supported.
164164
'''
165-
from wirecell.util.wires import multitpc, persist
165+
from wirecell.util.wires import multitpc, persist, info
166166
store = multitpc.load(input_file, face_style=face_style)
167-
persist.dump(output_file, store)
167+
dstore = persist.todict(store)
168+
persist.dump(output_file, dstore)
169+
168170

169171
@cli.command("convert-icarustpc-wires")
170172
@click.argument("input-file")

wirecell/util/wires/multitpc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,11 @@ def wire_pos(ind):
151151
face_index = store.make("face", face, plane_indices)
152152
by_apa[apa].append(face_index)
153153

154+
apa_indices = list()
154155
for apa, face_indices in sorted(by_apa.items()):
155-
store.make("anode", apa, face_indices)
156-
156+
apa_index = store.make("anode", apa, face_indices)
157+
apa_indices.append(apa_index)
158+
store.make("detector", 0, apa_indices)
157159
return store.schema()
158160

159161

0 commit comments

Comments
 (0)