/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Private Member Functions
HoldOn::QueueueueUp Class Reference
Inheritance diagram for HoldOn::QueueueueUp:
Inheritance graph
[legend]
Collaboration diagram for HoldOn::QueueueueUp:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def execute
def __init__
def initialize
def execute
def finalize
def verbose
def debug
def info
def warning
def error
def fatal
def getAES
def initializeHeader
def finalizeHeader

Public Attributes

 queue
 size
 oldho
 execNum
 msgSvc
 archiveSvc
 stats
 defaultInputLocation
 execNumber
 currentJobId

Private Member Functions

def _newhos

Detailed Description

Definition at line 8 of file HoldOn.py.


Constructor & Destructor Documentation

def HoldOn::QueueueueUp::__init__ (   self,
  name = None 
)

Definition at line 10 of file HoldOn.py.

00011                                    :
00012         DybPythonAlg.__init__(self,name)
00013         self.queue = []
00014         self.size = 4
00015         self.oldho = None
00016         self.execNum = 0
00017         return
00018         


Member Function Documentation

def HoldOn::QueueueueUp::_newhos (   self,
  hos 
) [private]

Definition at line 19 of file HoldOn.py.

00020                          :
00021         'Return any new hos not yet seen'
00022 
00023         if not hos: return []
00024 
00025         if self.oldho is None:
00026             self.oldho = hos[0]
00027             return list(hos)    # fresh list
00028 
00029         try:                    # sometimes the ho escapes
00030             ind = hos.index(self.oldho)
00031         except ValueError:
00032             self.oldho = hos[0]
00033             return list(hos)
00034 
00035         self.oldho = hos[0]
00036         return hos[:ind]

def HoldOn::QueueueueUp::execute (   self)

Definition at line 37 of file HoldOn.py.

00038                      :
00039         self.execNum += 1
00040         rohs = self.getAES('/Event/Readout/ReadoutHeader')
00041 
00042         print 'Execution# %d %s' % (self.execNum,'-'*70)
00043         print 'AES holds %d RoHs' % len(rohs)
00044 
00045         rohs = self._newhos(rohs)
00046 
00047         def rohstr(roh): return '%s [%d]' % (roh.context().AsString(), id(roh))
00048             
00049         print 'New RoHs: (%d)' % len(rohs)
00050         for roh in rohs: print '\t%s'%rohstr(roh)
00051 
00052         self.queue = rohs + self.queue
00053         loss = self.queue[self.size:]
00054 
00055         print 'Lost RoHs: (%d)' % len(loss)
00056         for roh in loss: print '\t%s'%rohstr(roh)
00057 
00058         self.queue = self.queue[:self.size]
00059 
00060         print 'Queued RoHs: (%d)' % len(self.queue)
00061         for roh in self.queue: print '\t%s'%rohstr(roh)
00062 
00063         print 'Execution# %d %s' % (self.execNum,'-'*70)
00064         return SUCCESS


Member Data Documentation

Definition at line 10 of file HoldOn.py.

Definition at line 10 of file HoldOn.py.

Definition at line 10 of file HoldOn.py.

Definition at line 10 of file HoldOn.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:16:19 for Test15 by doxygen 1.7.4