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

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

+ Inheritance diagram for Event:

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 PacketgetPacket (const int)=0
 
virtual PacketgetPacket (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
 

Detailed Description

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

Constructor & Destructor Documentation

virtual Event::~Event ( )
inlinevirtual

Definition at line 32 of file Event.h.

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

Member Function Documentation

virtual int Event::convert ( )
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().

+ Here is the caller graph for this function:

virtual int Event::Copy ( int *  destination,
const unsigned int  length,
int *  nw,
const char *  what = "" 
)
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().

+ Here is the caller graph for this function:

virtual int Event::existPacket ( const int  packetid)
pure virtual

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

Implemented in A_Event, and oncsEvent.

virtual int Event::getDate ( )
pure virtual

Implemented in A_Event, and oncsEvent.

virtual int Event::getErrorCode ( )
inlinevirtual

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 in A_Event.

Definition at line 154 of file Event.h.

View newest version in sPHENIX GitHub at line 154 of file Event.h

virtual unsigned int Event::getEvtLength ( )
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().

+ Here is the caller graph for this function:

virtual int Event::getEvtSequence ( )
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().

+ Here is the caller graph for this function:

virtual int Event::getEvtType ( )
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().

+ Here is the caller graph for this function:

virtual unsigned int Event::getFrameEntry ( const char *  what,
const int  id = 0,
const int  index = 0 
) const
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

virtual Packet* Event::getPacket ( const int  )
pure virtual

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().

+ Here is the caller graph for this function:

virtual Packet* Event::getPacket ( const int  ,
const int  hitFormat 
)
pure virtual

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

Implemented in A_Event, and oncsEvent.

virtual int Event::getPacketList ( Packet [],
const int  length 
)
pure 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.

Implemented in A_Event, and oncsEvent.

Referenced by main(), and Fun4AllEventOutStream::WriteEvent().

+ Here is the caller graph for this function:

virtual int Event::getRunNumber ( )
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().

+ Here is the caller graph for this function:

virtual unsigned int 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 in A_Event.

Definition at line 162 of file Event.h.

View newest version in sPHENIX GitHub at line 162 of file Event.h

virtual time_t Event::getTime ( ) const
pure virtual

Implemented in A_Event, and oncsEvent.

virtual void Event::identify ( std::ostream &  os = std::cout) const
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().

+ Here is the caller graph for this function:

virtual int Event::is_pointer_type ( ) const
pure virtual

Implemented in A_Event, and oncsEvent.

virtual void Event::listError ( const int  id = 0,
std::ostream &  os = std::cout 
) const
inlinevirtual

Definition at line 82 of file Event.h.

View newest version in sPHENIX GitHub at line 82 of file Event.h

Referenced by main().

+ Here is the caller graph for this function:

virtual void Event::listFrame ( const int  id = 0,
std::ostream &  os = std::cout 
) const
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().

+ Here is the caller graph for this function:

virtual void Event::listHistory ( const int  id = 0,
std::ostream &  os = std::cout 
) const
inlinevirtual

Definition at line 81 of file Event.h.

View newest version in sPHENIX GitHub at line 81 of file Event.h

Referenced by main().

+ Here is the caller graph for this function:


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