Analysis Software
Documentation for sPHENIX simulation software
|
#include <online_distribution/blob/master/newbasic/packet_id4scaler.h>
Public Member Functions | |
Packet_id4scaler (PACKET_ptr) | |
int | iValue (const int channel, const char *what) |
long long | lValue (const int channel, const char *what) |
virtual void | dump (OSTREAM &) |
Public Member Functions inherited from Packet_w4 | |
Packet_w4 () | |
Packet_w4 (PACKET_ptr) | |
void | dump (OSTREAM &) |
void | gdump (const int how=EVT_HEXADECIMAL, OSTREAM &=COUT) const |
Public Member Functions inherited from Packet_A | |
Packet_A (PACKET_ptr packet_ptr) | |
Packet_A () | |
~Packet_A () | |
int | getLength () const |
int | getErrorLength () const |
int | getDebugLength () const |
get the length of the debug block | |
int | getIdentifier () const |
get the packet identifier | |
int | getPadding () const |
get the number of padding units in the packet data. | |
int | getStructure () const |
get the structure of the packet data; unformatted, hitlist, etc. | |
int | getHitFormat () const |
get the hit format; in case of unformatted get the encoding scheme. | |
int | getDataLength () const |
get what the name says... | |
void | identify (OSTREAM &=COUT) const |
void | fullIdentify (OSTREAM &=COUT) const |
void | dumpErrorBlock (OSTREAM &=COUT) |
void | dumpDebugBlock (OSTREAM &=COUT) |
int | setIdentifier (const int newid) |
set a new packet identifier | |
int | iValue (const int) |
iValue returns the value of a given channel as an int. | |
int | iValue (const int, const int) |
int | iValue (const int, const int, const char *) |
int | iValue (const int channel, const int iy, const int iz) |
int | iValue (const int channel, const int iy, const int iz, const char *what) |
float | rValue (const int) |
float | rValue (const int, const char *) |
float | rValue (const int, const int) |
int | getArraylength (const char *) |
int | fillIntArray (int[], const int, int *, const char *what="") |
int | fillFloatArray (float[], const int, int *, const char *what="") |
fillFloatArray fills an array of floats | |
int * | getIntArray (int *, const char *what="") |
float * | getFloatArray (int *, const char *what="") |
getFloatArray creates and returns an array of floats | |
virtual int | is_pointer_type () const |
find out what type (pointer- or data based) packet object we have | |
virtual int | convert () |
convert from pointer- to data based object, if it is already data-based, do nothing. | |
int | getCheckSumStatus () const |
int | copyMe (int dest[], const int maxlength) const |
int | setInternalParameter (const int p1=0, const int p2=0, const char *what="") |
Public Member Functions inherited from Packet | |
virtual | ~Packet () |
the virtual destructor | |
virtual double | dValue (const int channel) |
virtual double | dValue (const int channel, const char *what) |
virtual double | dValue (const int channel, const int iy) |
virtual long long | lValue (const int channel) |
virtual long long | lValue (const int channel, const int iy) |
virtual long long | lValue (const int channel, const int iy, const char *what) |
virtual void * | pValue (const int) |
virtual void * | pValue (const int, const char *) |
virtual void * | pValue (const int, const int) |
virtual void | identify (std::ostream &os=std::cout) const =0 |
see below for comments | |
virtual void | fullIdentify (std::ostream &os=std::cout) const |
write an indepth identification message to the supplied OSTREAM. | |
virtual void | dump (std::ostream &os=std::cout)=0 |
virtual void | gdump (const int how=EVT_HEXADECIMAL, std::ostream &os=std::cout) const =0 |
Protected Member Functions | |
virtual int * | decode (int *) |
Protected Member Functions inherited from Packet_w4 | |
int * | decode (int *) |
Protected Member Functions inherited from Packet_A | |
int | standardIntArray (int[], const int, int *, const char *what="") |
Additional Inherited Members | |
Static Protected Member Functions inherited from Packet_A | |
static void | fix_endianess (long long *x) |
static void | fix_endianess (double *x) |
static void | fix_endianess (char *str, const int length) |
Protected Attributes inherited from Packet_A | |
PACKET_ptr | packet |
int | is_data_type |
int | data1_length |
int | data2_length |
int | data3_length |
int | data4_length |
int | data5_length |
int | data6_length |
int | data7_length |
int | data8_length |
int | data9_length |
int | data10_length |
int * | decoded_data1 |
int * | decoded_data2 |
int * | decoded_data3 |
int * | decoded_data4 |
int * | decoded_data5 |
int * | decoded_data6 |
int * | decoded_data7 |
int * | decoded_data8 |
int * | decoded_data9 |
int * | decoded_data10 |
This is the packet which deals with data in ID4SCALER format. It inherits from Packet_w4 because the data are 32bit entities.
Since there is a variety of data contained in that packet, the main interaction with this packet is through the iValue (channel,"STRING") interface.
The packet contains a num,ber of trigger masks which were valid for this partition.
iValue(0,"NUMBERMASKS") returns the number of masks iValue(i,"TRIGGERMASK") returns the triggermask i, where 0 <= i < iValue(0,"NUMBERMASKS")
Similarly,
iValue(0,"NUMBERSCALERS") returns the number of scalers valid for this partition.
Then you have 3 sets of scalers.
iValue(i,"RAWSCALERS") iValue(i,"LIFESCALERS") iValue(i,"SCALEDSCALERS")
where 0 <= i < iValue(0,"NUMBERSCALERS")
which return the respective scaler values.
Finally, a more complicated one is the iValue(i,"TIMESTRING") interface. Similar to the IDCSTR packet. It returns a character string losely modeled after the standard UNIX getc(FILE* fp) interface.
When the string is ended, it returns EOF, so if you are familiar with the construct
int c; while ( ( c = getc(fp) ) !=EOF ) *str++ = c;
you'll see the similarity with
int i = 0; while ( ( c = p->iValue(i++,"TIMESTRING") ) != EOF ) *str++ = c;
(p is the pointer to this packet)
In the end, you will have a regular 0-terminated C character string.
Definition at line 57 of file packet_id4scaler.h.
View newest version in sPHENIX GitHub at line 57 of file packet_id4scaler.h
Packet_id4scaler::Packet_id4scaler | ( | PACKET_ptr | data | ) |
Definition at line 3 of file packet_id4scaler.cc.
View newest version in sPHENIX GitHub at line 3 of file packet_id4scaler.cc
|
protectedvirtual |
Implements Packet_A.
Definition at line 6 of file packet_id4scaler.cc.
View newest version in sPHENIX GitHub at line 6 of file packet_id4scaler.cc
References dlength, findPacketDataStart(), Packet_A::getDataLength(), i, k, merge_hashes::p, and Packet_A::packet.
|
virtual |
Definition at line 125 of file packet_id4scaler.cc.
View newest version in sPHENIX GitHub at line 125 of file packet_id4scaler.cc
References Acts::PhysicalConstants::c, findPacketDataStart(), i, Packet_A::identify(), iValue(), k, lValue(), Packet_A::packet, and SETW.
|
virtual |
with the "what" parameter you can decide which aspect of the data you want to see (for devices which have more than one)
Reimplemented from Packet_A.
Definition at line 33 of file packet_id4scaler.cc.
View newest version in sPHENIX GitHub at line 33 of file packet_id4scaler.cc
References Acts::PhysicalConstants::c, channel(), findPacketDataStart(), k, and Packet_A::packet.
Referenced by dump().
|
virtual |
Reimplemented from Packet.
Definition at line 95 of file packet_id4scaler.cc.
View newest version in sPHENIX GitHub at line 95 of file packet_id4scaler.cc
References findPacketDataStart(), k, and Packet_A::packet.
Referenced by dump().