CMS 3D CMS Logo

l1tGTAlgoBlockProducer_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import re
3 
4 
5 TYPE_STANDARD_PHYSICS = cms.vint32(1) # TODO
6 
7 algorithms = cms.VPSet()
8 
9 l1tGTAlgoBlockProducer = cms.EDProducer(
10  "L1GTAlgoBlockProducer",
11  algorithms = algorithms
12 )
13 
14 def collectAlgorithmPaths(process) -> "tuple[cms.Path]":
15  str_paths = set()
16  for algorithm in algorithms:
17  algo_paths = re.sub(r'[()]'," " , algorithm.expression.value()).split()
18  for algo in algo_paths:
19  if algo in process.pathNames() :
20  str_paths.add(algo)
21  paths = set()
22 
23  for str_path in str_paths:
24  paths.add(getattr(process, str_path))
25 
26  return tuple(paths)