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

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

+ Inheritance diagram for oncsSubevent:
+ Collaboration diagram for oncsSubevent:

Public Member Functions

 oncsSubevent (subevtdata_ptr data)
 
virtual ~oncsSubevent ()
 
virtual int getLength () const
 
virtual int getIdentifier () const
 get the packet identifier
 
virtual int getHitFormat () const
 get the hit format; in case of unformatted get the encoding scheme.
 
virtual int getPadding () const
 get the number of padding units in the packet data.
 
virtual int getDataLength () const
 get what the name says...
 
virtual int getStructure () const
 get the structure of the packet data; unformatted, hitlist, etc.
 
virtual int getDebugLength () const
 get the length of the debug block
 
virtual int getErrorLength () const
 
virtual void identify (OSTREAM &=COUT) const
 
int iValue (const int)
 iValue returns the value of a given channel as an int.
 
int iValue (const int, const char *)
 
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)
 
virtual float rValue (const int)
 
virtual float rValue (const int, const char *)
 
virtual float rValue (const int, const int)
 
virtual int getArraylength (const char *)
 
virtual int fillIntArray (int[], const int, int *, const char *what="")
 
virtual int fillFloatArray (float[], const int, int *, const char *what="")
 fillFloatArray fills an array of floats
 
virtual int * getIntArray (int *, const char *what="")
 
virtual 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 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 char *what)
 
virtual long long lValue (const int channel, const int iy)
 
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 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
 

Protected Member Functions

virtual int * decode (int *)=0
 

Protected Attributes

subevtdata_ptr SubeventHdr
 
int data1_length
 
int data2_length
 
int data3_length
 
int data4_length
 
int * decoded_data1
 
int * decoded_data2
 
int * decoded_data3
 
int * decoded_data4
 
int is_data_type
 

Detailed Description

Definition at line 15 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 15 of file oncsSubevent.h

Constructor & Destructor Documentation

oncsSubevent::oncsSubevent ( subevtdata_ptr  data)

Definition at line 10 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 10 of file oncsSubevent.cc

References data1_length, data2_length, data3_length, data4_length, decoded_data1, decoded_data2, decoded_data3, decoded_data4, is_data_type, and SubeventHdr.

oncsSubevent::~oncsSubevent ( )
virtual

Definition at line 28 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 28 of file oncsSubevent.cc

References decoded_data1, decoded_data2, decoded_data3, decoded_data4, is_data_type, and SubeventHdr.

Member Function Documentation

int oncsSubevent::convert ( )
virtual

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

Implements Packet.

Definition at line 99 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 99 of file oncsSubevent.cc

References getLength(), is_data_type, k, and SubeventHdr.

+ Here is the call graph for this function:

virtual int* oncsSubevent::decode ( int *  )
protectedpure virtual
int oncsSubevent::fillFloatArray ( float  destination[],
const int  length,
int *  nw,
const char *  what = "" 
)
virtual

fillFloatArray fills an array of floats

Implements Packet.

Definition at line 298 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 298 of file oncsSubevent.cc

References data1_length, decode(), and decoded_data1.

Referenced by getFloatArray().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

Implements Packet.

Definition at line 246 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 246 of file oncsSubevent.cc

References subevt_data::data, data1_length, decode(), decoded_data1, getLength(), and SubeventHdr.

Referenced by getIntArray().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int oncsSubevent::getArraylength ( const char *  what)
virtual

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

Implements Packet.

Definition at line 230 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 230 of file oncsSubevent.cc

References data1_length, decode(), and decoded_data1.

+ Here is the call graph for this function:

int oncsSubevent::getDataLength ( ) const
virtual

get what the name says...

Implements Packet.

Definition at line 49 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 49 of file oncsSubevent.cc

References subevt_data::sub_length, and SubeventHdr.

Referenced by oncsSub_idmvtxv2::decode(), oncsSubevent_w1::gdump(), oncsSubevent_w2::gdump(), oncsSubevent_w4::gdump(), and oncsSub_idmvtxv1::mvtx_decode().

+ Here is the caller graph for this function:

virtual int oncsSubevent::getDebugLength ( ) const
inlinevirtual

get the length of the debug block

Implements Packet.

Definition at line 33 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 33 of file oncsSubevent.h

virtual int oncsSubevent::getErrorLength ( ) const
inlinevirtual

Implements Packet.

Definition at line 34 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 34 of file oncsSubevent.h

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

getFloatArray creates and returns an array of floats

Implements Packet.

Definition at line 353 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 353 of file oncsSubevent.cc

References data1_length, decode(), decoded_data1, and fillFloatArray().

+ Here is the call graph for this function:

int oncsSubevent::getHitFormat ( ) const
virtual

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

Implements Packet.

Definition at line 68 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 68 of file oncsSubevent.cc

References subevt_data::sub_decoding, and SubeventHdr.

Referenced by oncsSub_idcaenv792::decode(), and identify().

+ Here is the caller graph for this function:

int oncsSubevent::getIdentifier ( ) const
virtual

get the packet identifier

Implements Packet.

Definition at line 56 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 56 of file oncsSubevent.cc

References subevt_data::sub_id, and SubeventHdr.

Referenced by identify().

+ Here is the caller graph for this function:

int * oncsSubevent::getIntArray ( int *  nw,
const char *  = "" 
)
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.

Implements Packet.

Definition at line 328 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 328 of file oncsSubevent.cc

References data1_length, decode(), decoded_data1, and fillIntArray().

+ Here is the call graph for this function:

int oncsSubevent::getLength ( ) const
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.

Implements Packet.

Definition at line 42 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 42 of file oncsSubevent.cc

References subevt_data::sub_length, and SubeventHdr.

Referenced by convert(), oncsSub_id4evt::decode(), oncsSub_id2evt::decode(), oncsSub_idcstr::decode(), oncsSub_iduppetdata::decode(), oncsSub_iduppetdata_v104::decode(), oncsSub_idbspetdata::decode(), oncsSub_idrcpetdata::decode(), oncsSub_idtpcfeev1::decode(), oncsSub_idsrs_v01::decode(), oncsSub_idfnalmwpc::decode(), oncsSub_idfnalmwpcv2::decode(), oncsSub_iddreamv0::decode(), fillIntArray(), oncsSub_idmvtxv0::gdump(), oncsSub_idmvtxv1::gdump(), oncsSub_idmvtxv2::gdump(), oncsSubevent_w1::gdump(), oncsSubevent_w2::gdump(), oncsSubevent_w4::gdump(), identify(), oncsSub_idmvtxv0::mvtx_decode(), and oncsSub_idtpcfeev2::tpc_decode().

+ Here is the caller graph for this function:

int oncsSubevent::getPadding ( ) const
virtual
virtual int oncsSubevent::getStructure ( ) const
inlinevirtual

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

Implements Packet.

Definition at line 32 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 32 of file oncsSubevent.h

Referenced by identify().

+ Here is the caller graph for this function:

void oncsSubevent::identify ( OSTREAM out = COUT) const
virtual

Definition at line 81 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 81 of file oncsSubevent.cc

References getHitFormat(), getIdentifier(), getLength(), getStructure(), oncs_get_mnemonic(), and SETW.

Referenced by oncsSub_iddigitizerv1::dump(), oncsSub_iddrs4v1::dump(), oncsSub_idtpcfeev1::dump(), oncsSub_iduppetdata_v104::dump(), oncsSub_idsrs_v01::dump(), oncsSub_idtpcfeev2::dump(), oncsSub_iddreamv0::dump(), oncsSub_idmvtxv0::dump(), oncsSub_idfnalmwpc::dump(), oncsSub_idfnalmwpcv2::dump(), oncsSub_idmvtxv1::dump(), oncsSub_idmvtxv2::dump(), oncsSub_idmvtxv0::gdump(), oncsSub_idmvtxv1::gdump(), oncsSub_idmvtxv2::gdump(), oncsSubevent_w1::gdump(), oncsSubevent_w2::gdump(), and oncsSubevent_w4::gdump().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int oncsSubevent::is_pointer_type ( ) const
virtual

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

Implements Packet.

Definition at line 93 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 93 of file oncsSubevent.cc

References is_data_type.

int oncsSubevent::iValue ( const int  channel)
virtual

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

Implements Packet.

Definition at line 121 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 121 of file oncsSubevent.cc

References data1_length, decode(), and decoded_data1.

+ Here is the call graph for this function:

int oncsSubevent::iValue ( const int  channel,
const char *  what 
)
virtual

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

Implements Packet.

Definition at line 139 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 139 of file oncsSubevent.cc

References data1_length, decode(), and decoded_data1.

+ Here is the call graph for this function:

int oncsSubevent::iValue ( const int  channel,
const int  iy 
)
virtual

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

Implements Packet.

Definition at line 157 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 157 of file oncsSubevent.cc

References data1_length, decode(), and decoded_data1.

+ Here is the call graph for this function:

int oncsSubevent::iValue ( const int  channel,
const int  y,
const char *  what 
)
inlinevirtual

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

Implements Packet.

Definition at line 44 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 44 of file oncsSubevent.h

int oncsSubevent::iValue ( const int  channel,
const int  iy,
const int  iz 
)
inlinevirtual

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

Implements Packet.

Definition at line 45 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 45 of file oncsSubevent.h

int oncsSubevent::iValue ( const int  channel,
const int  iy,
const int  iz,
const char *  what 
)
inlinevirtual

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

Implements Packet.

Definition at line 47 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 47 of file oncsSubevent.h

float oncsSubevent::rValue ( const int  channel)
virtual

rValue returns the value of a given channel as a float

Implements Packet.

Definition at line 175 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 175 of file oncsSubevent.cc

References data1_length, decode(), and decoded_data1.

+ Here is the call graph for this function:

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

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

Implements Packet.

Reimplemented in oncsSub_iddrs4v1.

Definition at line 193 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 193 of file oncsSubevent.cc

References data1_length, decode(), and decoded_data1.

+ Here is the call graph for this function:

float oncsSubevent::rValue ( const int  channel,
const int  iy 
)
virtual

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

Implements Packet.

Reimplemented in oncsSub_iddrs4v1.

Definition at line 211 of file oncsSubevent.cc.

View newest version in sPHENIX GitHub at line 211 of file oncsSubevent.cc

References data1_length, decode(), and decoded_data1.

+ Here is the call graph for this function:

int oncsSubevent::setInternalParameter ( const int  p1 = 0,
const int  p2 = 0,
const char *  what = "" 
)
inlinevirtual

Implements Packet.

Definition at line 63 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 63 of file oncsSubevent.h

Member Data Documentation

int oncsSubevent::data2_length
protected
int oncsSubevent::data3_length
protected

Definition at line 73 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 73 of file oncsSubevent.h

Referenced by oncsSub_idbspetdata::decode(), oncsSub_idrcpetdata::decode(), oncsSub_iduppetdata_v104::decode(), oncsSub_iduppetdata::decode(), and oncsSubevent().

int oncsSubevent::data4_length
protected

Definition at line 74 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 74 of file oncsSubevent.h

Referenced by oncsSub_iduppetdata::decode(), oncsSub_iduppetdata_v104::decode(), and oncsSubevent().

int* oncsSubevent::decoded_data3
protected
int* oncsSubevent::decoded_data4
protected
int oncsSubevent::is_data_type
protected

Definition at line 80 of file oncsSubevent.h.

View newest version in sPHENIX GitHub at line 80 of file oncsSubevent.h

Referenced by convert(), is_pointer_type(), oncsSubevent(), and ~oncsSubevent().


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