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

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

+ Inheritance diagram for A_Event:
+ Collaboration diagram for A_Event:

Public Member Functions

 A_Event (PHDWORD *)
 
 A_Event (int *)
 
virtual ~A_Event ()
 
virtual unsigned int getEvtLength ()
 
virtual int getEvtType ()
 
virtual int getEvtSequence ()
 
virtual int getRunNumber ()
 
virtual void identify (std::ostream &os=std::cout) const
 
virtual void listFrame (const int id=0, OSTREAM &os=COUT) const
 
virtual void listHistory (const int id=0, OSTREAM &os=COUT) const
 
virtual void listError (const int id=0, OSTREAM &os=COUT) const
 
unsigned int getFrameEntry (const char *what, const int id=0, const int index=0) const
 
virtual PacketgetPacket (const int)
 
virtual PacketgetPacket (const int, const int hitFormat)
 
virtual int getPacketList (Packet *[], const int)
 
virtual int existPacket (const int)
 
virtual int Copy (int *, const unsigned int, int *, const char *what="")
 
int getErrorCode ()
 
unsigned int getTagWord (const int i=0) const
 
virtual int is_pointer_type () const
 
virtual int convert ()
 
virtual int getDate ()
 
virtual time_t getTime () const
 
- Public Member Functions inherited from Event
virtual ~Event ()
 
virtual void listFrame (const int id=0, std::ostream &os=std::cout) const
 
virtual void listHistory (const int id=0, std::ostream &os=std::cout) const
 
virtual void listError (const int id=0, std::ostream &os=std::cout) const
 

Static Public Member Functions

static void dumpFrame (PHDWORD *fp, OSTREAM &os=COUT)
 
static void dumpErrorBlock (PHDWORD *fp, OSTREAM &os=COUT)
 
static void dumpBlock (PHDWORD *p, UINT len, OSTREAM &os=COUT, const int how=EVT_HEXADECIMAL)
 
static PacketmakePacket (PHDWORD *pp, const int hitformat=0)
 

Protected Member Functions

virtual int updateFramelist ()
 
virtual unsigned int getFrameValue (const char *what, PHDWORD *fp, const unsigned int index=0) const
 
virtual int createMap ()
 

Protected Attributes

int is_data_type
 
evtdata_ptr EventData
 
PHDWORD ** framelist
 
int NumberFrames
 
int hasMap
 
int errorcode
 
std::map< int, PHDWORD * > pmap
 

Detailed Description

Definition at line 14 of file A_Event.h.

View newest version in sPHENIX GitHub at line 14 of file A_Event.h

Constructor & Destructor Documentation

A_Event::A_Event ( PHDWORD data)

Definition at line 17 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 17 of file A_Event.cc

References CORRUPTEVENTMASK, errorcode, EventData, framelist, getEvtType(), hasMap, is_data_type, and updateFramelist().

+ Here is the call graph for this function:

A_Event::A_Event ( int *  data)

Definition at line 40 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 40 of file A_Event.cc

References CORRUPTEVENTMASK, errorcode, EventData, framelist, getEvtType(), hasMap, is_data_type, and updateFramelist().

+ Here is the call graph for this function:

A_Event::~A_Event ( )
virtual

Definition at line 63 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 63 of file A_Event.cc

References EventData, framelist, is_data_type, and pmap.

Member Function Documentation

int A_Event::convert ( )
virtual

converting the Event object means that the actual data it manages are copied to an internal location and are thus safe from being overwritten. For efficiency, most Event objects initially maintain a pointer to the external raw data only. They are referred to as being pointer-based. If an Event object has already been converted, a second convert operation has no effect.

Implements Event.

Definition at line 797 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 797 of file A_Event.cc

References EventData, framelist, getEvtLength(), hasMap, is_data_type, k, pmap, and updateFramelist().

+ Here is the call graph for this function:

int A_Event::Copy ( int *  destination,
const unsigned  length,
int *  nw,
const char *  what = "" 
)
virtual

the event's raw data are copied to destination. length is the size of destination, and nw is the number of words actually copied.

if what = "RAW" then we just copy the payload data without the event header.

Implements Event.

Definition at line 770 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 770 of file A_Event.cc

References evt_data::data, EventData, EVTHEADERLENGTH, and getEvtLength().

+ Here is the call graph for this function:

int A_Event::createMap ( )
protectedvirtual

Definition at line 395 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 395 of file A_Event.cc

References errorcode, EventData, findFramePacketIndex(), findNextFramePacket(), framelist, getEvtLength(), getEvtSequence(), getPacketId(), hasMap, pmap, and ptrFailure.

Referenced by existPacket(), getErrorCode(), getPacket(), and getPacketList().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void A_Event::dumpBlock ( PHDWORD p,
UINT  len,
OSTREAM os = COUT,
const int  how = EVT_HEXADECIMAL 
)
static

Definition at line 281 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 281 of file A_Event.cc

References EVT_DECIMAL, EVT_HEXADECIMAL, and SETW.

Referenced by listError(), and listHistory().

+ Here is the caller graph for this function:

void A_Event::dumpErrorBlock ( PHDWORD fp,
OSTREAM os = COUT 
)
static

Definition at line 255 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 255 of file A_Event.cc

References errorEntryV1::addData, calcNumErrorsV1(), errorEntryV1::detectCode, errorEntryV1::deviceId, errorEntryV1::deviceType, Acts::UnitConstants::e, errorEntryV1::errorCode, findFrameErrorStart(), getFrameErrorLength(), p, and errorEntryV1::severity.

Referenced by listError().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void A_Event::dumpFrame ( PHDWORD fp,
OSTREAM os = COUT 
)
static

Definition at line 222 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 222 of file A_Event.cc

References findFrameAlignBlock(), getFrameAlignLength(), getFrameDataType(), getFrameErrorLength(), getFrameHdrLength(), getFrameHdrVersion(), getFrameHistoryLength(), getFrameLength(), getFrameMark(), getFramePadding(), getFrameSourceId(), getFrameStatus(), getFrameType(), p, and SETW.

Referenced by listFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int A_Event::existPacket ( const int  packetid)
virtual

existPacket returns 1 if such a packet exists in the event. 0 else.

Implements Event.

Definition at line 743 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 743 of file A_Event.cc

References createMap(), hasMap, and pmap.

+ Here is the call graph for this function:

virtual int A_Event::getDate ( )
inlinevirtual

Implements Event.

Definition at line 72 of file A_Event.h.

View newest version in sPHENIX GitHub at line 72 of file A_Event.h

int A_Event::getErrorCode ( )
virtual

getErrorCode() returns a non-zero error code if something in the event structure is wrong. Test for 0 to see that the event passes some consistency checks.

Reimplemented from Event.

Definition at line 910 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 910 of file A_Event.cc

References createMap(), and errorcode.

+ Here is the call graph for this function:

unsigned int A_Event::getEvtLength ( )
virtual

getEvtLength() returns the length of the event raw data in longwords (32bit). If you want to copy the event somewhere, you can find out whether or not you have enough space left.

Implements Event.

Definition at line 74 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 74 of file A_Event.cc

References EventData, and evt_data::evt_length.

Referenced by convert(), Copy(), createMap(), and getPacketList().

+ Here is the caller graph for this function:

int A_Event::getEvtSequence ( )
virtual

getEvtSequence() returns the number of the event in a particular run. This number is a property of the event. Its run number and the sequence number uniquely indentify an event. It has nothing to do with the position of the event in any given data file.

Implements Event.

Definition at line 86 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 86 of file A_Event.cc

References EventData, and evt_data::evt_sequence.

Referenced by createMap().

+ Here is the caller graph for this function:

int A_Event::getEvtType ( )
virtual

getEvtType() returns the type of the event. Most of the events have the type DATAEVENT, but there are also BEGRUNEVENT, SPILLONEVENT, SPILLOFFEVENT, ENDRUNEVENT, and so on.

Implements Event.

Definition at line 80 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 80 of file A_Event.cc

References EventData, and evt_data::evt_type.

Referenced by A_Event().

+ Here is the caller graph for this function:

unsigned int A_Event::getFrameEntry ( const char *  what,
const int  id = 0,
const int  index = 0 
) const
virtual

getFrameEntry will return a particular entry from the frame header which contains the packet with the specidied id. If id == 0, the first frame will be selected.

keywords to return are:

FRAMELENGTH FRAMEMARK FRAMEHDRVERSION FRAMEHDRLENGTH FRAMESTATUS FRAMESOURCEID FRAMEDATATYPE FRAMETYPE FRAMEALIGNLENGTH FRAMEALIGNMENTWORD[index]

The last FRAMEALIGNMENTWORD is an array, you need to call getFrameEntry(id,"FRAMEALIGNMENTWORD",1) to get the index 1, and so on. Asking for a word beyond the number of such words will return 0.

Reimplemented from Event.

Definition at line 329 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 329 of file A_Event.cc

References findFramePacketId(), framelist, getFrameValue(), and ptrFailure.

+ Here is the call graph for this function:

unsigned int A_Event::getFrameValue ( const char *  what,
PHDWORD fp,
const unsigned int  index = 0 
) const
protectedvirtual

Definition at line 363 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 363 of file A_Event.cc

References findFrameAlignBlock(), getFrameAlignLength(), getFrameDataType(), getFrameHdrLength(), getFrameHdrVersion(), getFrameLength(), getFrameMark(), getFrameSourceId(), getFrameStatus(), getFrameType(), and p.

Referenced by getFrameEntry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Packet * A_Event::getPacket ( const int  )
virtual

getPacket creates and returns a pointer to the packet object with the specified packet id (think of it as a house number).

Implements Event.

Definition at line 388 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 388 of file A_Event.cc

Packet * A_Event::getPacket ( const int  ,
const int  hitFormat 
)
virtual

This interface allows to override the hitformat of the packet. For debugging purposes mostly.

Implements Event.

Definition at line 460 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 460 of file A_Event.cc

References createMap(), errorcode, hasMap, makePacket(), and pmap.

+ Here is the call graph for this function:

int A_Event::getPacketList ( Packet [],
const int  length 
)
virtual

getPacketList returns a simple-minded array of pointers to the packets in the given event. It returns the number of packets returned in the array. The second parameter tells the packet how long the array is.

Implements Event.

Definition at line 502 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 502 of file A_Event.cc

References createMap(), errorcode, findFramePacketIndex(), findNextFramePacket(), framelist, getEvtLength(), getPacketStructure(), hasMap, makePacket(), ptrFailure, and Unstructured.

+ Here is the call graph for this function:

int A_Event::getRunNumber ( )
virtual

getRunNumber() returns the number of the run to which this event belongs.

Implements Event.

Definition at line 92 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 92 of file A_Event.cc

References EventData, and evt_data::run_number.

unsigned int A_Event::getTagWord ( const int  i = 0) const
inlinevirtual

getTagWord() returns the bit pattern that the event builder may have put into the header for fast event selection purposes. This is mainly used by the ET system to distribute events based on its properties.

Reimplemented from Event.

Definition at line 58 of file A_Event.h.

View newest version in sPHENIX GitHub at line 58 of file A_Event.h

time_t A_Event::getTime ( ) const
virtual

Implements Event.

Definition at line 106 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 106 of file A_Event.cc

References evt_data::date, EventData, t, ticFactor, ticOffset, evt_data::time, x, y, and z.

Referenced by identify().

+ Here is the caller graph for this function:

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

identify will write a short identification message to standard output or to the ostream provided.

Implements Event.

Definition at line 712 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 712 of file A_Event.cc

References CORRUPTEVENTMASK, EventData, evt_data::evt_length, evt_data::evt_sequence, evt_data::evt_type, get_evt_mnemonic(), getTime(), NumberFrames, evt_data::run_number, SETW, and x.

+ Here is the call graph for this function:

int A_Event::is_pointer_type ( ) const
virtual

Implements Event.

Definition at line 822 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 822 of file A_Event.cc

References is_data_type.

void A_Event::listError ( const int  id = 0,
OSTREAM os = COUT 
) const
virtual

Definition at line 191 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 191 of file A_Event.cc

References dumpBlock(), dumpErrorBlock(), findFrameErrorStart(), findFramePacketId(), framelist, getFrameErrorLength(), and ptrFailure.

+ Here is the call graph for this function:

void A_Event::listFrame ( const int  id = 0,
OSTREAM os = COUT 
) const
virtual

Definition at line 125 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 125 of file A_Event.cc

References dumpFrame(), findFramePacketId(), framelist, and ptrFailure.

+ Here is the call graph for this function:

void A_Event::listHistory ( const int  id = 0,
OSTREAM os = COUT 
) const
virtual

Definition at line 158 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 158 of file A_Event.cc

References dumpBlock(), findFrameHistoryStart(), findFramePacketId(), framelist, getFrameHistoryLength(), and ptrFailure.

+ Here is the call graph for this function:

Packet * A_Event::makePacket ( PHDWORD pp,
const int  hitformat = 0 
)
static

Definition at line 559 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 559 of file A_Event.cc

References getPacketStructure(), getUnstructPacketHitFormat(), getUnstructPacketWordSize(), ID2EVT, ID4EVT, ID4SCALER, IDCDEVBPM, IDCDEVBUCKETS, IDCDEVDESCR, IDCDEVDVM, IDCDEVIR, IDCDEVMADCH, IDCDEVPOLARIMETER, IDCDEVPOLARIMETERTARGET, IDCDEVRING, IDCDEVRINGFILL, IDCDEVRINGNOPOL, IDCDEVRINGPOL, IDCDEVSIS, IDCDEVWCMHISTORY, IDCSTR, IDDIGITIZER_12S, IDDIGITIZER_16S, IDDIGITIZER_31S, IDFOCAL_FPGATEST, IDFVTX_DCM0, IDFVTX_SIM, IDGL1_EVCLOCK, IDGL1P, IDGL1PSUM, IDGL1PSUMOBS, IDHBD_FPGA, IDHBD_FPGA0SUP, IDHBD_FPGASHORT, IDHBD_FPGASHORT0SUP, IDSTARSCALER, and Unstructured.

Referenced by getPacket(), and getPacketList().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int A_Event::updateFramelist ( )
protectedvirtual

Definition at line 829 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 829 of file A_Event.cc

References COUT, evt_data::data, EventData, evt_data::evt_length, evt_data::evt_sequence, evt_data::evt_type, EVTHEADERLENGTH, framelist, get_evt_mnemonic(), getFrameLength(), NumberFrames, evt_data::run_number, SETW, and validFrameHdr().

Referenced by A_Event(), and convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int A_Event::errorcode
protected

Definition at line 91 of file A_Event.h.

View newest version in sPHENIX GitHub at line 91 of file A_Event.h

Referenced by A_Event(), createMap(), getErrorCode(), getPacket(), and getPacketList().

evtdata_ptr A_Event::EventData
protected

Definition at line 87 of file A_Event.h.

View newest version in sPHENIX GitHub at line 87 of file A_Event.h

Referenced by A_Event(), convert(), Copy(), createMap(), getEvtLength(), getEvtSequence(), getEvtType(), getRunNumber(), getTime(), identify(), updateFramelist(), and ~A_Event().

PHDWORD** A_Event::framelist
protected

Definition at line 88 of file A_Event.h.

View newest version in sPHENIX GitHub at line 88 of file A_Event.h

Referenced by A_Event(), X_Event::change_hf(), X_Event::change_id(), convert(), createMap(), getFrameEntry(), getPacketList(), listError(), listFrame(), listHistory(), updateFramelist(), and ~A_Event().

int A_Event::hasMap
protected

Definition at line 90 of file A_Event.h.

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

Referenced by A_Event(), convert(), createMap(), existPacket(), getPacket(), and getPacketList().

int A_Event::is_data_type
protected

Definition at line 86 of file A_Event.h.

View newest version in sPHENIX GitHub at line 86 of file A_Event.h

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

int A_Event::NumberFrames
protected

Definition at line 89 of file A_Event.h.

View newest version in sPHENIX GitHub at line 89 of file A_Event.h

Referenced by identify(), and updateFramelist().

std::map<int, PHDWORD *> A_Event::pmap
protected

Definition at line 94 of file A_Event.h.

View newest version in sPHENIX GitHub at line 94 of file A_Event.h

Referenced by convert(), createMap(), existPacket(), getPacket(), and ~A_Event().


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