Belle II Software  release-05-01-25
gdltrigger.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 from basf2 import *
5 emptypath = create_path()
6 
7 
8 def add_gdl_trigger(path, SimulationMode=1, OpenFilter=False, Belle2Phase="Phase2"):
9  """
10  add the gdl module to path
11  @param path module is added to this path
12  @param SimulationMode the simulation mode in TSIM, 1: fast simulation,
13  trigger algoritm simulation only, no firmware simulation
14  2: full simulation, both trigger algorithm and firmware
15  are simulated
16  @param OpenFilter if OpenFilter is True, the events failed to pass L1 trigger
17  will be discarded. Make sure you do need open filter before you
18  set the value to True
19  """
20  trggdl = register_module('TRGGDL')
21  trggdl.param('SimulationMode', SimulationMode)
22  trggdl.param('Belle2Phase', Belle2Phase)
23  if OpenFilter:
24  trggdl.if_value('<1', emptypath)
25  path.add_module(trggdl)