CMS 3D CMS Logo

Functions | Variables

ValidationOptions_cff 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_cff::calledBycmsRun ( )
Returns true of this python file is being called via cmsRun 

Definition at line 157 of file ValidationOptions_cff.py.

00158                     :
00159    ''' Returns true of this python file is being called via cmsRun '''
00160    if sys.argv[0].find('cmsRun') == -1:
00161       return False
00162    else:
00163       return True

def ValidationOptions_cff::checkOptionsForBadInput ( )

Batchmode options.

Definition at line 150 of file ValidationOptions_cff.py.

00151                              :
00152    # Sanity check
00153    for optionName, allowedValues in allowedOptions.iteritems():
00154       if not getattr(options, optionName) in allowedValues:
00155          print "Bad input to option: %s" % optionName
00156          sys.exit()

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

Definition at line 164 of file ValidationOptions_cff.py.

00165                                :
00166    ''' Make sure that our CMSSW environment doesn't point ot another release!'''
00167    if ReleaseBase != os.path.commonprefix([ReleaseBase, os.getcwd()]):
00168       return False
00169    else:
00170       return True

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

Definition at line 171 of file ValidationOptions_cff.py.

00172                          :
00173    ''' format the options to be passed on the command line.  Used when submitting batch jobs'''
00174    outputString = ""
00175    for optionsName, optionValue in options.__dict__['_singletons'].iteritems():
00176       outputString += " %s=%s" % (optionsName, optionValue)
00177 
00178    for optionsName, optionValues in options.__dict__['_lists'].iteritems():
00179       for anOption in optionValues:
00180          outputString += " %s=%s" % (optionsName, anOption) 
00181    return outputString

Variable Documentation

Definition at line 16 of file ValidationOptions_cff.py.

Definition at line 14 of file ValidationOptions_cff.py.

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

Definition at line 4 of file ValidationOptions_cff.py.

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

Definition at line 5 of file ValidationOptions_cff.py.