CMS 3D CMS Logo

commons_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from importlib import import_module
3 from copy import copy
4 
5 def cloneGeometry(mod_path):
6  # start by importing the actual module to be cloned
7  _geom = import_module(mod_path)
8  # clone all geometry DDL files
9  if hasattr(_geom, 'totemGeomXMLFiles'):
10  totemGeomXMLFiles = copy(_geom.totemGeomXMLFiles)
11  if hasattr(_geom, 'ctppsDiamondGeomXMLFiles'):
12  ctppsDiamondGeomXMLFiles = copy(_geom.ctppsDiamondGeomXMLFiles)
13  if hasattr(_geom, 'ctppsUFSDGeomXMLFiles'):
14  ctppsUFSDGeomXMLFiles = copy(_geom.ctppsUFSDGeomXMLFiles)
15  if hasattr(_geom, 'ctppsPixelGeomXMLFiles'):
16  ctppsPixelGeomXMLFiles = copy(_geom.ctppsPixelGeomXMLFiles)
17  # clone the ESSource and ESModule to be returned
18  XMLIdealGeometryESSource_CTPPS = _geom.XMLIdealGeometryESSource_CTPPS.clone()
19  ctppsGeometryESModule = _geom.ctppsGeometryESModule.clone()
20 
21  return (XMLIdealGeometryESSource_CTPPS, ctppsGeometryESModule)
def cloneGeometry(mod_path)
Definition: commons_cff.py:5