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 algorithms = cms.VPSet()
5 
6 l1tGTAlgoBlockProducer = cms.EDProducer(
7  "L1GTAlgoBlockProducer",
8  algorithms = algorithms
9 )
10 
11 def collectAlgorithmPaths(process) -> "tuple[cms.Path]":
12  str_paths = set()
13  for algorithm in algorithms:
14  algo_paths = re.sub(r'[()]'," " , algorithm.expression.value()).split()
15  for algo in algo_paths:
16  if algo in process.pathNames() :
17  str_paths.add(algo)
18  paths = set()
19 
20  for str_path in str_paths:
21  paths.add(getattr(process, str_path))
22 
23  return tuple(paths)