Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:53

0001 import FWCore.ParameterSet.Config as cms
0002 import os, os.path
0003 
0004 def pfnInPath(name:str):
0005   for path in os.environ['CMSSW_SEARCH_PATH'].split(':'):
0006     fn = os.path.join(path, name)
0007     if os.path.isfile(fn):
0008       return 'file:' + fn
0009 
0010   raise IOError("No such file or directory '%s' in the CMSSW_SEARCH_PATH" % name)
0011 
0012 
0013 cms.pfnInPath            = lambda name: cms.string(pfnInPath(name))
0014 cms.untracked.pfnInPath  = lambda name: cms.untracked.string(pfnInPath(name))
0015 cms.pfnInPaths           = lambda *names: cms.vstring(pfnInPath(name) for name in names)
0016 cms.untracked.pfnInPaths = lambda *names: cms.untracked.vstring(pfnInPath(name) for name in names)