CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
ValidationOptions_cff Namespace Reference

Functions

def calledBycmsRun
 
def checkOptionsForBadInput
 Batchmode options. More...
 
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.

References spr.find().

158 def calledBycmsRun():
159  ''' Returns true of this python file is being called via cmsRun '''
160  if sys.argv[0].find('cmsRun') == -1:
161  return False
162  else:
163  return True
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
def ValidationOptions_cff.checkOptionsForBadInput ( )

Batchmode options.

Definition at line 150 of file ValidationOptions_cff.py.

152  # Sanity check
153  for optionName, allowedValues in allowedOptions.iteritems():
154  if not getattr(options, optionName) in allowedValues:
155  print "Bad input to option: %s" % optionName
156  sys.exit()
def checkOptionsForBadInput
Batchmode options.
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.

166  ''' Make sure that our CMSSW environment doesn't point ot another release!'''
167  if ReleaseBase != os.path.commonprefix([ReleaseBase, os.getcwd()]):
168  return False
169  else:
170  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.

172 def returnOptionsString():
173  ''' format the options to be passed on the command line. Used when submitting batch jobs'''
174  outputString = ""
175  for optionsName, optionValue in options.__dict__['_singletons'].iteritems():
176  outputString += " %s=%s" % (optionsName, optionValue)
177 
178  for optionsName, optionValues in options.__dict__['_lists'].iteritems():
179  for anOption in optionValues:
180  outputString += " %s=%s" % (optionsName, anOption)
181  return outputString

Variable Documentation

dictionary ValidationOptions_cff.allowedOptions = {}

Definition at line 16 of file ValidationOptions_cff.py.

tuple ValidationOptions_cff.options = VarParsing.VarParsing()

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.