CMS 3D CMS Logo

Functions | Variables

ValidationOptions_cfi Namespace Reference

Functions

def calledBycmsRun
def checkOptionsForBadInput
 Batchmode options.
def CMSSWEnvironmentIsCurrent
def returnOptionsString

Variables

dictionary allowedOptions = {}
tuple options = VarParsing.VarParsing()
tuple ReleaseBase = os.path.join(os.environ['CMSSW_BASE'], "src")
list ReleaseVersion = os.environ['CMSSW_VERSION']

Function Documentation

def ValidationOptions_cfi::calledBycmsRun ( )
Returns true of this python file is being called via cmsRun 

Definition at line 145 of file ValidationOptions_cfi.py.

00146                     :
00147    ''' Returns true of this python file is being called via cmsRun '''
00148    if sys.argv[0].find('cmsRun') == -1:
00149       return False
00150    else:
00151       return True

def ValidationOptions_cfi::checkOptionsForBadInput ( )

Batchmode options.

Definition at line 138 of file ValidationOptions_cfi.py.

00139                              :
00140    # Sanity check
00141    for optionName, allowedValues in allowedOptions.iteritems():
00142       if not getattr(options, optionName) in allowedValues:
00143          print "Bad input to option: %s" % optionName
00144          sys.exit()

def ValidationOptions_cfi::CMSSWEnvironmentIsCurrent ( )
Make sure that our CMSSW environment doesn't point ot another release!

Definition at line 152 of file ValidationOptions_cfi.py.

00153                                :
00154    ''' Make sure that our CMSSW environment doesn't point ot another release!'''
00155    if ReleaseBase != os.path.commonprefix([ReleaseBase, os.getcwd()]):
00156       return False
00157    else:
00158       return True

def ValidationOptions_cfi::returnOptionsString ( )
format the options to be passed on the command line.  Used when submitting batch jobs

Definition at line 159 of file ValidationOptions_cfi.py.

00160                          :
00161    ''' format the options to be passed on the command line.  Used when submitting batch jobs'''
00162    outputString = ""
00163    for optionsName, optionValue in options.__dict__['_singletons'].iteritems():
00164       outputString += " %s=%s" % (optionsName, optionValue)
00165 
00166    for optionsName, optionValues in options.__dict__['_lists'].iteritems():
00167       for anOption in optionValues:
00168          outputString += " %s=%s" % (optionsName, anOption) 
00169    return outputString

Variable Documentation

Definition at line 16 of file ValidationOptions_cfi.py.

Definition at line 14 of file ValidationOptions_cfi.py.

tuple ValidationOptions_cfi::ReleaseBase = os.path.join(os.environ['CMSSW_BASE'], "src")

Definition at line 4 of file ValidationOptions_cfi.py.

list ValidationOptions_cfi::ReleaseVersion = os.environ['CMSSW_VERSION']

Definition at line 5 of file ValidationOptions_cfi.py.