EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Packet Class Referenceabstract

#include <online_distribution/blob/master/newbasic/packet.h>

+ Inheritance diagram for Packet:

Public Member Functions

virtual ~Packet ()
 the virtual destructor
 
virtual int iValue (const int channel)=0
 iValue returns the value of a given channel as an int.
 
virtual int iValue (const int channel, const char *what)=0
 
virtual int iValue (const int channel, const int y, const char *what)=0
 
virtual int iValue (const int channel, const int iy)=0
 
virtual int iValue (const int channel, const int iy, const int iz)=0
 
virtual int iValue (const int channel, const int iy, const int iz, const char *what)=0
 
virtual float rValue (const int channel)=0
 
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 char *what)
 
virtual long long lValue (const int channel, const int iy)
 
virtual float rValue (const int channel, const char *what)=0
 
virtual float rValue (const int channel, const int iy)=0
 
virtual void * pValue (const int chan)
 
virtual void * pValue (const int chan, const char *what)
 
virtual void * pValue (const int chan, const int iy)
 
virtual int getArraylength (const char *what="")=0
 
virtual int fillIntArray (int destination[], const int length, int *nw, const char *what="")=0
 
virtual int fillFloatArray (float destination[], const int length, int *nw, const char *what="")=0
 fillFloatArray fills an array of floats
 
virtual int * getIntArray (int *nw, const char *="")=0
 
virtual float * getFloatArray (int *nw, const char *="")=0
 getFloatArray creates and returns an array of floats
 
virtual int is_pointer_type () const =0
 find out what type (pointer- or data based) packet object we have
 
virtual int convert ()=0
 convert from pointer- to data based object, if it is already data-based, do nothing.
 
virtual int getLength () const =0
 
virtual int getErrorLength () const =0
 
virtual int getDebugLength () const =0
 get the length of the debug block
 
virtual int getIdentifier () const =0
 get the packet identifier
 
virtual int getPadding () const =0
 get the number of padding units in the packet data.
 
virtual int getStructure () const =0
 get the structure of the packet data; unformatted, hitlist, etc.
 
virtual int getHitFormat () const =0
 get the hit format; in case of unformatted get the encoding scheme.
 
virtual int getDataLength () const =0
 get what the name says...
 
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
 
virtual int getCheckSumStatus () const
 
virtual int copyMe (int[], const int maxlength) const
 
virtual int setInternalParameter (const int p1=0, const int p2=0, const char *what="")=0
 

Detailed Description

This is the abstract packet class.

Definition at line 20 of file packet.h.

View newest version in sPHENIX GitHub at line 20 of file packet.h

Constructor & Destructor Documentation

virtual Packet::~Packet ( )
inlinevirtual

the virtual destructor

Definition at line 52 of file packet.h.

View newest version in sPHENIX GitHub at line 52 of file packet.h

Member Function Documentation

virtual int Packet::convert ( )
pure virtual

convert from pointer- to data based object, if it is already data-based, do nothing.

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::copyMe ( int  [],
const int  maxlength 
) const
inlinevirtual

Reimplemented in Packet_A.

Definition at line 269 of file packet.h.

View newest version in sPHENIX GitHub at line 269 of file packet.h

Referenced by ospEvent::addPacket(), and oEvent::addPacket().

+ Here is the caller graph for this function:

virtual void Packet::dump ( std::ostream &  os = std::cout)
pure virtual

dump (either to standard output or the specified OSTREAM) the packet's data in some packet-specific way.

Referenced by main(), and TPCFEETestRecov1::process_event().

+ Here is the caller graph for this function:

virtual double Packet::dValue ( const int  channel)
inlinevirtual

dValue returns the value of a given channel as a double

Reimplemented in oncsSub_idbspetdata, oncsSub_idrcpetdata, oncsSub_iduppetdata, and oncsSub_iduppetdata_v104.

Definition at line 90 of file packet.h.

View newest version in sPHENIX GitHub at line 90 of file packet.h

virtual double Packet::dValue ( const int  channel,
const char *  what 
)
inlinevirtual

Reimplemented in Packet_cdevpolarimeter, Packet_cdevdvm, Packet_cdevmadch, Packet_cdevbuckets, Packet_cdevir, Packet_cdevring, Packet_cdevringnopol, and Packet_idcdevdescr.

Definition at line 93 of file packet.h.

View newest version in sPHENIX GitHub at line 93 of file packet.h

virtual double Packet::dValue ( const int  channel,
const int  iy 
)
inlinevirtual

Definition at line 96 of file packet.h.

View newest version in sPHENIX GitHub at line 96 of file packet.h

virtual int Packet::fillFloatArray ( float  destination[],
const int  length,
int *  nw,
const char *  what = "" 
)
pure virtual

fillFloatArray fills an array of floats

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::fillIntArray ( int  destination[],
const int  length,
int *  nw,
const char *  what = "" 
)
pure virtual

fillIntArray and fillFloatArray fill existing (user-supplied) arrays with the decoded data

Implemented in Packet_A, oncsSubevent, and Packet_gl1p.

virtual void Packet::fullIdentify ( std::ostream &  os = std::cout) const
inlinevirtual

write an indepth identification message to the supplied OSTREAM.

Definition at line 242 of file packet.h.

View newest version in sPHENIX GitHub at line 242 of file packet.h

Referenced by main().

+ Here is the caller graph for this function:

virtual void Packet::gdump ( const int  how = EVT_HEXADECIMAL,
std::ostream &  os = std::cout 
) const
pure virtual

Since dump() requires the packet data to be consistent, gdump ("generic" dump) dumps the data without making assumptions about the integrity of the packet data. For many Packet classes dump just calls gdump because it is good enough. The "how" parameter for gdump specifies decimal, octal, or hexadecimal (0,1,2) dump.

Referenced by main().

+ Here is the caller graph for this function:

virtual int Packet::getArraylength ( const char *  what = "")
pure virtual

getArraylength returns the length of the array needed to store the decoded values.

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::getCheckSumStatus ( ) const
inlinevirtual

This functiion returns the status of the DCM transfer checksum. 0 = cannot be calculated for this packet 1 = ok -1 = fail

Reimplemented in Packet_A.

Definition at line 268 of file packet.h.

View newest version in sPHENIX GitHub at line 268 of file packet.h

virtual int Packet::getDataLength ( ) const
pure virtual

get what the name says...

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::getDebugLength ( ) const
pure virtual

get the length of the debug block

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::getErrorLength ( ) const
pure virtual

Implemented in Packet_A, and oncsSubevent.

virtual float* Packet::getFloatArray ( int *  nw,
const char *  = "" 
)
pure virtual

getFloatArray creates and returns an array of floats

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::getHitFormat ( ) const
pure virtual

get the hit format; in case of unformatted get the encoding scheme.

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::getIdentifier ( ) const
pure virtual

get the packet identifier

Implemented in Packet_A, and oncsSubevent.

Referenced by Fun4AllEventOutStream::WriteEvent().

+ Here is the caller graph for this function:

virtual int* Packet::getIntArray ( int *  nw,
const char *  = "" 
)
pure virtual

getIntArray and getFloatArray create a new array of the approriate size fill it with the decoded values, and return a pointer to the array. nw is the length of the array created.

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::getLength ( ) const
pure virtual

getLength() returns the length of the raw packet data. If you were to copy the data somewhere, the destination must be able to hold as many words.

Implemented in Packet_A, and oncsSubevent.

Referenced by ospEvent::addPacket(), oEvent::addPacket(), TPCFEETestRecov1::get_motor_loc(), and Fun4AllEventOutStream::WriteEvent().

+ Here is the caller graph for this function:

virtual int Packet::getPadding ( ) const
pure virtual

get the number of padding units in the packet data.

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::getStructure ( ) const
pure virtual

get the structure of the packet data; unformatted, hitlist, etc.

Implemented in Packet_A, and oncsSubevent.

virtual void Packet::identify ( std::ostream &  os = std::cout) const
pure virtual

see below for comments

write an identification message to the supplied OSTREAM.

Referenced by main(), and TPCFEETestRecov1::process_event().

+ Here is the caller graph for this function:

virtual int Packet::is_pointer_type ( ) const
pure virtual

find out what type (pointer- or data based) packet object we have

Implemented in Packet_A, and oncsSubevent.

virtual int Packet::iValue ( const int  channel)
pure virtual

iValue returns the value of a given channel as an int.

Implemented in Packet_A, oncsSubevent, oncsSub_idmvtxv2, Packet_starscaler, oncsSub_idmvtxv1, Packet_idcstr, oncsSub_iduppetparams, Packet_gl1psum, oncsSub_idcaenv1742, oncsSub_idcaenv792, and oncsSub_idcstr.

Referenced by TPCFEETestRecov1::get_motor_loc(), caen_correction::init(), and TPCFEETestRecov1::process_event().

+ Here is the caller graph for this function:

virtual int Packet::iValue ( const int  channel,
const int  y,
const char *  what 
)
pure virtual

we have a few recent devices which have one more dimension (such as card, time sample, channel)

Implemented in Packet_A, oncsSubevent, oncsSub_idmvtxv2, oncsSub_idfnalmwpcv2, oncsSub_idmvtxv1, oncsSub_iddreamv0, oncsSub_idfnalmwpc, oncsSub_idtpcfeev2, and oncsSub_idsrs_v01.

virtual int Packet::iValue ( const int  channel,
const int  iy 
)
pure virtual
virtual int Packet::iValue ( const int  channel,
const int  iy,
const int  iz 
)
pure virtual

this supports devices organized as three-dimensional data (card vs channel vs time slice )

Implemented in Packet_A, oncsSubevent, oncsSub_idmvtxv2, oncsSub_idfnalmwpcv2, oncsSub_idmvtxv0, oncsSub_idfnalmwpc, oncsSub_idmvtxv1, oncsSub_iddreamv0, oncsSub_idsrs_v01, oncsSub_idtpcfeev2, and oncsSub_idtpcfeev1.

virtual int Packet::iValue ( const int  channel,
const int  iy,
const int  iz,
const char *  what 
)
pure virtual

this supports devices organized as three-dimensional data (card vs channel vs time slice, with a "what" selection )

Implemented in Packet_A, oncsSubevent, oncsSub_idfnalmwpcv2, oncsSub_idfnalmwpc, and oncsSub_idtpcfeev2.

virtual long long Packet::lValue ( const int  channel)
inlinevirtual

lValue returns the value of a given channel as a long long

Reimplemented in Packet_starscaler, oncsSub_idbspetdata, oncsSub_idrcpetdata, oncsSub_iduppetdata, and oncsSub_iduppetdata_v104.

Definition at line 100 of file packet.h.

View newest version in sPHENIX GitHub at line 100 of file packet.h

virtual long long Packet::lValue ( const int  channel,
const char *  what 
)
inlinevirtual

Reimplemented in Packet_id4scaler.

Definition at line 103 of file packet.h.

View newest version in sPHENIX GitHub at line 103 of file packet.h

virtual long long Packet::lValue ( const int  channel,
const int  iy 
)
inlinevirtual

Definition at line 106 of file packet.h.

View newest version in sPHENIX GitHub at line 106 of file packet.h

virtual void* Packet::pValue ( const int  chan)
inlinevirtual

Definition at line 121 of file packet.h.

View newest version in sPHENIX GitHub at line 121 of file packet.h

virtual void* Packet::pValue ( const int  chan,
const char *  what 
)
inlinevirtual

Definition at line 126 of file packet.h.

View newest version in sPHENIX GitHub at line 126 of file packet.h

virtual void* Packet::pValue ( const int  chan,
const int  iy 
)
inlinevirtual

Definition at line 131 of file packet.h.

View newest version in sPHENIX GitHub at line 131 of file packet.h

virtual float Packet::rValue ( const int  channel)
pure virtual

rValue returns the value of a given channel as a float

Implemented in Packet_A, and oncsSubevent.

virtual float Packet::rValue ( const int  channel,
const char *  what 
)
pure virtual

with the "what" parameter you can decide which aspect of the data you want to see (for devices which have more than one)

Implemented in Packet_cdevpolarimeter, Packet_A, oncsSubevent, Packet_cdevdvm, Packet_cdevbpm, Packet_cdevwcm, and oncsSub_iddrs4v1.

virtual float Packet::rValue ( const int  channel,
const int  iy 
)
pure virtual

this supports devices which are inherently organized as two-dimensional data, such as flash ADC's (channel vs time slice)

Implemented in Packet_A, oncsSubevent, Packet_cdevwcm, and oncsSub_iddrs4v1.

virtual int Packet::setInternalParameter ( const int  p1 = 0,
const int  p2 = 0,
const char *  what = "" 
)
pure virtual

The documentation for this class was generated from the following file: