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 152 of file ValidationOptions_cfi.py.

00153                     :
00154    ''' Returns true of this python file is being called via cmsRun '''
00155    if sys.argv[0].find('cmsRun') == -1:
00156       return False
00157    else:
00158       return True

def ValidationOptions_cfi::checkOptionsForBadInput ( )

Batchmode options.

Definition at line 145 of file ValidationOptions_cfi.py.

00146                              :
00147    # Sanity check
00148    for optionName, allowedValues in allowedOptions.iteritems():
00149       if not getattr(options, optionName) in allowedValues:
00150          print "Bad input to option: %s" % optionName
00151          sys.exit()

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

Definition at line 159 of file ValidationOptions_cfi.py.

00160                                :
00161    ''' Make sure that our CMSSW environment doesn't point ot another release!'''
00162    if ReleaseBase != os.path.commonprefix([ReleaseBase, os.getcwd()]):
00163       return False
00164    else:
00165       return True

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

Definition at line 166 of file ValidationOptions_cfi.py.

00167                          :
00168    ''' format the options to be passed on the command line.  Used when submitting batch jobs'''
00169    outputString = ""
00170    for optionsName, optionValue in options.__dict__['_singletons'].iteritems():
00171       outputString += " %s=%s" % (optionsName, optionValue)
00172 
00173    for optionsName, optionValues in options.__dict__['_lists'].iteritems():
00174       for anOption in optionValues:
00175          outputString += " %s=%s" % (optionsName, anOption) 
00176    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.