Analysis Software
Documentation for sPHENIX simulation 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)=0
 iValue returns the value of a given channel as an int.
 
virtual int iValue (const int, const char *)=0
 
virtual int iValue (const int, const int, const char *)=0
 
virtual int iValue (const int, const int)=0
 
virtual int iValue (const int, const int, const int)=0
 
virtual int iValue (const int, const int, const int, const char *)=0
 
virtual float rValue (const int)=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 long long lValue (const int channel, const int iy, const char *what)
 
virtual float rValue (const int, const char *)=0
 
virtual float rValue (const int, const int)=0
 
virtual void * pValue (const int)
 
virtual void * pValue (const int, const char *)
 
virtual void * pValue (const int, const int)
 
virtual int getArraylength (const char *what="")=0
 
virtual int fillIntArray (int destination[], const int, int *, const char *what="")=0
 
virtual int fillFloatArray (float destination[], const int, int *, const char *what="")=0
 fillFloatArray fills an array of floats
 
virtual int * getIntArray (int *, const char *="")=0
 
virtual float * getFloatArray (int *, 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 int setIdentifier (const int)=0
 set a new packet identifier
 
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) 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.

Referenced by SingleZdcInput::FillPool(), and SinglePrdfInput::FillPool().

+ Here is the caller graph for this function:

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

Reimplemented in Packet_A, and oncsSubevent.

Definition at line 272 of file packet.h.

View newest version in sPHENIX GitHub at line 272 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(), TempInfoUnpackPRDF::process_event(), MvtxRunInfoUnpackPRDF::process_event(), 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, and Packet_cdevringnopol.

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  ,
int *  ,
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  ,
int *  ,
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.

Referenced by tpc_pool::addPacket().

+ Here is the caller graph for this function:

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

write an indepth identification message to the supplied OSTREAM.

Definition at line 245 of file packet.h.

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

References identify, and os.

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 271 of file packet.h.

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

virtual int Packet::getDataLength ( ) const
pure virtual

get what the name says...

Implemented in Packet_A, and oncsSubevent.

Referenced by tpc_pool::addPacket().

+ Here is the caller graph for this function:

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 *  ,
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.

Referenced by TpcMon::process_event().

+ Here is the caller graph for this function:

virtual int Packet::getIdentifier ( ) const
pure virtual
virtual int* Packet::getIntArray ( int *  ,
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(), PktSizeMon::process_event(), SepdMon::process_event(), HcalMon::process_event(), 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 tpc_pool::addPacket(), SingleGl1PoolInput::FillPool(), SingleInttPoolInput::FillPool(), SingleMvtxPoolInput::FillPool(), main(), TempInfoUnpackPRDF::process_event(), MvtxMon::process_event(), 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  )
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, oncsSub_idcstr, and oncsSub_idgl1v0.

Referenced by intt_pool::addPacket(), TempInfoUnpackPRDF::addPacketInfo(), HcalMon::anaWaveform(), ZdcMon::anaWaveformFast(), SepdMon::anaWaveformFast(), CemcMon::anaWaveformFast(), SepdMon::anaWaveformTemp(), CemcMon::anaWaveformTemp(), EventNumberCheck::CheckFem(), SingleZdcInput::FillPool(), SingleMvtxPoolInput::FillPool(), SinglePrdfInput::FillPool(), TPCFEETestRecov1::get_motor_loc(), HcalMon::getSignal(), SepdMon::getSignal(), CemcMon::getSignal(), caen_correction::init(), ll1setup(), MvtxPrototype2UnpackPRDF::MakeHits(), MvtxUnpackPRDF::MakeHits(), process_event(), LL1Mon::process_event(), RunInfoUnpackPRDF::process_event(), EventInfoSummary::process_event(), SepdMon::process_event(), GenericUnpackPRDF::process_event(), ZdcMon::process_event(), CaloUnpackPRDF::process_event(), CemcMon::process_event(), HcalMon::process_event(), TemplateCreation::process_event(), TpcMon::process_event(), InttRawDataDecoder::process_event(), CaloTowerBuilder::process_event(), InttRawDataConverter::process_event(), LEDTowerBuilder::process_event(), MvtxMon::process_event(), InttMon::process_event(), tpc_hits::process_event(), TPCFEETestRecov1::process_event(), TpcRawDataDecoder::process_event(), OnlBbcEvent::setRawData(), and MbdEvent::SetRawData().

+ Here is the caller graph for this function:

virtual int Packet::iValue ( const int  ,
const int  ,
const char *   
)
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_idmvtxv3, oncsSub_idinttv0, oncsSub_idfnalmwpcv2, oncsSub_idmvtxv1, oncsSub_iddreamv0, oncsSub_idfnalmwpc, oncsSub_idtpcfeev2, and oncsSub_idsrs_v01.

virtual int Packet::iValue ( const int  ,
const int   
)
pure virtual
virtual int Packet::iValue ( const int  ,
const int  ,
const int   
)
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  ,
const int  ,
const int  ,
const char *   
)
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_idmvtxv3, 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

Referenced by SingleGl1PoolInput::FillPool(), SingleMvtxPoolInput::FillPool(), HcalMon::process_event(), InttRawDataDecoder::process_event(), InttRawDataConverter::process_event(), MvtxMon::process_event(), and TpcRawDataDecoder::process_event().

+ Here is the caller graph for this function:

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

Reimplemented in Packet_id4scaler, oncsSub_idinttv0, oncsSub_idtpcfeev3, and oncsSub_idgl1v0.

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

Reimplemented in oncsSub_idinttv0, and oncsSub_idgl1v0.

Definition at line 106 of file packet.h.

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

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

Reimplemented in oncsSub_idmvtxv3.

Definition at line 109 of file packet.h.

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

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

Definition at line 123 of file packet.h.

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

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

Definition at line 128 of file packet.h.

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

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

Definition at line 133 of file packet.h.

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

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

rValue returns the value of a given channel as a float

Implemented in Packet_A, and oncsSubevent.

Referenced by process_event().

+ Here is the caller graph for this function:

virtual float Packet::rValue ( const int  ,
const char *   
)
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  ,
const int   
)
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::setIdentifier ( const int  )
pure virtual

set a new packet identifier

Implemented in Packet_A, and oncsSubevent.

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: