1 from __future__
import print_function
2 from builtins
import range
8 def list_diff(self,aList1, aList2, string1, string2):
9 "Searches for differences between two modules of the same kind" 10 for i
in range(2,len(aList1)):
11 for j
in range(2,len(aList2)):
12 if (i==j)
and (aList1[i]!=aList2[j]):
13 if aList1[i][:(aList1[i].
index(
'=')+1)] == aList2[j][:(aList2[j].
index(
'=')+1)]:
15 print(aList1[i][2:aList1[i].
index(
'=')+1] + aList1[i][aList1[i].
index(
'=')+1:]+
' ['+ string1+
']')
16 print(len(aList1[i][2:aList1[i].
index(
'=')+1])*
' '+aList2[j][aList2[j].
index(
'=')+1:]+
' ['+string2+
']')
21 "Searches for modules which are in both the files but whose parameters are setted at different values" 24 print(
'\nList of modules present in both the files with different parameter values\n')
25 for i
in module1.keys():
26 for j
in module2.keys():
27 if (i==j)
and (module1[i]!=module2[j]):
28 print(
'Module: '+
'"'+i+
'"')
31 d.firstvalue=module1[i]
32 d.secondvalue=module2[j]
33 self.
list_diff(d.firstvalue,d.secondvalue, string1, string2)
41 "Searches for modules present only in one of the two files" 43 for i
in module1.keys():
46 print(
'\nModule present only in the '+string+
' file:'+
'\n')
48 print(
'Module: '+
'"'+i+
'"')
50 for k
in range(1,len(module1[i])):
def list_diff(self, aList1, aList2, string1, string2)
def onefilemodules(self, module1, module2, string)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def module_diff(self, module1, module2, string1, string2)