29 if not os.path.exists(name):
30 print(
"MergeCalibFiles - ERROR File name %22s not found" % name)
33 print(
"MergeCalibFiles - Reading: %22s"% name)
35 with open(name)
as fp:
36 lines = fp.readlines()
40 if line.startswith(
"L")
or line.startswith(
"D"):
41 line = line.rstrip(
"\n")
42 splittedline = line.split(
" ")
44 if int(splittedline[1])
in mydict.keys():
45 print(
"MergeCalibFiles - ERROR Module key exists already - Contact pixel offline team")
48 mydict[int(splittedline[1])] = splittedline[0]+
' '+splittedline[1]+
"\n"
49 mod = int(splittedline[1])
52 elif line.startswith(
"I"):
53 mydict[mod] = mydict[mod] + line
55 print(
"MergeCalibFiles - ERROR Line is not a module or a frontend - Contact pixel offline team")