EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <online_distribution/blob/master/newbasic/A_Event.h>
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 Packet * | getPacket (const int) |
virtual Packet * | getPacket (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 Packet * | makePacket (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 |
Definition at line 14 of file A_Event.h.
View newest version in sPHENIX GitHub at line 14 of file A_Event.h
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().
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().
|
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.
|
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().
|
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().
|
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().
|
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().
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().
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().
|
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.
|
inlinevirtual |
|
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.
|
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().
|
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().
|
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().
|
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.
|
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().
|
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
|
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.
|
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.
|
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.
|
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
|
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().
|
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.
|
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.
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.
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.
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.
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().