CMS 3D CMS Logo

trackingMaterialVarParsing.py
Go to the documentation of this file.
1 from FWCore.ParameterSet.VarParsing import VarParsing
2 import sys
3 
4 options = VarParsing('analysis')
5 
6 ALLOWED_GEOMETRIES = ['run2', 'Phase1', 'Phase2']
7 
8 options.register('geometry',
9  'run2',
10  VarParsing.multiplicity.singleton,
11  VarParsing.varType.string,
12  """ Specify which geometry scenario to use. The different geometry
13  will automatically load also the correct XML grouping
14  files for the material description. Currently supported values are %s""" % " ".join(ALLOWED_GEOMETRIES)
15  )
16 
17 options.parseArguments()
18 
19 if not options.geometry in ALLOWED_GEOMETRIES:
20  print("\n**** ERROR ****\nUnknown geometry %s. Quitting.\n**** ERROR ****\n" % options.geometry)
21  sys.exit(1)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
static std::string join(char **cmd)
Definition: RemoteFile.cc:18