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

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Public Attributes

 lastTriggerTime

Detailed Description

Definition at line 24 of file DtData.py.


Constructor & Destructor Documentation

def DtData::DtDataAlg::__init__ (   self,
  name 
)

Definition at line 26 of file DtData.py.

00027                            :
00028         DybPythonAlg.__init__(self,name)
00029         return


Member Function Documentation

def DtData::DtDataAlg::initialize (   self)

Definition at line 30 of file DtData.py.

00031                         :
00032         status = DybPythonAlg.initialize(self)
00033         if status.isFailure(): return status
00034         self.info("initializing")
00035         self.lastTriggerTime = None
00036         return SUCCESS

def DtData::DtDataAlg::execute (   self)
Store the time since the last trigger

Definition at line 37 of file DtData.py.

00038                      :
00039         """Store the time since the last trigger"""
00040         evt = self.evtSvc()
00041 
00042         # Get the current detector Readout
00043         readoutHdr = evt["/Event/Readout/ReadoutHeader"]
00044         if readoutHdr == None:
00045             self.error("Failed to get current readout header")
00046             return FAILURE
00047         readout = readoutHdr.daqCrate().asPmtCrate()
00048         if readout == None:
00049             self.error("No readout this cycle?")
00050             return FAILURE
00051 
00052         # Calculate time since last trigger
00053         triggerTime = readout.triggerTime()
00054         dtLastTrigger = -1 * units.second
00055         if self.lastTriggerTime != None:
00056             dtTimeStamp = TimeStamp( triggerTime )
00057             dtTimeStamp.Subtract( self.lastTriggerTime )
00058             dtLastTrigger = dtTimeStamp.GetSeconds() * units.second
00059 
00060         # Store this user-defined data in a UserDataHeader
00061         userData = UserDataHeader()
00062         self.initializeHeader( userData )
00063 
00064         # Set user data variables here
00065         userData.setFloat('dtLastTrigger',dtLastTrigger)
00066 
00067         # Add user data to event store
00068         userData.addInputHeader( readoutHdr )
00069         self.finalizeHeader( userData )
00070         evt['/Event/UserData/Dt'] = userData
00071 
00072         self.lastTriggerTime = TimeStamp( triggerTime )
00073         return SUCCESS
        
def DtData::DtDataAlg::finalize (   self)

Definition at line 74 of file DtData.py.

00075                       :
00076         self.info("finalizing")
00077         status = DybPythonAlg.finalize(self)
00078         return status
00079 


Member Data Documentation

Definition at line 30 of file DtData.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:54:33 for Quickstart by doxygen 1.7.4