CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
hippyaddtobaddatafiles.OneAtATime Class Reference
Inheritance diagram for hippyaddtobaddatafiles.OneAtATime:
hippyaddtobaddatafiles.KeepWhileOpenFile

Public Member Functions

def __enter__ (self)
 
def __init__ (self, name, delay, message=None, printmessage=None, task="doing this")
 
- Public Member Functions inherited from hippyaddtobaddatafiles.KeepWhileOpenFile
def __enter__ (self)
 
def __exit__ (self, args)
 
def __init__ (self, name, message=None)
 
def __nonzero__ (self)
 
def wouldbevalid (self)
 

Public Attributes

 delay
 
- Public Attributes inherited from hippyaddtobaddatafiles.KeepWhileOpenFile
 bool
 
 f
 
 fd
 
 filename
 
 pwd
 

Private Attributes

 __printmessage
 

Detailed Description

Definition at line 102 of file hippyaddtobaddatafiles.py.

Constructor & Destructor Documentation

def hippyaddtobaddatafiles.OneAtATime.__init__ (   self,
  name,
  delay,
  message = None,
  printmessage = None,
  task = "doing this" 
)

Definition at line 103 of file hippyaddtobaddatafiles.py.

103  def __init__(self, name, delay, message=None, printmessage=None, task="doing this"):
104  super(OneAtATime, self).__init__(name, message=message)
105  self.delay = delay
106  if printmessage is None:
107  printmessage = "Another process is already {task}! Waiting {delay} seconds."
108  printmessage = printmessage.format(delay=delay, task=task)
109  self.__printmessage = printmessage
110 
def __init__(self, name, delay, message=None, printmessage=None, task="doing this")

Member Function Documentation

def hippyaddtobaddatafiles.OneAtATime.__enter__ (   self)

Definition at line 111 of file hippyaddtobaddatafiles.py.

References hippyaddtobaddatafiles.OneAtATime.__printmessage, hippyaddtobaddatafiles.cdtemp(), hippyaddtobaddatafiles.OneAtATime.delay, and edm.print().

111  def __enter__(self):
112  while True:
113  result = super(OneAtATime, self).__enter__()
114  if result:
115  return result
116  print(self.__printmessage)
117  time.sleep(self.delay)
118 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66

Member Data Documentation

hippyaddtobaddatafiles.OneAtATime.__printmessage
private
hippyaddtobaddatafiles.OneAtATime.delay