17import subprocess
as sp
20import b2test_utils
as b2u
21import validation_gt
as vgt
23if __name__ ==
'__main__':
26 if 'BELLE2_VALIDATION_DATA_DIR' not in os.environ:
30 globaltags =
' '.join(vgt.get_validation_globaltags())
31 input_files = glob.glob(os.environ[
'BELLE2_VALIDATION_DATA_DIR'] +
'/rawdata/*HLT?.*.root')
32 input_files.sort(reverse=
True)
33 with b2u.clean_working_directory():
34 assert(0 == sp.call([
'b2klm-create-dqm',
'-i', f
'{basf2.find_file(input_files[0])}',
'-n',
'100',
35 '--prepend_gt'] + vgt.get_validation_globaltags(), stdout=sp.DEVNULL))
38 assert(0 == sp.call([
'b2klm-numberToIndex',
'20',
'50020']))
41 assert(0 == sp.call([
'b2klm-indexToNumber',
'11489',
'21997']))