CMS 3D CMS Logo

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