Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

ancillaryContribution.py

00001 #!/usr/local/bin/python
00002 #
00003 #                               Copyright 2006
00004 #                                     by
00005 #                        The Board of Trustees of the
00006 #                     Leland Stanford Junior University.
00007 #                            All rights reserved.
00008 #
00009 
00010 __facility__ = "Online"
00011 __abstract__ = "Ancillary event contribution class"
00012 __author__   = "R. Claus <Claus@SLAC.Stanford.edu> SLAC - GLAST LAT I&T/Online"
00013 __date__     = "3/30/2006"
00014 __updated__  = ("$Date: 2006/07/14 22:27:33 $").split(' ')[1]
00015 __version__  = "$Revision: 1.1 $"
00016 __release__  = "$Name: R04-12-00 $"
00017 __credits__  = "SLAC"
00018 
00019 import LATTE.copyright_SLAC
00020 
00021 import struct
00022 
00023 import LATTE.merger.geb as geb
00024 
00025 
00026 class AncillaryContribution(geb.GebContribution):
00027   EventId   = 0x000F1030L               # LDF.LATprimaryId.BtAncEvt
00028   HeaderId  = 0x000F1040L               # LDF.LATprimaryId.BtAncHdr
00029   TrailerId = 0x000F1050L               # LDF.LATprimaryId.BtAncTlr
00030   def __init__(self, contributor, contribution):
00031     geb.GebContribution.__init__(self, contributor)
00032     self.__contribution = contribution
00033 
00034   def identity(self):
00035     return struct.unpack('>L', self.__contribution[0*4:1*4])[0]
00036 
00037   def length(self):
00038     return struct.unpack('>L', self.__contribution[1*4:2*4])[0]
00039 
00040   def sequence(self):
00041     seq = struct.unpack('>L', self.__contribution[2*4:3*4])[0] & 0x0fffffff
00042     return self.contributor().sequence(seq)
00043 
00044   def buffer(self):
00045     return self.__contribution

Generated on Fri Jul 21 13:26:26 2006 for LATTE R04-12-00 by doxygen 1.4.3