284 def do_test (self, rctype, flag_exc, rc_baddq={},
287 beamfrag = LASE_PTN_FRAG,
289 rc = self.make_raw_data (hits_0, rctype, rc_baddq)
290 digits = self.make_digits (incomplete, isCalib)
291 be = self.make_beamelem (beamfrag)
293 dq = ROOT.TileDQstatus()
295 eid = ROOT.EventIDBase()
296 eid.set_bunch_crossing_id (1234)
297 eid.set_run_number(self.getContext().eventID().
run_number())
298 eid.set_lumi_block(0)
299 ctx = ROOT.EventContext()
302 ctx.setExtension(ROOT.Atlas.ExtendedEventContext())
307 if beamfrag == LASE_PTN_FRAG:
310 elif beamfrag == DIGI_PAR_FRAG:
311 cispar = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
312 110, 111, 112, 113, 114, 111, 2, 5, 6, 7,
313 8, 117, 118, 119, 120] + 85*[0]
316 elif beamfrag == LASER_OBJ_FRAG:
321 assert tool.makeStatus (ctx, rc, digits, be, dq).isSuccess()
323 assert dq.isFilled()
is True
324 assert dq.isBiGain() == isCalib
325 assert dq.nonZeroCounter()
is True
326 assert dq.incompleteDigits() == incomplete
327 assert dq.calibMode() == isCalib
328 assert dq.trigType() == trigType
329 assert dq.RODBCID() == bcid
331 dq_cispar = [dq.cispar()[i]
for i
in range(110)]
332 assert dq_cispar == cispar
335 for partition
in range(5):
336 for drawer
in range(64):
337 for gain
in range(2):
338 check_flag (dq,
'checkGlobalErr',
False, flag_exc,
339 partition, drawer, gain)
340 check_flag (dq,
'checkGlobalCRCErr',
False, flag_exc,
341 partition, drawer, gain)
343 for gain
in range(2):
344 check_flag (dq,
'isAdcDQgood',
True, flag_exc,
345 partition, drawer, ch, gain)
346 check_flag (dq,
'isChanDQgood',
True, flag_exc,
347 partition, drawer, ch)
348 for dmu
in range(16):
349 check_flag (dq,
'checkEmptyEvent',
False, flag_exc,
350 partition, drawer, dmu)
351 for gain
in range(2):
352 check_flag (dq,
'checkROD_CRCErr',
False, flag_exc,
353 partition, drawer, dmu, gain)
354 check_flag (dq,
'checkFE_CRCErr',
False, flag_exc,
355 partition, drawer, dmu, gain)
356 check_flag (dq,
'checkBCIDErr',
False, flag_exc,
357 partition, drawer, dmu, gain)
358 check_flag (dq,
'checkBCIDErrDetail',
False, flag_exc,
359 partition, drawer, dmu, gain)
360 check_flag (dq,
'checkHeaderFormatErr',
False, flag_exc,
361 partition, drawer, dmu, gain)
362 check_flag (dq,
'checkHeaderParityErr',
False, flag_exc,
363 partition, drawer, dmu, gain)
364 check_flag (dq,
'checkSampleFormatErr',
False, flag_exc,
365 partition, drawer, dmu, gain)
366 check_flag (dq,
'checkSampleParityErr',
False, flag_exc,
367 partition, drawer, dmu, gain)
368 check_flag (dq,
'checkMemoryParityErr',
False, flag_exc,
369 partition, drawer, dmu, gain)
370 check_flag (dq,
'checkSingleStrobeErr',
False, flag_exc,
371 partition, drawer, dmu, gain)
372 check_flag (dq,
'checkDoubleStrobeErr',
False, flag_exc,
373 partition, drawer, dmu, gain)
375 return StatusCode.Success