Analysis Software
Documentation for sPHENIX simulation software
|
#include <online_distribution/blob/master/newbasic/oncsEvent.h>
Public Member Functions | |
oncsEvent (int *) | |
~oncsEvent () | |
virtual unsigned int | getEvtLength () |
virtual int | getEvtType () |
virtual int | getEvtSequence () |
virtual int | getRunNumber () |
virtual void | identify (std::ostream &os=std::cout) 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 packetid) |
virtual int | Copy (int *destination, const unsigned int length, int *nw, const char *what="") |
virtual int | is_pointer_type () const |
virtual int | convert () |
virtual int | getDate () |
virtual time_t | getTime () const |
virtual Packet * | makePacket (PHDWORD *pp, const int hitFormat=0) |
Public Member Functions inherited from Event | |
virtual | ~Event () |
virtual void | listFrame (const int=0, std::ostream &=std::cout) const |
virtual void | listHistory (const int=0, std::ostream &=std::cout) const |
virtual void | listError (const int=0, std::ostream &=std::cout) const |
virtual unsigned int | getFrameEntry (const char *, const int=0, const int=0) const |
virtual int | getErrorCode () |
virtual unsigned int | getTagWord (const int=0) const |
Protected Member Functions | |
virtual int | createMap () |
Protected Attributes | |
int | is_data_type |
oncsevtdata_ptr | EventData |
int | hasMap |
int | errorcode |
std::map< int, PHDWORD * > | pmap |
Definition at line 11 of file oncsEvent.h.
View newest version in sPHENIX GitHub at line 11 of file oncsEvent.h
oncsEvent::oncsEvent | ( | int * | data | ) |
Definition at line 9 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 9 of file oncsEvent.cc
References errorcode, EventData, hasMap, and is_data_type.
oncsEvent::~oncsEvent | ( | ) |
Definition at line 17 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 17 of file oncsEvent.cc
References EventData, and is_data_type.
|
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 76 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 76 of file oncsEvent.cc
References EventData, getEvtLength(), is_data_type, k, and Acts::Test::tmp().
|
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 391 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 391 of file oncsEvent.cc
References oncsevt_data::data, EventData, EVTHEADERLENGTH, and getEvtLength().
|
protectedvirtual |
Definition at line 126 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 126 of file oncsEvent.cc
References oncsevt_data::data, errorcode, EventData, oncsevt_data::evt_length, EVTHEADERLENGTH, hasMap, i, pmap, and subevt_data::sub_id.
Referenced by getPacket(), and getPacketList().
|
virtual |
existPacket returns 1 if such a packet exists in the event. 0 else.
Implements Event.
Definition at line 362 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 362 of file oncsEvent.cc
References oncsevt_data::data, EventData, oncsevt_data::evt_length, EVTHEADERLENGTH, i, if(), and subevt_data::sub_id.
|
inlinevirtual |
Implements Event.
Definition at line 42 of file oncsEvent.h.
View newest version in sPHENIX GitHub at line 42 of file oncsEvent.h
|
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 24 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 24 of file oncsEvent.cc
References EventData, and oncsevt_data::evt_length.
Referenced by convert(), and Copy().
|
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 36 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 36 of file oncsEvent.cc
References EventData, and oncsevt_data::evt_sequence.
|
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 30 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 30 of file oncsEvent.cc
References EventData, and oncsevt_data::evt_type.
|
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 121 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 121 of file oncsEvent.cc
|
virtual |
This interface allows to override the hitformat of the packet. For debugging purposes mostly.
Implements Event.
Definition at line 105 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 105 of file oncsEvent.cc
References createMap(), errorcode, hasMap, train_ambiguity_solver::id, 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 332 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 332 of file oncsEvent.cc
References createMap(), errorcode, hasMap, it, makePacket(), merge_hashes::p, and pmap.
|
virtual |
getRunNumber() returns the number of the run to which this event belongs.
Implements Event.
Definition at line 48 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 48 of file oncsEvent.cc
References EventData, and oncsevt_data::run_number.
|
virtual |
Implements Event.
Definition at line 42 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 42 of file oncsEvent.cc
References EventData, and oncsevt_data::time.
Referenced by identify().
|
virtual |
identify will write a short identification message to standard output or to the ostream provided.
Implements Event.
Definition at line 60 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 60 of file oncsEvent.cc
References EventData, oncsevt_data::evt_length, oncsevt_data::evt_sequence, oncsevt_data::evt_type, get_evt_mnemonic(), getTime(), oncsevt_data::run_number, and SETW.
|
virtual |
Implements Event.
Definition at line 97 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 97 of file oncsEvent.cc
References is_data_type.
Definition at line 160 of file oncsEvent.cc.
View newest version in sPHENIX GitHub at line 160 of file oncsEvent.cc
References ID2EVT, ID4EVT, IDBSPETDATA, IDCAENV1742, IDCAENV792, IDCSTR, IDDIGITIZERV1, IDDREAMV0, IDDRS4V1, IDFNALMWPC, IDFNALMWPCV2, IDGL1V0, IDINTTV0, IDMVTXV0, IDMVTXV1, IDMVTXV2, IDMVTXV3, IDRCPETDATA, IDSIS3300, IDSIS3300R, IDSRSV01, IDTPCFEEV1, IDTPCFEEV2, IDTPCFEEV3, IDUPPETDATA, IDUPPETDATA_V104, IDUPPETPARAMS, subevt_data::sub_decoding, and subevt_data::sub_type.
Referenced by getPacket(), and getPacketList().
|
protected |
Definition at line 52 of file oncsEvent.h.
View newest version in sPHENIX GitHub at line 52 of file oncsEvent.h
Referenced by createMap(), getPacket(), getPacketList(), and oncsEvent().
|
protected |
Definition at line 49 of file oncsEvent.h.
View newest version in sPHENIX GitHub at line 49 of file oncsEvent.h
Referenced by convert(), Copy(), createMap(), existPacket(), getEvtLength(), getEvtSequence(), getEvtType(), getRunNumber(), getTime(), identify(), oncsEvent(), and ~oncsEvent().
|
protected |
Definition at line 51 of file oncsEvent.h.
View newest version in sPHENIX GitHub at line 51 of file oncsEvent.h
Referenced by createMap(), getPacket(), getPacketList(), and oncsEvent().
|
protected |
Definition at line 47 of file oncsEvent.h.
View newest version in sPHENIX GitHub at line 47 of file oncsEvent.h
Referenced by convert(), is_pointer_type(), oncsEvent(), and ~oncsEvent().
|
protected |
Definition at line 54 of file oncsEvent.h.
View newest version in sPHENIX GitHub at line 54 of file oncsEvent.h
Referenced by createMap(), getPacket(), and getPacketList().