class Packet_emc: public Packet_w4

This is the packet which deals with data in PBSC_DCM0 format.

Inheritance:


Public Methods

[more]virtual int iValue(const int channel, const char *what)
with the "what" parameter you can decide which aspect of the data is made available.
[more]virtual int iValue(const int channel, const int iy)
This gives access to the 5 data words per channel, in case the use wants to look at that raw information.
[more]virtual int fillfList5x144(float** array2D, int* channelN, int arrayOffset, int channelOffset, int threshold)
Any EMCal data format.
[more]virtual int filliList6x144(int** array2D, int arrayOffset, int channelOffset, int threshold)
The same as filliList5x144, but fills 2D float array.
[more]virtual int filliList144x6(int* array1D, int channelOffset, int threshold)
The same as filliList5x144, but array channelN is added to array2D as 6-th element
[more]virtual int filliList5x192(int** array2D, int* address, int arrayOffset, int addressOffset, int threshold)
The same as filliList5x144, but array1D is an array of the size [Nx6], and 6 values are: time, high post, low post, high pre, low pre, chennel
[more]virtual int fillfList5x192(float** array2D, int* address, int arrayOffset, int addressOffset, int threshold)
EMCal long data format only.
[more]virtual int filliList6x192(int** array2D, int arrayOffset, int channelOffset, int threshold)
The same as filliList5x192, but fills float 2D array
[more]virtual int filliList192x6(int* array1D, int channelOffset, int threshold)
The same as filliList5x192, but array channelN is added to array2D as 6-th element
[more]virtual int fillArray192x5(int *array5)
The same as filliList5x192, but array1D is an array of the size [Nx6], and 6 values are: time, high post, low post, high pre, low pre, chennel
[more]virtual int fillArray144x5(int *array5)
EMCal long data format only.
[more]virtual int fillCoarseEnergyList(int *Energy, int* channelN, int channelOffset, int threshold)
Any EMCal data format.
[more]virtual int fillCoarseEnergyArray(int* Energy)
EMCal any data format.
[more]virtual int fillQtileArray(int* qtileEnergy)
EMCal any data format.
[more]virtual int fillQtileList(int* qtileE, int*qtileN, int qtileOffset, int threshold)
EMCal any data format.

Protected Fields

[more]int max_channels
EMCal any data format.


Inherited from Packet_w4:


Inherited from Packet_A:


Inherited from Packet:

Public Methods

ovirtual float rValue(const int channel)
ovirtual float rValue(const int channel, const char * what)
ovirtual float rValue(const int channel, const int iy)
ovirtual int getArraylength(const char * what ="")
ovirtual int fillIntArray(int destination[], const int length, int * nw, const char * what="")
ovirtual int fillFloatArray(float destination[], const int length, int * nw, const char * what="")
ovirtual int* getIntArray(int * nw, const char * ="")
ovirtual float* getFloatArray(int * nw, const char * ="")
ovirtual int is_pointer_type() const
ovirtual int convert()
ovirtual int getLength() const
ovirtual int getDebugLength() const
ovirtual int getIdentifier() const
ovirtual int getPadding() const
ovirtual int getStructure() const
ovirtual int getHitFormat() const
ovirtual int getDataLength() const
ovirtual voidfullIdentify (std::ostream& os = std::cout) const (ostream & os = cout) const
ovirtual void dump(std::ostream& os = std::cout)
ovirtual void gdump(const int how = EVT_HEXADECIMAL, std::ostream& os = std::cout) const

Public

o


Documentation

This is the packet which deals with data in PBSC_DCM0 format. It inherits from Packet_w4 because the data are 32bit entities.
ovirtual int iValue(const int channel, const char *what)
with the "what" parameter you can decide which aspect of the data is made available. This class is one of those which have several different "kinds" of data; we use this to bring up the AMU cell information and all the misc. items in the FEM headers and trailers.

The AMU info is available as

 packet->iValue(0,"AMU") AMU cell from timing conversion 
 packet->iValue(1,"AMU") AMU cell from "pre" conversion
 packet->iValue(2,"AMU") AMU cell from "post" conversion
In addition, there is

 packet->iValue(0,"BCLK")     Beam clock value from FEM
 packet->iValue(0,"EVTNR")  The FEM event number
 packet->iValue(0,"MODULE")   The Module ID
 packet->iValue(i,"USERWORD") The USERWORD i, where i is from 0 through 7
 packet->iValue(i,"PARITY")   The longitudinal parity

ovirtual int iValue(const int channel, const int iy)
This gives access to the 5 data words per channel, in case the use wants to look at that raw information.

We chose to implement the 5 words of information as the two-dimensional interface, so packet->iValue(k,i) gives you the word "i" of channel k, where i is

packet->iValue(k,0) timing tag (TDC)
packet->iValue(k,1) high gain post sample
packet->iValue(k,2) low gain post sample
packet->iValue(k,3) high gain pre sample
packet->iValue(k,4) low gain pre sample
and "k" is the channel number from 0 through 143.

ovirtual int fillfList5x144(float** array2D, int* channelN, int arrayOffset, int channelOffset, int threshold)
Any EMCal data format. Fills the list of hit towers and their 5 values. Five values are: time, high post, low post, high pre, low pre. Skips disconnected AMUADC channels, thus checking only 144 channels. Returns number of list entries. Parameters: int **array2D - pointer to array[5][N] where data will be stored. N must be at least 144. Array IS NOT created by function, you must supply function with pointer to already existing array! int array Offset - offset of 2D array filling: data will be filled starting from array[i][arrayOffset], where i=0,...4. Necessary when array of more then one EMCal FEM channels is filled. int* channelN - array where list of hit towers will be stored. Must be at least 144 long Tower number in the list is FEM_channel + channelNumberOffset. int channelOffset - offset used to calculate tower number. int threshold - used as additional threshold for zero suppression: only channels with Energy > threshold are added into the list

ovirtual int filliList6x144(int** array2D, int arrayOffset, int channelOffset, int threshold)
The same as filliList5x144, but fills 2D float array. Created just to correspond to the old EEMCal software

ovirtual int filliList144x6(int* array1D, int channelOffset, int threshold)
The same as filliList5x144, but array channelN is added to array2D as 6-th element

ovirtual int filliList5x192(int** array2D, int* address, int arrayOffset, int addressOffset, int threshold)
The same as filliList5x144, but array1D is an array of the size [Nx6], and 6 values are: time, high post, low post, high pre, low pre, chennel

ovirtual int fillfList5x192(float** array2D, int* address, int arrayOffset, int addressOffset, int threshold)
EMCal long data format only. Fills the list of hit towers and their 5 values. Five values are: time, high post, low post, high pre, low pre. Checks all 192 channels. Returns number of list entries. Parameters: int **array2D - pointer to array[5][N] where data will be stored. N must be at least 192. Array IS NOT created by function, you must supply function with pointer to already existing array! int array Offset - offset of 2D array filling: array will be filled starting from array[i][arrayOffset], where i=0,...4. Necessary when array of more then one EMCal FEM channels is filled. int* channelN - array where list of hit towers will be stored. Must be at least 192 long. Tower number in the list is FEM_channel + channelNumberOffset. int channelOffset - offset used to calculate tower number. int threshold - used as additional threshold for zero suppression: only channels with Energy > threshold are added into the list

ovirtual int filliList6x192(int** array2D, int arrayOffset, int channelOffset, int threshold)
The same as filliList5x192, but fills float 2D array

ovirtual int filliList192x6(int* array1D, int channelOffset, int threshold)
The same as filliList5x192, but array channelN is added to array2D as 6-th element

ovirtual int fillArray192x5(int *array5)
The same as filliList5x192, but array1D is an array of the size [Nx6], and 6 values are: time, high post, low post, high pre, low pre, chennel

ovirtual int fillArray144x5(int *array5)
EMCal long data format only. Fills EMC array[192x5]: 192x{time, high post, low post, high pre, low pre} Missed channels will have zeros in all 5 values. Returns number of channels = 192 if no errors, or 0 if errors were encountered. Parameters: int *array5 - pointer to 1D array[144x5] where data will be stored. Array IS NOT created by function, you must supply function with pointer to already existing array!

ovirtual int fillCoarseEnergyList(int *Energy, int* channelN, int channelOffset, int threshold)
Any EMCal data format. Fills EMC array[144x5]: 144x{time, high post, low post, high pre, low pre} Checks only connected AMUADC channels, that is only 144 channels. Missed channels will have zeros in all 5 values. Returns number of channels = 144 if no errors, or 0 if errors were encountered. Parameters: int *array5 - pointer to 1D array[144x5] where data will be stored. Array IS NOT created by function, you must supply function with pointer to already existing array!

ovirtual int fillCoarseEnergyArray(int* Energy)
EMCal any data format. Fills the list of towers energy (in High Gain ADC counts). If necessary makes rough convertion of Low Gain ADC counts into that of High Gain by shifting LG<<4 (assumes that High/Low ratio is 16). Skips disconnected AMUADC channels, thus checking only 144 channels. Returns number of list entries. Parameters: int *Energy - pointer to array[N] where towers energy will be stored. N must be at least 144. Array IS NOT created by function, you must supply function with pointer to already existing array! int* channelN - array where list of hit towers will be stored. Must be at least 144 long Array IS NOT created by function, you must supply function with pointer to already existing array! Tower number in the list is FEM_channel + channelNumberOffset. int channelOffset - offset used to calculate tower number. int threshold - used as additional threshold for zero suppression: only channels with Energy > threshold are added into the list

ovirtual int fillQtileArray(int* qtileEnergy)
EMCal any data format. Fills array[144] with EMC energy values (in high gain ADC counts). Skips disconnected AMUADC channels, thus checking only 144 channels. Parameters: Returns number of channels = 144 if no errors, or 0 if errors were encountered. int *Energy - pointer to array[N] where towers energy will be stored. N must be at least 144. Array IS NOT created by function, you must supply function with pointer to already existing array!

ovirtual int fillQtileList(int* qtileE, int*qtileN, int qtileOffset, int threshold)
EMCal any data format. Fills array[36] of 2x2 tiles energy value Skips disconnected AMUADC channels, thus checking only 144 channels. If no errors returns 36 = number of qtiles, else returns 0. Parameters: int *qtileEnergy - pointer to array[N], N must be at least 36. Array IS NOT created by function, you must supply function with pointer to already existing array!

oint max_channels
EMCal any data format. Fills the list of 2x2 tiles energy (in High Gain ADC counts). Skips disconnected AMUADC channels, thus checking only 144 channels. Returns number of tiles with energy > threshold. Parameters: PACKET_ptr packet - pointer to EMC packet int *qtileE - pointer to array[N] where tiles energy will be stored. N must be at least 36. Array IS NOT created by function, you must supply function with pointer to already existing array! int* qtileN - array with list of hit tiles. Must be at least 36 long Tile number in the list is FEM_qtile + qtileNumberOffset. Array IS NOT created by function, you must supply function with pointer to already existing array! int qtileOffset - offset used to calculate qtile number. int threshold - used as additional threshold for zero suppression: only qtiles with Energy > threshold are added into the list


Direct child classes:
Packet_emc_dcms
Packet_emc_dcm32
Packet_emc_dcm0

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.