/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
DybPython::TestDecorators::TestDecorators Class Reference
Inheritance diagram for DybPython::TestDecorators::TestDecorators:
Inheritance graph
[legend]
Collaboration diagram for DybPython::TestDecorators::TestDecorators:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

 msgSvc
 archiveSvc
 stats
 defaultInputLocation
 execNumber
 currentJobId

Detailed Description

Definition at line 14 of file TestDecorators.py.


Constructor & Destructor Documentation

def DybPython::TestDecorators::TestDecorators::__init__ (   self,
  name 
)
Create a DybPythonAlg.  The name is the class name by default.
If sub class overrides this method it must be explicitly called like:

DybPythonAlg.__init__(self,name)
or
DybPythonAlg.__init__(self)

Reimplemented from DybPython::DybPythonAlg::DybPythonAlg.

Definition at line 16 of file TestDecorators.py.

00017                            :
00018         DybPythonAlg.__init__(self,name)
00019         return
    

Member Function Documentation

def DybPython::TestDecorators::TestDecorators::initialize (   self)
Initialize the algorithm.  If sub classes overrides this
method they must call it explicitly near the beginning like:

sc = DybPythonAlg.initialize(self)
if sc.isFailure(): return sc
# ... now do my own initialization ...

Reimplemented from DybPython::DybPythonAlg::DybPythonAlg.

Definition at line 23 of file TestDecorators.py.

00024                         :
00025         self.info(str(self.cableSvc))    
00026         return SUCCESS
        
def DybPython::TestDecorators::TestDecorators::execute (   self)

Reimplemented from DybPython::DybPythonAlg::DybPythonAlg.

Definition at line 28 of file TestDecorators.py.

00028                      :             
00029         return SUCCESS
00030         
def DybPython::TestDecorators::TestDecorators::finalize (   self)
Finalize the algorithm.  If sub classes overrides this
method they must call it explicitly like at the end:

# ... first do my own finalization ...
return DybPythonAlg.finalize(self)

Reimplemented from DybPython::DybPythonAlg::DybPythonAlg.

Definition at line 33 of file TestDecorators.py.

00033                       :     
00034         return SUCCESS
00035 
00036 
def DybPython::DybPythonAlg::DybPythonAlg::verbose (   self,
  message 
) [inherited]

Definition at line 111 of file DybPythonAlg.py.

00112                               :
00113         'Emit message at verbose level'
00114         self.msgSvc.reportMessage(self.name(), VERBOSE, message)
00115         return

def DybPython::DybPythonAlg::DybPythonAlg::debug (   self,
  message 
) [inherited]

Definition at line 116 of file DybPythonAlg.py.

00117                             :
00118         'Emit message at debug level'
00119         self.msgSvc.reportMessage(self.name(), DEBUG, message)
00120         return
    
def DybPython::DybPythonAlg::DybPythonAlg::info (   self,
  message 
) [inherited]

Definition at line 121 of file DybPythonAlg.py.

00122                            :
00123         'Emit message at info level'
00124         self.msgSvc.reportMessage(self.name(), INFO, message)
00125         return
    
def DybPython::DybPythonAlg::DybPythonAlg::warning (   self,
  message 
) [inherited]

Definition at line 126 of file DybPythonAlg.py.

00127                               :
00128         'Emit message at warning level'
00129         self.msgSvc.reportMessage(self.name(), WARNING, message)
00130         return
    
def DybPython::DybPythonAlg::DybPythonAlg::error (   self,
  message 
) [inherited]

Definition at line 131 of file DybPythonAlg.py.

00132                             :
00133         'Emit message at error level'
00134         self.msgSvc.reportMessage(self.name(), ERROR, message)
00135         return
    
def DybPython::DybPythonAlg::DybPythonAlg::fatal (   self,
  message 
) [inherited]

Definition at line 136 of file DybPythonAlg.py.

00137                             :
00138         'Emit message at fatal level'
00139         self.msgSvc.reportMessage(self.name(), FATAL, message)
00140         return
    
def DybPython::DybPythonAlg::DybPythonAlg::getAES (   self,
  path 
) [inherited]

Definition at line 141 of file DybPythonAlg.py.

00142                           :
00143         'Return the list of items at the AES path'
00144         if self.archiveSvc == None:
00145             status = self._initializeAES()
00146             if (not status.isSuccess()) or self.archiveSvc == None:
00147                 self.error("Archive data svc not available")
00148                 return None
00149         archiveList = self.archiveSvc[path]
00150         if archiveList == None:
00151             self.error("Path in archive not available: "+path)
00152             return None
00153         dataList = []
00154         for dataObject in irange(archiveList.begin(), archiveList.end()):
00155             dataList.append(dataObject)
00156         return dataList

def DybPython::DybPythonAlg::DybPythonAlg::initializeHeader (   self,
  newHeader 
) [inherited]
Initialize a new header object

Definition at line 157 of file DybPythonAlg.py.

00158                                         :
00159         '''Initialize a new header object'''
00160         gbl.SetOwnership(newHeader, False)
00161         newHeader.setExecNumber(0)
00162         newHeader.setEarliest(TimeStamp.GetBOT())
00163         newHeader.setLatest(TimeStamp.GetBOT())
00164         newHeader.setJobId(self.currentJobId)

def DybPython::DybPythonAlg::DybPythonAlg::finalizeHeader (   self,
  newHeader,
  referenceHeader = None 
) [inherited]
Finalize a new header object, before writing to TES

Definition at line 165 of file DybPythonAlg.py.

00166                                                              :
00167         '''Finalize a new header object, before writing to TES'''
00168         # Catch and set default input header, if needed
00169         if len(newHeader.inputHeaders())==0:
00170             if not referenceHeader and self.defaultInputLocation:
00171                 evt = self.evtSvc()
00172                 referenceHeader = evt[self.defaultInputLocation]
00173             if not referenceHeader:
00174                 self.error("Failed to retrieve input header: ",
00175                            self.defaultInputLocation)
00176                 return FAILURE
00177             newHeader.addInputHeader( referenceHeader )
00178         # Set header information based on input headers
00179         inputHeaders = newHeader.inputHeaders()
00180         if len(inputHeaders)==0:
00181             self.error("No input header specified for",newHeader.name())
00182             return FAILURE
00183         if self.execNumber:
00184             newHeader.setExecNumber(self.execNumber)
00185         else:
00186             #FIXME: use self.execNumber once auto-increment is fixed.
00187             newHeader.setExecNumber(inputHeaders[0].execNumber()) 
00188         newHeader.setContext(inputHeaders[0].context())
00189         newHeader.setEarliest(inputHeaders[0].earliest())
00190         newHeader.setLatest(inputHeaders[0].latest())
00191         detectorId = inputHeaders[0].context().GetDetId()
00192         firstHeader = True
00193         for inputHeader in inputHeaders:
00194             if firstHeader:
00195                 firstHeader=False
00196                 continue
00197             # Extend time/detector range if needed
00198             inputDetId = inputHeader.context().GetDetId()
00199             if detectorId != DetectorId.kAll and detectorId != inputDetId:
00200                 detectorId = DetectorId.kAll
00201                 newContext = Context( newHeader.context() )
00202                 newContext.SetDetId( DetectorId.kAll )
00203                 newHeader.setContext( newContext )
00204             # Extend time range if needed
00205             if inputHeader.earliest()<newHeader.earliest():
00206                 newHeader.setEarliest(inputHeader.earliest())
00207             if inputHeader.latest()>newHeader.latest():
00208                 newHeader.setLatest(inputHeader.latest())
00209         newHeader.setJobId(self.currentJobId)
00210         return SUCCESS
00211             
00212 

Member Data Documentation

Definition at line 40 of file DybPythonAlg.py.

Definition at line 40 of file DybPythonAlg.py.

Definition at line 40 of file DybPythonAlg.py.

Definition at line 40 of file DybPythonAlg.py.

Definition at line 40 of file DybPythonAlg.py.

Definition at line 59 of file DybPythonAlg.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 09:55:41 for DybPython by doxygen 1.7.4