Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

EBFevent Class Reference

Class for decoding an EBF event. More...

#include <EBFevent.h>

Inheritance diagram for EBFevent:

Inheritance graph
[legend]
Collaboration diagram for EBFevent:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  ID_1 = LATidentity_(LATprimaryId::Id_EBF, LATsecondaryId::Id_EBF_1), ID_2 = LATidentity_(LATprimaryId::Id_EBF, LATsecondaryId::Id_EBF_2), ID_3 = LATidentity_(LATprimaryId::Id_EBF, LATsecondaryId::Id_EBF_3), ID = LATidentity_(LATprimaryId::Id_EBF, LATsecondaryId::Id_EBF),
  ID_MC = LATidentity_(LATprimaryId::Id_EBF_MC, LATsecondaryId::Id_EBF_MC)
}

Public Member Functions

unsigned status () const
 Return the event's status word as generated by the hardware.
unsigned summary () const
 Return the event's summary word.
unsigned payloadSize () const
 Return the size of the event's data payload.
EBFcontributionpayload () const
 Return a pointer to the first contribution to the event.
unsigned char * string (bool swap=!DFC_BIG_ENDIAN)
 Return this EBFevent in string form.

Static Public Member Functions

EBFeventcreate (unsigned char *buffer, unsigned size, bool swap=!DFC_BIG_ENDIAN)
 Create an EBFevent from a Python string.

Detailed Description

Class for decoding an EBF event.

EBF stands for Event Builder Format and is the format that is generated by the LAT hardware. Events in this format are the input to the FSW filter algorithm.

Author:
R. Claus -- GLAST LAT I&T/Online - (claus@slac.stanford.edu)
Revision
1.8
Date:
January 22, 2003 -- Created
Id
EBFevent.h,v 1.8 2004/05/04 23:08:30 claus Exp

Copyright: Copyright 2004 by The Board of Trustees of the Leland Stanford Junior University. All rights reserved.


Member Function Documentation

EBFevent * EBFevent::create unsigned char *  buffer,
unsigned  size,
bool  swap = !DFC_BIG_ENDIAN
[inline, static]
 

Create an EBFevent from a Python string.

This method is here to support the Python interface. A Python string is casted to an EBFevent. If this class had anything but a no-op constructor this would not work and we would have to use placement new. The reason this wasn't done right off the bat is that it isn't entirely clear that we know how to do this correctly vis a vis the Python object reference counting. Sometimes a Python crash is observed that complains about an object already being marked for garbage collection. I have not beeg able to narrow this down to a particular class, but think it might have to do with the placement new used in the LATdatagram class.

Parameters:
buffer - A buffer containing an EBFevent in string form
size - The size of the buffer
swap - Optional parameter to force or not force in place byte swapping
Returns:
- A pointer to the buffer cast as an EBFevent

EBFcontribution * EBFevent::payload  )  const [inline]
 

Return a pointer to the first contribution to the event.

Returns:
A pointer to the first EBFcontribution in the EBFevent

unsigned EBFevent::payloadSize  )  const [inline]
 

Return the size of the event's data payload.

Returns:
The size of the event's payload

unsigned EBFevent::status  )  const [inline]
 

Return the event's status word as generated by the hardware.

Returns:
The event's status

unsigned char * EBFevent::string bool  swap = !DFC_BIG_ENDIAN  )  [inline]
 

Return this EBFevent in string form.

This method is here to support the Python interface.

Parameters:
swap - Boolean to cause the buffer to be byte swapped in place
Returns:
A pointer to this EBFevent cast as an array of unsigned chars

Reimplemented from LATcontribution.

unsigned EBFevent::summary  )  const [inline]
 

Return the event's summary word.

This word really doesn't belong with the event, but with the first contributor to the event. However, all contributors are expected to generate the same summary word, so we let the first contributor's version speak for the whole event.

Returns:
The event's summary word


The documentation for this class was generated from the following file:
Generated on Thu Sep 29 12:13:38 2005 for LDF v05-07-00 by doxygen 1.3.9.1