CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
gemGeometryCustoms Namespace Reference

Functions

def geomReplace (process, key, targetXML)
 change the current default GEM geometry More...
 

Function Documentation

def gemGeometryCustoms.geomReplace (   process,
  key,
  targetXML 
)

change the current default GEM geometry

Definition at line 5 of file gemGeometryCustoms.py.

References edm.print().

5 def geomReplace(process, key, targetXML) :
6  mynum=-1
7  originalXML=''
8  for i, xml in enumerate( process.XMLIdealGeometryESSource.geomXMLFiles) :
9  if ( xml.find(key) != -1 ) :
10  mynum, originalXML = i, xml
11  break ## For now, to change multiple keys is not supported.
12  if ( mynum != -1 and originalXML != targetXML ) :
13  print("Changing Geometry from %s to %s"%(originalXML, targetXML))
14  process.XMLIdealGeometryESSource.geomXMLFiles.remove(originalXML)
15  process.XMLIdealGeometryESSource.geomXMLFiles.insert(mynum,targetXML)
16  if ( mynum == -1) :
17  print("Alert! key is not found on XMLIdealGeometryESSource")
18  return process
19 
20 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def geomReplace(process, key, targetXML)
change the current default GEM geometry