Belle II Software
development
caf_state_machine.py
1
8
import
basf2
as
b2
9
from
ROOT
import
Belle2
# noqa: make the Belle2 namespace available
10
from
ROOT.Belle2
import
TestCalibrationAlgorithm
as
TestAlgo
11
from
caf.state_machines
import
CalibrationMachine
12
from
caf.framework
import
Calibration
13
14
alg = TestAlgo()
15
cal1 =
Calibration
(
'TestCalibrationClass1'
,
"CaTest"
, alg,
'/path/to/file.root'
)
16
cal2 =
Calibration
(
'TestCalibrationClass2'
,
"CaTest"
, alg,
'/path/to/file.root'
)
17
18
cm1 = CalibrationMachine(cal1)
19
cm1.save_graph(
"calibration_graph.dot"
,
"CalibrationMachine"
)
20
21
b2.B2INFO(
"Currently in "
+ cm1.state.name +
" state."
)
22
cm1.submit_collector(msg_before=
"About to submit"
, msg_after=
"Now submitted"
)
23
cm1.complete(msg_before=
"Finishing"
, msg_after=
"Collector finished"
)
24
b2.B2INFO(
"Currently in "
+ cm1.state.name +
" state."
)
Calibration
Definition:
Calibration.py:1
calibration
examples
caf_state_machine.py
Generated on Fri Nov 8 2024 02:34:28 for Belle II Software by
1.9.6