|
ATLAS Offline Software
|
|
def | blob_read (self, size=-1) |
|
def | bConvert (b, nbyte=1) |
|
def | bConvertList (b, nbyte=1, nval=1) |
|
def | unpackBunchGroup (blob, bgrp=1) |
|
def | unpackBunchGroupList (blob, bgrp=[1]) |
|
def | unpackBCIDMask (blob, nb1, nb2, nlumi) |
|
def | unpackRun2BCIDMask (blob, nb1, nb2, nlumi) |
|
def | unpackRun1BCIDMask (blob, nb1, nb2, nlumi) |
|
def | unpackBCIDValues (blob, mask=[], normValue=1) |
|
def | unpackBunches (blob, mask=[]) |
|
def | unpackLiveFraction (trigPayload, priority='high') |
|
◆ bConvert()
def python.LumiBlobConversion.bConvert |
( |
|
b, |
|
|
|
nbyte = 1 |
|
) |
| |
Definition at line 26 of file LumiBlobConversion.py.
28 packopt=dict([[1,
'B'],[2,
'H'],[4,
'f'],[8,
'd']])
31 ival=struct.unpack(packopt[nbyte], b[0:nbyte])
33 print(
'bConvert: Unrecognized pack option')
◆ bConvertList()
def python.LumiBlobConversion.bConvertList |
( |
|
b, |
|
|
|
nbyte = 1 , |
|
|
|
nval = 1 |
|
) |
| |
Definition at line 39 of file LumiBlobConversion.py.
41 packopt=dict([[1,
'B'],[2,
'H'],[4,
'f'],[8,
'd']])
44 fmt =
'%d%s' % (nval, packopt[nbyte])
45 ival=struct.unpack(fmt, b[0:nval*nbyte])
47 print(
'bConvertList: Unrecognized pack option')
◆ blob_read()
def python.LumiBlobConversion.blob_read |
( |
|
self, |
|
|
|
size = -1 |
|
) |
| |
Definition at line 12 of file LumiBlobConversion.py.
16 endpos = self.pos + size
19 buf = self.startingAddress()
20 buf.SetSize(self.size())
21 return buf[beginpos:endpos]
24 getattr(gbl,
"coral::Blob").read = blob_read
◆ unpackBCIDMask()
def python.LumiBlobConversion.unpackBCIDMask |
( |
|
blob, |
|
|
|
nb1, |
|
|
|
nb2, |
|
|
|
nlumi |
|
) |
| |
◆ unpackBCIDValues()
def python.LumiBlobConversion.unpackBCIDValues |
( |
|
blob, |
|
|
|
mask = [] , |
|
|
|
normValue = 1 |
|
) |
| |
Definition at line 183 of file LumiBlobConversion.py.
188 if not (len(bcidVec)==len(lvec)):
189 print(
'unpackBCIDValues - length mismatch: len(bcidVec)=', len(bcidVec),
'len(lvec)=', len(lvec))
193 for i
in range(len(bcidVec)):
195 bLumi.append(lvec[i]*normValue/
pow(100,bss))
197 bLumi.append(lvec[i])
◆ unpackBunches()
def python.LumiBlobConversion.unpackBunches |
( |
|
blob, |
|
|
|
mask = [] |
|
) |
| |
Definition at line 207 of file LumiBlobConversion.py.
216 blobCopy = blob.read()
219 b = blobCopy[blobCounter:blobCounter+1]
227 b = blobCopy[blobCounter:blobCounter+2]
233 blobCounter += 2*vlen
246 print(
'storage mode 3 not implemented in unpackBunches')
249 bcidVec=[i
for i
in range(3564)]
252 print(
'Unknown storage mode ',smod)
256 valueVec =
bConvertList(blobCopy[blobCounter:], bss, vlen)
263 return bss,bcidVec,valueVec
265 except RuntimeError
as e:
◆ unpackBunchGroup()
def python.LumiBlobConversion.unpackBunchGroup |
( |
|
blob, |
|
|
|
bgrp = 1 |
|
) |
| |
Definition at line 53 of file LumiBlobConversion.py.
55 if blob.size() == 0:
return
57 blobCopy = blob.read()
58 mask = (1 <<
int(bgrp))
62 if ivallist[i] & mask:
◆ unpackBunchGroupList()
def python.LumiBlobConversion.unpackBunchGroupList |
( |
|
blob, |
|
|
|
bgrp = [1] |
|
) |
| |
Definition at line 82 of file LumiBlobConversion.py.
86 if blob.size() == 0:
return
88 blobCopy = blob.read()
91 mask[id] = (1 <<
int(id))
97 if ivallist[i] & mask[id]:
◆ unpackLiveFraction()
def python.LumiBlobConversion.unpackLiveFraction |
( |
|
trigPayload, |
|
|
|
priority = 'high' |
|
) |
| |
Definition at line 271 of file LumiBlobConversion.py.
273 liveVec = array.array(
'f', 3564*[0.])
275 if priority ==
'high':
276 blob = trigPayload[
'HighPriority']
277 elif priority ==
'low':
278 blob = trigPayload[
'LowPriority']
280 print(
'unpackLiveFraction - unknown priority requested %s',
str(priority))
283 bloblength = blob.size()
287 if bloblength < 3*3564:
289 print(
'unpackLiveFraction found blob length %d!' % bloblength)
292 blobCopy = blob.read()
296 turnCounter = trigPayload[
'TurnCounter']
297 if not turnCounter > 0:
304 for i
in range(3564):
306 busyCounter = byte[3*i] | (byte[3*i+1] << 8) | (byte[3*i+2] << 16)
316 liveFrac = 1 -
float(busyCounter) / turnCounter
318 liveVec[i] = liveFrac
◆ unpackRun1BCIDMask()
def python.LumiBlobConversion.unpackRun1BCIDMask |
( |
|
blob, |
|
|
|
nb1, |
|
|
|
nb2, |
|
|
|
nlumi |
|
) |
| |
◆ unpackRun2BCIDMask()
def python.LumiBlobConversion.unpackRun2BCIDMask |
( |
|
blob, |
|
|
|
nb1, |
|
|
|
nb2, |
|
|
|
nlumi |
|
) |
| |
Definition at line 114 of file LumiBlobConversion.py.
118 blobCopy = blob.read()
121 for i
in range(3564):
127 if (val & 0x03) == 0x03:
130 print(
'unpackRun2BCIDMask found:')
131 print(
' Beam1:', beam1)
132 print(
' Beam2:', beam2)
133 print(
' Coll: ', coll)
135 return beam1,beam2,coll
◆ pos
python.LumiBlobConversion.pos |
def unpackLiveFraction(trigPayload, priority='high')
def bConvertList(b, nbyte=1, nval=1)
def unpackBunchGroupList(blob, bgrp=[1])
def unpackRun2BCIDMask(blob, nb1, nb2, nlumi)
def unpackBunchGroup(blob, bgrp=1)
def blob_read(self, size=-1)
def unpackBunches(blob, mask=[])
def unpackRun1BCIDMask(blob, nb1, nb2, nlumi)
def unpackBCIDMask(blob, nb1, nb2, nlumi)
def unpackBCIDValues(blob, mask=[], normValue=1)
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)