CMS 3D CMS Logo

Classes | Functions | Variables
GenObject Namespace Reference

Classes

class  GenObject
 

Functions

def setQuietWarn (quiet=True)
 
def warn (args, kwargs)
 

Variables

 filenameRE
 
 quietWarn
 

Function Documentation

def GenObject.setQuietWarn (   quiet = True)

Definition at line 26 of file GenObject.py.

26 def setQuietWarn (quiet = True):
27  global quietWarn
28  quietWarn = quiet
29 
30 
def setQuietWarn(quiet=True)
Definition: GenObject.py:26
def GenObject.warn (   args,
  kwargs 
)
print out warning with line number and rest of arguments

Definition at line 31 of file GenObject.py.

References edm.print().

Referenced by GenObject.GenObject.printTuple().

31 def warn (*args, **kwargs):
32  """print out warning with line number and rest of arguments"""
33  if quietWarn: return
34  frame = inspect.stack()[1]
35  filename = frame[1]
36  lineNum = frame[2]
37  #print filename, filenameRE
38  filename = filenameRE.sub ('', filename)
39  #print "after '%s'" % filename
40  blankLines = kwargs.get('blankLines', 0)
41  if blankLines:
42  print('\n' * blankLines)
43  spaces = kwargs.get('spaces', 0)
44  if spaces:
45  print(' ' * spaces, end=' ')
46  if len (args):
47  print("%s (%s): " % (filename, lineNum), end=' ')
48  for arg in args:
49  print(arg, end=' ')
50  print()
51  else:
52  print("%s (%s):" % (filename, lineNum))
53 
54 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def warn(args, kwargs)
Definition: GenObject.py:31

Variable Documentation

GenObject.filenameRE

Definition at line 22 of file GenObject.py.

GenObject.quietWarn

Definition at line 24 of file GenObject.py.