Skip to content
Snippets Groups Projects
Commit 3a0c79e1 authored by Jure Bericic's avatar Jure Bericic
Browse files

Fixed two bugs in merge_maps.py.

parent e9ae7d5e
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,7 @@ class Slot:
string = 'SLOT={0.ID}'.format(self)
if self.comment != '':
string += ' ! {0.comment}'.format(self)
string += '\n'
for k, v in self.KWs.items():
if v > -1:
string += '{}={}\n'.format(k, v)
......@@ -107,12 +108,13 @@ header = {
"signals": [],
}
detectors = [Detector()]
detectors = []
for fileName in fileNames:
# Track detector IDs in current file.
currentIDs = []
detectors.append(Detector())
with open(fileName, 'r') as fi:
for line in fi:
......@@ -246,7 +248,7 @@ with open(mergedName, 'w') as fo:
fo.write('\n{}\n'.format(roc))
for slot in roc.slots:
fo.write('\n{}\n'.format(slot))
fo.write('\n{}'.format(slot))
for channel in slot.channels:
fo.write('{}\n'.format(channel))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment