Belle II Software  release-05-01-25
beamSpotCalibrationCheck.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 """
5 Beam Spot Calibration Check Script
6 one file for all BeamSpot payload in the local database
7 usage:
8 > basf2 beamSpotMonitor.py current_localDB
9 """
10 
11 import basf2
12 import ROOT
13 import sys
14 from basf2 import conditions as b2conditions
15 
16 if __name__ == '__main__':
17 
18  current_localDB = sys.argv[1]
19 
20  expList = []
21  runList = []
22  evtList = []
23  with open(current_localDB + '/database.txt') as fp:
24  for line in fp:
25  run = line.split(',')
26  exp = run[0].split(' ')
27  expList.append(int(exp[2]))
28  runList.append(int(run[1]))
29  evtList.append(int(1))
30 
31  b2conditions.testing_payloads = [str(current_localDB) + "/database.txt"]
32 
33  main = basf2.create_path()
34 
35  eventinfosetter = basf2.register_module('EventInfoSetter')
36  eventinfosetter.param({'evtNumList': evtList, 'expList': expList, 'runList': runList})
37  main.add_module(eventinfosetter)
38 
39  main.add_module('BeamSpotMonitor')
40 
41  basf2.print_path(main)
42  basf2.process(main)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25