SND@LHC Software
Loading...
Searching...
No Matches
checkZpositions.py
Go to the documentation of this file.
1
from
__future__
import
print_function
2
import
ROOT,sys
3
from
rootpyPickler
import
Unpickler
4
badBoys={}
5
f1,f2 = sys.argv[1], sys.argv[2]
6
fgeoOld=ROOT.TFile(f1)
7
upkl =
Unpickler
(fgeoOld)
8
ShipGeoOld = upkl.load(
'ShipGeo'
)
9
fgeoNew=ROOT.TFile(f2)
10
upkl =
Unpickler
(fgeoNew)
11
ShipGeoNew = upkl.load(
'ShipGeo'
)
12
for
x
in
ShipGeoNew:
13
if
hasattr(eval(
'ShipGeoNew.'
+x),
'z'
):
14
zold,znew = eval(
'ShipGeoOld.'
+x+
'.z'
),eval(
'ShipGeoNew.'
+x+
'.z'
)
15
print(x,
'z='
,znew,
' old:'
, zold)
16
if
zold!=znew: badBoys[x]=[znew,zold]
17
if
len(badBoys)>0: print(
"following differences detected:"
)
18
for
x
in
badBoys:
19
print(x,badBoys[x])
20
rootpyPickler.Unpickler
Definition
rootpyPickler.py:219
macro
checkZpositions.py
Generated by
1.9.8