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

◆ __init__()

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, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ __enter__()

def hippyaddtobaddatafiles.OneAtATime.__enter__ (   self)

Definition at line 111 of file hippyaddtobaddatafiles.py.

References hippyaddtobaddatafiles.OneAtATime.__printmessage, hippyaddtobaddatafiles.cdtemp(), hippyaddtobaddatafiles.OneAtATime.delay, and 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 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Member Data Documentation

◆ __printmessage

hippyaddtobaddatafiles.OneAtATime.__printmessage
private

◆ delay

hippyaddtobaddatafiles.OneAtATime.delay