|
ATLAS Offline Software
|
|
def | formDbString (technology, server, schema, dbname) |
|
def | openDatabase (dbstring) |
|
def | formIov (runNumber) |
|
def | formIovFromTo (runNumberStart, runNumber) |
|
def | getRunNumberStart (runNumber, k) |
| this modification checks which was the k-last run before the processed one More...
|
|
def | GetRunList (dbstring, folder, tag, runNumber, k) |
|
def | GetNumNoisyMods (dbstring, folder, tag, runNumber) |
|
def | GetNumNoisyStrips (dbstring, folder, tag, runNumber) |
|
◆ formDbString()
def ReadCoolUPD4.formDbString |
( |
|
technology, |
|
|
|
server, |
|
|
|
schema, |
|
|
|
dbname |
|
) |
| |
Definition at line 16 of file ReadCoolUPD4.py.
17 theString=technology+
'://'+server+
';schema='+schema+
';dbname='+dbname
◆ formIov()
def ReadCoolUPD4.formIov |
( |
|
runNumber | ) |
|
Definition at line 36 of file ReadCoolUPD4.py.
37 s,u=((runNumber) << 32), ((runNumber + 1) << 32) - 1
38 print (
"formIOV: ", s, u)
◆ formIovFromTo()
def ReadCoolUPD4.formIovFromTo |
( |
|
runNumberStart, |
|
|
|
runNumber |
|
) |
| |
Definition at line 42 of file ReadCoolUPD4.py.
43 s,u=((runNumberStart ) << 32), ((runNumber + 1) << 32) - 1
44 print (
"formIOV: ", s, u)
◆ GetNumNoisyMods()
def ReadCoolUPD4.GetNumNoisyMods |
( |
|
dbstring, |
|
|
|
folder, |
|
|
|
tag, |
|
|
|
runNumber |
|
) |
| |
Definition at line 110 of file ReadCoolUPD4.py.
113 myfolder=db.getFolder(folder)
114 iovSince, iovUntil =
formIov(runNumber)
117 objs=myfolder.browseObjects(iovSince,iovUntil,cool.ChannelSelection.all(),tag)
119 mypayload=obj.payload()
120 dfl=mypayload[
'DefectList']
123 NumNoisyMods=NumNoisyMods+1
◆ GetNumNoisyStrips()
def ReadCoolUPD4.GetNumNoisyStrips |
( |
|
dbstring, |
|
|
|
folder, |
|
|
|
tag, |
|
|
|
runNumber |
|
) |
| |
Definition at line 130 of file ReadCoolUPD4.py.
132 myfolder=db.getFolder(folder)
133 iovSince, iovUntil =
formIov(runNumber)
137 objs=myfolder.browseObjects(iovSince,iovUntil,cool.ChannelSelection.all(),tag)
139 mypayload=obj.payload()
140 dfl=mypayload[
'DefectList']
147 for j
in range(len(words)):
150 sep=jk.replace (
'-',
' ' )
152 numNoisyStripsAdds=numNoisyStripsAdds+
int(sep1[1])-
int(sep1[0])
153 numNoisyStrips=numNoisyStrips+len(words)+numNoisyStripsAdds
157 return numNoisyStrips
◆ GetRunList()
def ReadCoolUPD4.GetRunList |
( |
|
dbstring, |
|
|
|
folder, |
|
|
|
tag, |
|
|
|
runNumber, |
|
|
|
k |
|
) |
| |
Definition at line 63 of file ReadCoolUPD4.py.
63 def GetRunList(dbstring, folder, tag, runNumber, k):
65 print(
'TAG ',tag,
' TAG')
66 folderlist=db.listAllNodes()
67 print(
' folderlist=db.listAllNodes()')
69 for i
in folderlist:
print(i)
71 myfolder=db.getFolder(folder)
72 taglist=myfolder.listTags()
73 print(
' taglist=myfolder.listTags()')
74 for i
in taglist:
print(i)
81 objs=myfolder.browseObjects(iovSince,iovUntil,cool.ChannelSelection.all(),tag)
85 temp.append(obj.since()>>32)
93 if ( Temp[0] != runNumber ):
96 for i
in range(len(Temp)-1):
97 if (Temp[i] != runtmp):
98 if ( Temp[i] != runNumber ):
105 for i
in range(k): mylist.append( ls[len(ls)-i-1] )
◆ getRunNumberStart()
def ReadCoolUPD4.getRunNumberStart |
( |
|
runNumber, |
|
|
|
k |
|
) |
| |
this modification checks which was the k-last run before the processed one
Definition at line 49 of file ReadCoolUPD4.py.
50 runlistfile =
open(
"/afs/cern.ch/work/s/sctcalib/lastRuns.txt", mode =
'r')
51 content = runlistfile.read()
53 content_list = content.split(
"\n")
54 content_list = [line
for line
in content_list
if line.strip()]
55 integer_int_list =
list(map(int, content_list))
56 if (runNumber >= integer_int_list[-1]):
57 RNS = integer_int_list[len(integer_int_list)-(k+5)]
59 RNS = integer_int_list[integer_int_list.index(runNumber)-(k+5)]
◆ openDatabase()
def ReadCoolUPD4.openDatabase |
( |
|
dbstring | ) |
|
Definition at line 21 of file ReadCoolUPD4.py.
22 dbSvc=cool.DatabaseSvcFactory.databaseService()
24 server=
'ATLAS_COOLPROD'
25 [schema,dbname]=dbstring.split(
'/')
26 myDbString=
formDbString(technology, server, schema, dbname)
28 db=dbSvc.openDatabase(myDbString)
29 except Exception
as e:
30 print(
'Problem opening %s in GetRunList'%myDbString)
def formDbString(technology, server, schema, dbname)
def openDatabase(dbstring)
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
def formIovFromTo(runNumberStart, runNumber)
def getRunNumberStart(runNumber, k)
this modification checks which was the k-last run before the processed one
def GetRunList(dbstring, folder, tag, runNumber, k)
def GetNumNoisyMods(dbstring, folder, tag, runNumber)
def GetNumNoisyStrips(dbstring, folder, tag, runNumber)
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)