ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <online_distribution/blob/master/newbasic/Event.h>
Public Member Functions | |
virtual | ~Event () |
virtual unsigned int | getEvtLength ()=0 |
virtual int | getEvtType ()=0 |
virtual int | getEvtSequence ()=0 |
virtual int | getRunNumber ()=0 |
virtual void | identify (std::ostream &os=std::cout) const =0 |
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 |
virtual unsigned int | getFrameEntry (const char *what, const int id=0, const int index=0) const |
virtual Packet * | getPacket (const int)=0 |
virtual Packet * | getPacket (const int, const int hitFormat)=0 |
virtual int | getPacketList (Packet *[], const int length)=0 |
virtual int | existPacket (const int packetid)=0 |
virtual int | Copy (int *destination, const unsigned int length, int *nw, const char *what="")=0 |
virtual int | getErrorCode () |
virtual unsigned int | getTagWord (const int i=0) const |
virtual int | is_pointer_type () const =0 |
virtual int | convert ()=0 |
virtual int | getDate ()=0 |
virtual time_t | getTime () const =0 |
This is the abstract Event class.
It defines all interfaces to deal with Event data. It is a pure virtual class which does not define any implementation details (it has only member function defintions, no data members). It is meant to be subclassed by the classes which define the actual implementation.
Definition at line 26 of file Event.h.
View newest version in sPHENIX GitHub at line 26 of file Event.h
|
inlinevirtual |
|
pure 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.
Implemented in A_Event, and oncsEvent.
Referenced by testEventiterator::getNextEvent().
|
pure 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.
Implemented in A_Event, and oncsEvent.
Referenced by ospBuffer::addEvent(), ophBuffer::addEvent(), and main().
|
inlinevirtual |
|
pure 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.
Implemented in A_Event, and oncsEvent.
Referenced by ospBuffer::addEvent(), ophBuffer::addEvent(), oncsBuffer::getEvent(), and main().
|
pure 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.
Implemented in A_Event, and oncsEvent.
Referenced by main(), Fun4AllPrdfInputManager::PushBackEvents(), Fun4AllPrdfInputManager::run(), odd_filter::select(), Fun4AllEventOutStream::WriteEvent(), Fun4AllRolloverFileOutStream::WriteEventOut(), and Fun4AllFileOutStream::WriteEventOut().
|
pure 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.
Implemented in A_Event, and oncsEvent.
Referenced by main(), and Fun4AllEventOutStream::WriteEvent().
|
inlinevirtual |
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 in A_Event.
Definition at line 106 of file Event.h.
View newest version in sPHENIX GitHub at line 106 of file Event.h
getPacket creates and returns a pointer to the packet object with the specified packet id (think of it as a house number).
Implemented in A_Event, and oncsEvent.
Referenced by TPCFEETestRecov1::get_motor_loc(), and main().
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.
Implemented in A_Event, and oncsEvent.
Referenced by main(), and Fun4AllEventOutStream::WriteEvent().
|
pure virtual |
getRunNumber() returns the number of the run to which this event belongs.
Implemented in A_Event, and oncsEvent.
Referenced by ospBuffer::addEvent(), ophBuffer::addEvent(), Fun4AllPrdfInputManager::run(), Fun4AllEventOutStream::WriteEvent(), Fun4AllRolloverFileOutStream::WriteEventOut(), and Fun4AllFileOutStream::WriteEventOut().
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 in A_Event.
Definition at line 162 of file Event.h.
View newest version in sPHENIX GitHub at line 162 of file Event.h
|
pure virtual |
identify will write a short identification message to standard output or to the ostream provided.
Implemented in A_Event, and oncsEvent.
Referenced by main(), pprocess(), and prun().
|
inlinevirtual |
listFrame will write a short descriptor of the frame header to the output stream provided. If id == 0, it will list all frame headers. Otherwise it will list the header of the frame in which the packet with id resides.
Definition at line 79 of file Event.h.
View newest version in sPHENIX GitHub at line 79 of file Event.h
Referenced by main().