Analysis Software
Documentation for sPHENIX simulation 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=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 PacketgetPacket (const int)=0
 
virtual PacketgetPacket (const int, const int)=0
 
virtual int getPacketList (Packet *[], const int)=0
 
virtual int existPacket (const int)=0
 
virtual int Copy (int *destination, const unsigned int, int *nw, const char *="")=0
 
virtual int getErrorCode ()
 
virtual unsigned int getTagWord (const int=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 eventReceiverClient::getEvent(), and testEventiterator::getNextEvent().

+ Here is the caller graph for this function:

virtual int Event::Copy ( int *  destination,
const unsigned  int,
int *  nw,
const char *  = "" 
)
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 prdfoStream::addEvent(), ospBuffer::addEvent(), ophBuffer::addEvent(), and main().

+ Here is the caller graph for this function:

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

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

Implemented in A_Event, and oncsEvent.

Referenced by TpcMon::process_event().

+ Here is the caller graph for this function:

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 153 of file Event.h.

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

Referenced by process_event().

+ Here is the caller graph for this function:

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 prdfoStream::addEvent(), ospBuffer::addEvent(), ophBuffer::addEvent(), oncsBuffer::getEvent(), main(), EventCombiner::process_event(), and process_event().

+ 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 hLabHelper::evDisplay(), EventLoop(), hcalHelper::evLoop(), tileHelper::evLoop(), SingleTpcPoolInput::FillPool(), SingleGl1PoolInput::FillPool(), SingleZdcInput::FillPool(), SingleMicromegasPoolInput::FillPool(), SingleInttPoolInput::FillPool(), SingleMvtxPoolInput::FillPool(), main(), process_event(), BbcMon::process_event(), HcalMon::process_event(), EventNumberCheck::process_event(), TpcRawDataTree::process_event(), TPCRawDataTree::process_event(), Fun4AllPrdfInputManager::PushBackEvents(), Fun4AllPrdfInputManager::run(), odd_filter::select(), Fun4AllEventOutStream::WriteEvent(), Fun4AllFileOutStream::WriteEventOut(), and Fun4AllRolloverFileOutStream::WriteEventOut().

+ Here is the caller graph for this function:

virtual unsigned int Event::getFrameEntry ( const char *  ,
const int  = 0,
const int  = 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 105 of file Event.h.

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

virtual Packet* Event::getPacket ( const int  ,
const int   
)
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   
)
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 SingleTpcPoolInput::FillPool(), SingleZdcInput::FillPool(), SingleMicromegasPoolInput::FillPool(), SingleInttPoolInput::FillPool(), SingleMvtxPoolInput::FillPool(), SinglePrdfInput::FillPool(), main(), PktSizeMon::process_event(), EventNumberCheck::process_event(), MvtxMon::process_event(), and Fun4AllEventOutStream::WriteEvent().

+ Here is the caller graph for this function:

virtual int Event::getRunNumber ( )
pure virtual
virtual unsigned int Event::getTagWord ( const int  = 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 161 of file Event.h.

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

virtual time_t Event::getTime ( ) const
pure virtual

Implemented in A_Event, and oncsEvent.

Referenced by process_event().

+ Here is the caller graph for this function:

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 EventLoop(), SingleTpcPoolInput::FillPool(), SingleGl1PoolInput::FillPool(), SingleZdcInput::FillPool(), SingleMicromegasPoolInput::FillPool(), SingleInttPoolInput::FillPool(), SinglePrdfInput::FillPool(), SingleMvtxPoolInput::FillPool(), eventReceiverClient::getEvent(), main(), pprocess(), GenericUnpackPRDF::process_event(), CaloUnpackPRDF::process_event(), EventNumberCheck::process_event(), prun(), and Fun4AllPrdfInputPoolManager::run().

+ 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  = 0,
std::ostream &  = 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:

virtual void Event::listFrame ( const int  = 0,
std::ostream &  = 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 78 of file Event.h.

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

Referenced by main().

+ Here is the caller graph for this function:

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

Definition at line 80 of file Event.h.

View newest version in sPHENIX GitHub at line 80 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: