10 print(
'File not open ?')
15 fout=
open(outfile,
'a')
17 fout=
open(outfile,
'w')
18 except Exception
as e:
19 print(
'Could not open output file ',outfile)
23 tree=inf.Get(
"hv/mytree")
25 br_hvline=tree.GetBranch(
"HVline")
27 for i
in range(0,tree.GetEntries()):
28 if i%10000 == 0:
print(i)
30 if tree.HVline != hvline:
continue
37 idlist=[bec,side,FT,slot,channel]
38 if str(idlist)
in hvdict:
continue
41 hvlist=[bec,side,FT,slot,channel,ihv]
42 hvdict[
str(idlist)]=hvlist
46 if not append: fout.write(
'/LAR/HVPathologiesOfl/Pathologies\n')
47 for k
in list(hvdict.keys()):
50 print(
'Wrong list: ',ll,
' continue to next!!!')
52 wstr=
str(ll[0])+
' '+
str(ll[1])+
' '+
str(ll[2])+
' '+
str(ll[3])+
' '+
str(ll[4])+
' '+
str(hvline/1000)+
' '+
str(hvline%1000)+
' '+
str((ihv<<4)&0xFFF0)+
'\n'