Belle II Software  release-05-01-25
reco_raw.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 import os
5 import sys
6 import glob
7 import subprocess
8 import b2test_utils
9 from ROOT import Belle2
10 
11 if 'BELLE2_VALIDATION_DATA_DIR' not in os.environ:
12  b2test_utils.skip_test("BELLE2_VALIDATION_DATA_DIR environment variable not set.")
13 
14 steering = Belle2.FileSystem.findFile('reconstruction/tests/reco_raw.py_noexec')
15 
16 for data_file in glob.glob(os.environ['BELLE2_VALIDATION_DATA_DIR'] + '/rawdata/*HLT?.*.root'):
17  data_type = os.path.basename(data_file).split('.')[0]
18  exp_number = os.path.basename(data_file).split('.')[1]
19  run_number = os.path.basename(data_file).split('.')[2]
20  print("--> Testing reconstruction on: ", data_type, exp_number, run_number)
21  assert(0 == subprocess.check_call(['basf2', '-n', '10', '-i', data_file, steering, data_type]))
b2test_utils.skip_test
def skip_test(reason, py_case=None)
Definition: __init__.py:24
Belle2::FileSystem::findFile
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
Definition: FileSystem.cc:147