Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-23 02:25:46

0001 import types
0002 
0003 import HLTrigger.Configuration.Tools.options as _options
0004 import HLTrigger.Configuration.Tools.confdb  as _confdb
0005 
0006 def _build_options(**args):
0007   options = _options.HLTProcessOptions()
0008   for key, val in args.items():
0009     setattr(options, key, val)
0010   return options
0011 
0012 
0013 def getHltConfiguration(menu, **args):
0014   args['menu']     = menu
0015   args['fragment'] = False
0016   options = _build_options(**args)
0017 
0018   hlt = _imp.new_module('hlt')
0019   exec(_confdb.HLTProcess(options).dump(), globals(), hlt.__dict__)
0020   return hlt.process
0021 
0022 
0023 def loadHltConfiguration(process, menu, **args):
0024   args['menu']     = menu
0025   args['fragment'] = True
0026   options = _build_options(**args)
0027 
0028   hlt = types.ModuleType('hlt')
0029   exec(_confdb.HLTProcess(options).dump(), globals(), hlt.__dict__)
0030   process.extend( hlt )
0031 
0032 
0033 import FWCore.ParameterSet.Config as _cms
0034 _cms.Process.loadHltConfiguration = loadHltConfiguration