1 from __future__
import print_function
3 from builtins
import range
10 def list_diff(self,aList1, aList2, string1, string2):
11 "Searches for differences between two modules of the same kind" 13 for i
in range(2,len(aList1)):
14 for j
in range(2,len(aList2)):
15 if (i==j)
and (aList1[i]!=aList2[j]):
16 if aList1[i][:(aList1[i].
index(
'=')+1)] == aList2[j][:(aList2[j].
index(
'=')+1)]:
18 str1 = aList1[i][2:aList1[i].
index(
'=')+1] + aList1[i][aList1[i].
index(
'=')+1:]+
' ['+ string1+
']' 19 str2 = len(aList1[i][2:aList1[i].
index(
'=')+1])*
' '+aList2[j][aList2[j].
index(
'=')+1:]+
' ['+string2+
']' 20 print(str1,
'\n',str2,
'\n')
21 differences.append(str1)
22 differences.append(str2)
27 "Searches for modules which are in both the files but whose parameters are setted at different values" 28 print(
'\nList of modules present in both the files with different parameter values\n')
29 for i
in module1.keys():
30 for j
in module2.keys():
31 if (i==j)
and (i==
'Processing'):
33 for k
in range(len(list)):
34 process1=module1[i][k].
split()
35 process2=module2[i][k].
split()
36 if process1[0]!= process2[0]:
42 print(
'Differences in the processing history')
44 print(l+
' ['+string1+
']')
45 print(m+
' ['+string2+
']')
50 elif ( (i==j)
or (i,j)==self.
_sameprocess )
and (i!=
'Processing'):
51 for name1,value1
in module1[i]:
52 for name2,value2
in module2[j]:
53 if (name1==name2)
and (value1[1:]!=value2[1:]):
54 print(
'Process: '+
'"'+i+
'"'+
'\n'+
'Module: '+
'"'+name1+
'"'+
'\n')
58 self.
list_diff(d.firstvalue,d.secondvalue, string1, string2)
65 "Searches for modules present only in one of the two files" 66 print(
'\nModules run only on the '+string+
' edmfile:'+
'\n')
67 for i
in module1.keys():
69 if (i
not in module2.keys())
and (i
not in self.
_sameprocess):
70 print(
'\n Process '+i+
' not run on edmfile '+string +
'\n')
78 labelList2=[module[0]
for module
in module2[k]]
79 labelList1=[module[0]
for module
in module1[i]]
80 for name, value
in module1[i] :
81 if (name
not in labelList2):
82 print(
'Process: '+
'"'+i+
'"'+
'\n'+
'Module: '+
'"'+name+
'"')
def onefilemodules(self, module1, module2, string)
def list_diff(self, aList1, aList2, string1, string2)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def split(sequence, size)
def module_diff(self, module1, module2, string1, string2)