Main Page | Class List | Class Members

hcalDCC::Unpacker Class Reference

Utility class for to analyze DCC events. More...

#include <unpacker.hh>

List of all members.

Public Member Functions

 Unpacker ()
 default constructor
 Unpacker (unsigned int *buffer, unsigned int length, bool isHexVal)
 Constructor.
 ~Unpacker ()
 default destructor
void unpack ()
void setEventBuffer (unsigned int *buffer, unsigned int length, bool isHexVal)
unsigned int * getEventBuffer ()
void print ()
unsigned int getMask (int numberOfBits)
dccEvent * getDCCEvent ()
void getHTREvent (int nHTR, htrEvent &evHTR) throw (hcalDCC::Exception)
void printHTREvent (int nHTR)
unsigned int checkEvent (unsigned int *htrErrorArray)
void getLRBErrors (int nHTR, htrLrbErrors &lrbErrors)
unsigned int checkLRBErrors (int nHTR)
void getHTREventStatus (int nHTR, htrEventStatus &evStatus)
unsigned int checkHTREventStatus (int nHTR)
void getHTRChannelID (int nHTR, htrChannelId &chID)
int crc16d64 ()


Detailed Description

Utility class for to analyze DCC events.

Author:
Fernando Varela (Boston University)
Revision
1.0

Date
2005/07/07 19:52:42

The Unpacker class allows to check the integrity of the DCC events. It also provides methods to unpack and present in comprenhensible way the DCC data, e.g. event number, bunch crossing ID, data for a given HTR, etc.


Constructor & Destructor Documentation

hcalDCC::Unpacker::Unpacker unsigned int *  buffer,
unsigned int  length,
bool  isHexVal
 

Constructor.

Constructor

Parameters:
buffer pointer to the event data (32-bit words)
length is the size of the event
isHexVal indicates weather the data passed is in hex values or ASCII


Member Function Documentation

unsigned int hcalDCC::Unpacker::checkEvent unsigned int *  htrErrorArray  ) 
 

Check data consistecy for a DCC event

Parameters:
htrErrorArray pointer to an array of errors for the HTR (Detailed HTR error information). The error table can be found in this file (unpacker.hh)
Returns:
DCC error code summary. DCC global error information. The error table can be found in this file (unpacker.hh).

unsigned int hcalDCC::Unpacker::checkHTREventStatus int  nHTR  ) 
 

Gets the ERROR code corresponding to Event Status for a given HTR

Parameters:
nHTR HTR number
Returns:
error code

unsigned int hcalDCC::Unpacker::checkLRBErrors int  nHTR  ) 
 

Checks the ERROR code corresponding to LRB error for a given HTR

Parameters:
nHTR HTR number
Returns:
lrb errors code

int hcalDCC::Unpacker::crc16d64  ) 
 

Calculates the CRC16 from 64-bit words for the event

Returns:
crc value

dccEvent* hcalDCC::Unpacker::getDCCEvent  )  [inline]
 

Gets a pointer to a dccEvent data structure

Returns:
a dccEvent data structure

unsigned int* hcalDCC::Unpacker::getEventBuffer  )  [inline]
 

Gets a pointer to the current event buffer

Returns:
pointer to the current event buffer

void hcalDCC::Unpacker::getHTRChannelID int  nHTR,
htrChannelId &  chID
 

Gets the ID Channel structure

Parameters:
nHTR HTR number
chID Channel ID htrChannelId structure

void hcalDCC::Unpacker::getHTREvent int  nHTR,
htrEvent evHTR
throw (hcalDCC::Exception)
 

Gets a HTR event

Parameters:
nHTR HTR number
evHTR is the resulting htrEvent data structure

void hcalDCC::Unpacker::getHTREventStatus int  nHTR,
htrEventStatus &  evStatus
 

Gets the HTR Event Structure for a given HTR

Parameters:
nHTR HTR number
evStatus resulting htrEventStatus structure

void hcalDCC::Unpacker::getLRBErrors int  nHTR,
htrLrbErrors &  lrbErrors
 

Gets the HTR LRB errors structure

Parameters:
nHTR HTR number
lrbErrors resulting htrLrbErros structure for this HTR

unsigned int hcalDCC::Unpacker::getMask int  numberOfBits  ) 
 

Gets the mask for an item n-bit long

Parameters:
numberOfBits number of bits to calculate the mask for
Returns:
mask for the bits indicated by numberOfBits

void hcalDCC::Unpacker::print  ) 
 

Prints out 'undertandable' event information

void hcalDCC::Unpacker::printHTREvent int  nHTR  ) 
 

Prints a HTR event

Parameters:
nHTR is the HTR number

void hcalDCC::Unpacker::setEventBuffer unsigned int *  buffer,
unsigned int  length,
bool  isHexVal
 

Sets a new event buffer

Parameters:
buffer pointer to the event data (32-bit words)
length is the size of the event
isHexVal indicates weather the data passed is in hex values or ASCII

void hcalDCC::Unpacker::unpack  ) 
 

Event unpacking function. This function is the one that actualy does the work. It is called by the constructors although it can also be called when the event buffer is changed by the function setEventBuffer


The documentation for this class was generated from the following files:
Generated on Fri Jul 8 20:52:06 2005 for HCAL Data Concentrator Card by  doxygen 1.3.9.1