![]() |
Project
|
#include <HmpidDecoder.h>
Inherited by o2::hmpid::HmpidDecodeRawFile, and o2::hmpid::HmpidDecodeRawMem.
Public Member Functions | |
HmpidDecoder (int *EqIds, int *CruIds, int *LinkIds, int numOfEquipments) | |
HmpidDecoder (int numOfEquipments) | |
~HmpidDecoder () | |
Destructor : remove the Equipments instances. | |
void | init () |
Init all the members variables. | |
virtual bool | setUpStream (void *Buffer, long BufferLen)=0 |
void | setVerbosity (int Level) |
int | getVerbosity () |
int | getNumberOfEquipments () |
int | getEquipmentIndex (int EquipmentId) |
int | getEquipmentIndex (int CruID, int LinkId) |
int | getEquipmentID (int CruId, int LinkId) |
void | decodePage (uint32_t **streamBuffer) |
void | decodePageFast (uint32_t **streamBuf) |
bool | decodeBuffer () |
bool | decodeBufferFast () |
uint16_t | getChannelSamples (int Equipment, int Column, int Dilogic, int Channel) |
double | getChannelSum (int Equipment, int Column, int Dilogic, int Channel) |
double | getChannelSquare (int Equipment, int Column, int Dilogic, int Channel) |
uint16_t | getPadSamples (int Module, int Row, int Column) |
double | getPadSum (int Module, int Row, int Column) |
double | getPadSquares (int Module, int Row, int Column) |
void | dumpErrors (int Equipment) |
void | dumpPads (int Equipment, int type=0) |
void | writeSummaryFile (char *summaryFileName) |
float | getAverageEventSize (int Equipment) |
float | getAverageBusyTime (int Equipment) |
bool | decodeHmpidError (int ErrorField, char *outbuf) |
void | dumpHmpidError (int ErrorField) |
bool | isPadWord (uint32_t wp, int *Err, int *Col, int *Dilogic, int *Channel, int *Charge) |
int | decodeHeader (uint32_t *streamPtrAdr, int *EquipIndex) |
HmpidEquipment * | evaluateHeaderContents (int EquipmentIndex) |
void | updateStatistics (HmpidEquipment *eq) |
Public Attributes | |
int | mVerbose |
HmpidEquipment * | mTheEquipments [Geo::MAXEQUIPMENTS] |
int | mNumberOfEquipments |
uint64_t | mHeEvent |
int | mHeBusy |
int | mNumberWordToRead |
int | mPayloadTail |
int | mHeFEEID |
int | mHeSize |
int | mHeVer |
int | mHePrior |
int | mHeStop |
int | mHePages |
int | mEquipment |
int | mHeOffsetNewPack |
int | mHeMemorySize |
int | mHeDetectorID |
int | mHeDW |
int | mHeCruID |
int | mHePackNum |
int | mHePAR |
int | mHePageNum |
int | mHeLinkNum |
int | mHeFirmwareVersion |
int | mHeHmpidError |
int | mHeBCDI |
int | mHeORBIT |
int | mHeTType |
uint32_t * | mActualStreamPtr |
uint32_t * | mEndStreamPtr |
uint32_t * | mStartStreamPtr |
int | mRDHSize |
int | mRDHAcceptedVersion |
o2::InteractionRecord | mIntReco |
Static Public Attributes | |
static char | sErrorDescription [MAXERRORS][MAXDESCRIPTIONLENGHT] |
Decoding Error Messages Definitions. | |
static char | sHmpidErrorDescription [MAXHMPIDERRORS][MAXDESCRIPTIONLENGHT] |
HMPID Firmware Error Messages Definitions. | |
Protected Member Functions | |
int | checkType (uint32_t wp, int *p1, int *p2, int *p3, int *p4) |
bool | isRowMarker (uint32_t wp, int *Err, int *rowSize, int *mark) |
bool | isSegmentMarker (uint32_t wp, int *Err, int *segSize, int *Seg, int *mark) |
bool | isEoEmarker (uint32_t wp, int *Err, int *Col, int *Dilogic, int *Eoesize) |
virtual void | setPad (HmpidEquipment *eq, int col, int dil, int ch, uint16_t charge)=0 |
virtual bool | getBlockFromStream (uint32_t **streamPtr, uint32_t Size)=0 |
virtual bool | getHeaderFromStream (uint32_t **streamPtr)=0 |
virtual bool | getWordFromStream (uint32_t *word)=0 |
uint32_t * | getActualStreamPtr () |
Definition at line 54 of file HmpidDecoder.h.
Constructor : accepts the number of equipments to define and their complete address map Allocates instances for all defined equipments
The Address map is build from three array
[in] | numOfEquipments | : the number of equipments to define [1..14] |
[in] | *EqIds | : the pointer to the Equipments ID array |
[in] | *CruIds | : the pointer to the CRU ID array |
[in] | *LinkIds | : the pointer to the Link ID array |
Definition at line 73 of file HmpidDecoder.cxx.
HmpidDecoder::HmpidDecoder | ( | int | numOfEquipments | ) |
Constructor : accepts the number of equipments to define The mapping is the default at P2 Allocates instances for all defined equipments normally it is equal to 14
[in] | numOfEquipments | : the number of equipments to define [1..14] |
Definition at line 51 of file HmpidDecoder.cxx.
HmpidDecoder::~HmpidDecoder | ( | ) |
Destructor : remove the Equipments instances.
Definition at line 82 of file HmpidDecoder.cxx.
Scans the BitMap of Raw Data File word and detect the type and the parameters
[in] | wp | : the word to analyze |
[out] | *p1 | : first parameter extract (if it exists) |
[out] | *p2 | : second parameter extract (if it exists) |
[out] | *p3 | : third parameter extract (if it exists) |
[out] | *p4 | : fourth parameter extract (if it exists) |
Definition at line 184 of file HmpidDecoder.cxx.
bool HmpidDecoder::decodeBuffer | ( | ) |
------------— Read Raw Data Buffer ------------— Read the stream, decode the contents and store resuls. ATTENTION : Assumes that the input stream was set
TH_WRONGHEADER | Thrown if the Fails to decode the Header |
Definition at line 746 of file HmpidDecoder.cxx.
bool HmpidDecoder::decodeBufferFast | ( | ) |
-------— Read Raw Data Buffer with Fast Decoding -------— Read the stream, decode the contents and store resuls. Fast alghoritm : no parsing of control words ! ATTENTION : Assumes that the input stream was set
TH_WRONGHEADER | Thrown if the Fails to decode the Header |
Definition at line 836 of file HmpidDecoder.cxx.
This Decode the Raw Data Header, returns the EquipmentIndex that is obtained with the FLP hardware coords
ATTENTION : the 'EquipIndex' parameter and the mEquipment member are different data: the first is the pointer in the Equipments instances array, the second is the FEE_ID number
The EVENT_NUMBER : actually is calculated from the ORBIT number
[in] | *streamPtrAdr | : the pointer to the Header buffer |
[out] | *EquipIndex | : the Index to the Equipment Object Array [0..13] |
TH_WRONGEQUIPINDEX | Thrown if the Equipment Index is out of boundary (Equipment not recognized) |
Definition at line 358 of file HmpidDecoder.cxx.
Decode the HMPID error BitMap field (5 bits) and returns true if there are errors and in addition the concat string that contains the error messages ATTENTION : the char * outbuf MUST point to a 250 bytes buffer
[in] | ErrorField | : the HMPID Error field |
[out] | *outbuf | : the output buffer that contains the error description |
Definition at line 332 of file HmpidDecoder.cxx.
void HmpidDecoder::decodePage | ( | uint32_t ** | streamBuf | ) |
------------— Decode One Page from Data Buffer ------------— Read the stream, decode the contents and store resuls. ATTENTION : Assumes that the input stream was set
TH_WRONGHEADER | Thrown if the Fails to decode the Header |
[in] | streamBuf | : the pointer to the Pointer of the Stream Buffer |
Definition at line 485 of file HmpidDecoder.cxx.
void HmpidDecoder::decodePageFast | ( | uint32_t ** | streamBuf | ) |
------— Decode One Page from Data Buffer with Fast Decoding -----— Read the stream, decode the contents and store resuls. ATTENTION : Assumes that the input stream was set
TH_WRONGHEADER | Thrown if the Fails to decode the Header |
[in] | streamBuf | : the pointer to the Pointer of the Stream Buffer |
Definition at line 786 of file HmpidDecoder.cxx.
Prints on the standard output the table of decoding errors for one equipment
[in] | EquipmId | : the HMPID EquipmentId [0..13] |
Definition at line 991 of file HmpidDecoder.cxx.
Prints on the standard output the decoded HMPID error field
[in] | ErrorField | : the HMPID readout error field |
Definition at line 1041 of file HmpidDecoder.cxx.
Prints on the standard output a Table of statistical decoding information for one equipment
[in] | EquipmId | : the HMPID EquipmentId [0..13] @type[in] The type of info. 0 = Entries, 1 = Sum, 2 = Sum of squares |
Definition at line 1009 of file HmpidDecoder.cxx.
HmpidEquipment * HmpidDecoder::evaluateHeaderContents | ( | int | EquipmentIndex | ) |
Evaluates the content of the header and detect the change of the event with the relevant updates...
[in] | EquipmentIndex | : the pointer to the Array of Equipments Array |
Definition at line 454 of file HmpidDecoder.cxx.
|
inlineprotected |
Definition at line 168 of file HmpidDecoder.h.
float HmpidDecoder::getAverageBusyTime | ( | int | EquipmId | ) |
Gets the Average Busy Time value
[in] | EquipmId | : the HMPID EquipmentId [0..13] |
Definition at line 976 of file HmpidDecoder.cxx.
float HmpidDecoder::getAverageEventSize | ( | int | EquipmId | ) |
Gets the Average Event Size value
[in] | EquipmId | : the HMPID EquipmentId [0..13] |
Definition at line 964 of file HmpidDecoder.cxx.
|
protectedpure virtual |
Getter method to extract Statistic Data in Hardware Coords
[in] | EquipmId | : the HMPID EquipmentId [0..13] |
[in] | Column | : the HMPID Module Column number [0..23] |
[in] | Dilogic | : the HMPID Module Row number [0..9] |
[in] | Channel | : the HMPID Module Row number [0..47] |
Definition at line 922 of file HmpidDecoder.cxx.
Getter method to extract Statistic Data in Hardware Coords
[in] | EquipmId | : the HMPID EquipmentId [0..13] |
[in] | Column | : the HMPID Module Column number [0..23] |
[in] | Dilogic | : the HMPID Module Row number [0..9] |
[in] | Channel | : the HMPID Module Row number [0..47] |
Definition at line 952 of file HmpidDecoder.cxx.
Getter method to extract Statistic Data in Hardware Coords
[in] | EquipmId | : the HMPID EquipmentId [0..13] |
[in] | Column | : the HMPID Module Column number [0..23] |
[in] | Dilogic | : the HMPID Module Row number [0..9] |
[in] | Channel | : the HMPID Module Row number [0..47] |
Definition at line 937 of file HmpidDecoder.cxx.
Returns the Equipment_ID converting the FLP hardware coords
[in] | CruId | : the CRU ID [0..3] -> FLP 160 = [0,1] FLP 161 = [2,3] |
[in] | LinkId | : the Link ID [0..3] |
Definition at line 166 of file HmpidDecoder.cxx.
Returns the Equipment Index (Pointer of the array) converting the FLP hardware coords (CRU_Id and Link_Id)
[in] | CruId | : the CRU ID [0..3] -> FLP 160 = [0,1] FLP 161 = [2,3] |
[in] | LinkId | : the Link ID [0..3] |
Definition at line 138 of file HmpidDecoder.cxx.
Returns the Equipment Index (Pointer of the array) converting the Equipment_ID (Firmaware defined Id AKA FFEID)
[in] | EquipmentId | : the Equipment ID [0..13] |
Definition at line 152 of file HmpidDecoder.cxx.
|
protectedpure virtual |
|
inline |
Definition at line 120 of file HmpidDecoder.h.
Getter method to extract Statistic Data in Digit Coords
[in] | Module | : the HMPID Module number [0..6] |
[in] | Column | : the HMPID Module Column number [0..143] |
[in] | Row | : the HMPID Module Row number [0..159] |
Definition at line 873 of file HmpidDecoder.cxx.
Getter method to extract Statistic Data in Digit Coords
[in] | Module | : the HMPID Module number [0..6] |
[in] | Column | : the HMPID Module Column number [0..143] |
[in] | Row | : the HMPID Module Row number [0..159] |
Definition at line 905 of file HmpidDecoder.cxx.
Getter method to extract Statistic Data in Digit Coords
[in] | Module | : the HMPID Module number [0..6] |
[in] | Column | : the HMPID Module Column number [0..143] |
[in] | Row | : the HMPID Module Row number [0..159] |
Definition at line 889 of file HmpidDecoder.cxx.
|
inline |
Definition at line 115 of file HmpidDecoder.h.
|
protectedpure virtual |
void HmpidDecoder::init | ( | ) |
Init all the members variables.
Definition at line 90 of file HmpidDecoder.cxx.
|
protected |
Checks if is a EoE Marker and extracts the Column, Dilogic and the size
[in] | wp | : the word to check |
[out] | *Err | : true if an error is detected |
[out] | *Col | : the column number [1..24] |
[out] | *Dilogic | : the dilogic number [1..10] |
[out] | *Eoesize | : the number of words for dilogic |
Definition at line 308 of file HmpidDecoder.cxx.
bool HmpidDecoder::isPadWord | ( | uint32_t | wp, |
int * | Err, | ||
int * | Col, | ||
int * | Dilogic, | ||
int * | Channel, | ||
int * | Charge | ||
) |
Checks if is a PAD Word and extracts all the parameters PAD map : 0000.0ccc.ccdd.ddnn.nnnn.vvvv.vvvv.vvvv :: c=col,d=dilo,n=chan,v=value
[in] | wp | : the word to check |
[out] | *Err | : true if an error is detected |
[out] | *Col | : the column number [1..24] |
[out] | *Dilogic | : the dilogic number [1..10] |
[out] | *Channel | : the channel number [0..47] |
[out] | *Charge | : the value of Charge [0..4095] |
Definition at line 275 of file HmpidDecoder.cxx.
Checks if is a Raw Marker and extract the Row Size
[in] | wp | : the word to check |
[out] | *Err | : true if an error is detected |
[out] | *rowSize | : the number of words of the row |
[out] | *mark | : the row marker |
Definition at line 229 of file HmpidDecoder.cxx.
|
protected |
Checks if is a Segment Marker and extracts the Segment number and the size
[in] | wp | : the word to check |
[out] | *Err | : true if an error is detected |
[out] | *segSize | : the number of words of the segment |
[out] | *Seg | : the Segment number [1..3] |
[out] | *mark | : the Segment Marker |
Definition at line 249 of file HmpidDecoder.cxx.
|
protectedpure virtual |
Implemented in o2::hmpid::HmpidDecodeRawMem, and o2::hmpid::HmpidDecodeRawFile.
Definition at line 111 of file HmpidDecoder.h.
void HmpidDecoder::updateStatistics | ( | HmpidEquipment * | eq | ) |
Updates some information related to the Event this function is called at the end of the event
[in] | *eq | : the pointer to the Equipment Object |
Definition at line 431 of file HmpidDecoder.cxx.
Writes in a ASCCI File the complete report of the decoding procedure
[in] | *summaryFileName | : the name of the output file |
TH_CREATEFILE | Thrown if was not able to create the file |
Definition at line 1054 of file HmpidDecoder.cxx.
uint32_t* o2::hmpid::HmpidDecoder::mActualStreamPtr |
Definition at line 97 of file HmpidDecoder.h.
uint32_t* o2::hmpid::HmpidDecoder::mEndStreamPtr |
Definition at line 98 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mEquipment |
Definition at line 78 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeBCDI |
Definition at line 93 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeBusy |
Definition at line 68 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeCruID |
Definition at line 85 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeDetectorID |
Definition at line 83 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeDW |
Definition at line 84 of file HmpidDecoder.h.
uint64_t o2::hmpid::HmpidDecoder::mHeEvent |
Definition at line 67 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeFEEID |
Definition at line 72 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeFirmwareVersion |
Definition at line 91 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeHmpidError |
Definition at line 92 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeLinkNum |
Definition at line 90 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeMemorySize |
Definition at line 81 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeOffsetNewPack |
Definition at line 80 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeORBIT |
Definition at line 94 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHePackNum |
Definition at line 86 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHePageNum |
Definition at line 89 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHePages |
Definition at line 77 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHePAR |
Definition at line 87 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHePrior |
Definition at line 75 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeSize |
Definition at line 73 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeStop |
Definition at line 76 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeTType |
Definition at line 95 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mHeVer |
Definition at line 74 of file HmpidDecoder.h.
o2::InteractionRecord o2::hmpid::HmpidDecoder::mIntReco |
Definition at line 147 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mNumberOfEquipments |
Definition at line 61 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mNumberWordToRead |
Definition at line 69 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mPayloadTail |
Definition at line 70 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mRDHAcceptedVersion |
Definition at line 101 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mRDHSize |
Definition at line 100 of file HmpidDecoder.h.
uint32_t* o2::hmpid::HmpidDecoder::mStartStreamPtr |
Definition at line 99 of file HmpidDecoder.h.
HmpidEquipment* o2::hmpid::HmpidDecoder::mTheEquipments[Geo::MAXEQUIPMENTS] |
Definition at line 60 of file HmpidDecoder.h.
int o2::hmpid::HmpidDecoder::mVerbose |
Definition at line 59 of file HmpidDecoder.h.
|
static |
Decoding Error Messages Definitions.
Definition at line 63 of file HmpidDecoder.h.
|
static |
HMPID Firmware Error Messages Definitions.
Definition at line 64 of file HmpidDecoder.h.