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

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

+ Inheritance diagram for oncsEvent:
+ Collaboration diagram for oncsEvent:

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 PacketgetPacket (const int)
 
virtual PacketgetPacket (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 PacketmakePacket (PHDWORD *pp, const int hitFormat=0)
 
- 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
 
virtual unsigned int getFrameEntry (const char *what, const int id=0, const int index=0) const
 
virtual int getErrorCode ()
 
virtual unsigned int getTagWord (const int i=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
 

Detailed Description

Definition at line 11 of file oncsEvent.h.

View newest version in sPHENIX GitHub at line 11 of file oncsEvent.h

Constructor & Destructor Documentation

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.

Member Function Documentation

int oncsEvent::convert ( )
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, and k.

+ Here is the call graph for this function:

int oncsEvent::Copy ( int *  destination,
const unsigned int  length,
int *  nw,
const char *  what = "" 
)
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 360 of file oncsEvent.cc.

View newest version in sPHENIX GitHub at line 360 of file oncsEvent.cc

References oncsevt_data::data, EventData, EVTHEADERLENGTH, and getEvtLength().

+ Here is the call graph for this function:

int oncsEvent::createMap ( )
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, EventData, oncsevt_data::evt_length, EVTHEADERLENGTH, hasMap, pmap, and subevt_data::sub_id.

Referenced by getPacket(), and getPacketList().

+ Here is the caller graph for this function:

int oncsEvent::existPacket ( const int  packetid)
virtual

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

Implements Event.

Definition at line 331 of file oncsEvent.cc.

View newest version in sPHENIX GitHub at line 331 of file oncsEvent.cc

References oncsevt_data::data, EventData, oncsevt_data::evt_length, EVTHEADERLENGTH, and subevt_data::sub_id.

virtual int oncsEvent::getDate ( )
inlinevirtual

Implements Event.

Definition at line 42 of file oncsEvent.h.

View newest version in sPHENIX GitHub at line 42 of file oncsEvent.h

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

+ Here is the caller graph for this function:

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

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

Packet * oncsEvent::getPacket ( const int  )
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

Packet * oncsEvent::getPacket ( const int  ,
const int  hitFormat 
)
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, makePacket(), and pmap.

+ Here is the call graph for this function:

int oncsEvent::getPacketList ( Packet [],
const int  length 
)
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 301 of file oncsEvent.cc.

View newest version in sPHENIX GitHub at line 301 of file oncsEvent.cc

References createMap(), errorcode, hasMap, it, makePacket(), p, and pmap.

+ Here is the call graph for this function:

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

time_t oncsEvent::getTime ( ) const
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().

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

int oncsEvent::is_pointer_type ( ) const
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.

Packet * oncsEvent::makePacket ( PHDWORD pp,
const int  hitFormat = 0 
)
virtual

Definition at line 153 of file oncsEvent.cc.

View newest version in sPHENIX GitHub at line 153 of file oncsEvent.cc

References ID2EVT, ID4EVT, IDBSPETDATA, IDCAENV1742, IDCAENV792, IDCSTR, IDDREAMV0, IDDRS4V1, IDFNALMWPC, IDFNALMWPCV2, IDMVTXV0, IDMVTXV1, IDMVTXV2, IDRCPETDATA, IDSIS3300, IDSIS3300R, IDSRSV01, IDTPCFEEV1, IDTPCFEEV2, IDUPPETDATA, IDUPPETDATA_V104, IDUPPETPARAMS, subevt_data::sub_decoding, and subevt_data::sub_type.

Referenced by getPacket(), and getPacketList().

+ Here is the caller graph for this function:

Member Data Documentation

int oncsEvent::errorcode
protected

Definition at line 52 of file oncsEvent.h.

View newest version in sPHENIX GitHub at line 52 of file oncsEvent.h

Referenced by getPacket(), getPacketList(), and oncsEvent().

oncsevtdata_ptr oncsEvent::EventData
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().

int oncsEvent::hasMap
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().

int oncsEvent::is_data_type
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().

std::map<int, PHDWORD *> oncsEvent::pmap
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().


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