Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
A_Event Class Reference

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

+ Inheritance diagram for A_Event:
+ Collaboration diagram for A_Event:

Public Member Functions

 A_Event (PHDWORD *)
 
 A_Event (int *)
 
virtual ~A_Event ()
 
virtual unsigned int getEvtLength ()
 
virtual int getEvtType ()
 
virtual int getEvtSequence ()
 
virtual int getRunNumber ()
 
virtual void identify (std::ostream &os=std::cout) const
 
virtual void listFrame (const int id=0, OSTREAM &os=COUT) const
 
virtual void listHistory (const int id=0, OSTREAM &os=COUT) const
 
virtual void listError (const int id=0, OSTREAM &os=COUT) const
 
unsigned int getFrameEntry (const char *what, const int id=0, const int index=0) const
 
virtual PacketgetPacket (const int)
 
virtual PacketgetPacket (const int, const int hitFormat)
 
virtual int getPacketList (Packet *[], const int)
 
virtual int existPacket (const int)
 
virtual int Copy (int *, const unsigned int, int *, const char *what="")
 
int getErrorCode ()
 
unsigned int getTagWord (const int i=0) const
 
virtual int is_pointer_type () const
 
virtual int convert ()
 
virtual int getDate ()
 
virtual time_t getTime () const
 
- 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
 

Static Public Member Functions

static void dumpFrame (PHDWORD *fp, OSTREAM &os=COUT)
 
static void dumpErrorBlock (PHDWORD *fp, OSTREAM &os=COUT)
 
static void dumpBlock (PHDWORD *p, UINT len, OSTREAM &os=COUT, const int how=EVT_HEXADECIMAL)
 
static PacketmakePacket (PHDWORD *pp, const int hitformat=0)
 

Protected Member Functions

virtual int updateFramelist ()
 
virtual unsigned int getFrameValue (const char *what, PHDWORD *fp, const unsigned int index=0) const
 
virtual int createMap ()
 

Protected Attributes

int is_data_type
 
evtdata_ptr EventData
 
PHDWORD ** framelist
 
int NumberFrames
 
int hasMap
 
int errorcode
 
std::map< int, PHDWORD * > pmap
 

Detailed Description

Definition at line 14 of file A_Event.h.

View newest version in sPHENIX GitHub at line 14 of file A_Event.h

Constructor & Destructor Documentation

A_Event::A_Event ( PHDWORD data)

Definition at line 17 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 17 of file A_Event.cc

References CORRUPTEVENTMASK, errorcode, EventData, framelist, getEvtType(), hasMap, is_data_type, and updateFramelist().

+ Here is the call graph for this function:

A_Event::A_Event ( int *  data)

Definition at line 40 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 40 of file A_Event.cc

References CORRUPTEVENTMASK, errorcode, EventData, framelist, getEvtType(), hasMap, is_data_type, and updateFramelist().

+ Here is the call graph for this function:

A_Event::~A_Event ( )
virtual

Definition at line 63 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 63 of file A_Event.cc

References EventData, framelist, is_data_type, and pmap.

Member Function Documentation

int A_Event::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 814 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 814 of file A_Event.cc

References EventData, framelist, getEvtLength(), hasMap, is_data_type, k, pmap, Acts::Test::tmp(), and updateFramelist().

+ Here is the call graph for this function:

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

View newest version in sPHENIX GitHub at line 787 of file A_Event.cc

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

+ Here is the call graph for this function:

int A_Event::createMap ( )
protectedvirtual

Definition at line 395 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 395 of file A_Event.cc

References errorcode, EventData, findFramePacketIndex(), findNextFramePacket(), framelist, getEvtLength(), getEvtSequence(), getPacketId(), hasMap, i, pmap, and ptrFailure.

Referenced by existPacket(), getErrorCode(), getPacket(), and getPacketList().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void A_Event::dumpBlock ( PHDWORD p,
UINT  len,
OSTREAM os = COUT,
const int  how = EVT_HEXADECIMAL 
)
static

Definition at line 281 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 281 of file A_Event.cc

References EVT_DECIMAL, EVT_HEXADECIMAL, j, and SETW.

Referenced by listError(), and listHistory().

+ Here is the caller graph for this function:

void A_Event::dumpErrorBlock ( PHDWORD fp,
OSTREAM os = COUT 
)
static

Definition at line 255 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 255 of file A_Event.cc

References errorEntryV1::addData, calcNumErrorsV1(), errorEntryV1::detectCode, errorEntryV1::deviceId, errorEntryV1::deviceType, Acts::UnitConstants::e, errorEntryV1::errorCode, findFrameErrorStart(), getFrameErrorLength(), i, merge_hashes::p, and errorEntryV1::severity.

Referenced by listError().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void A_Event::dumpFrame ( PHDWORD fp,
OSTREAM os = COUT 
)
static

Definition at line 222 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 222 of file A_Event.cc

References findFrameAlignBlock(), getFrameAlignLength(), getFrameDataType(), getFrameErrorLength(), getFrameHdrLength(), getFrameHdrVersion(), getFrameHistoryLength(), getFrameLength(), getFrameMark(), getFramePadding(), getFrameSourceId(), getFrameStatus(), getFrameType(), i, merge_hashes::p, and SETW.

Referenced by listFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int A_Event::existPacket ( const int  )
virtual

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

Implements Event.

Definition at line 760 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 760 of file A_Event.cc

References createMap(), hasMap, train_ambiguity_solver::id, and pmap.

+ Here is the call graph for this function:

virtual int A_Event::getDate ( )
inlinevirtual

Implements Event.

Definition at line 72 of file A_Event.h.

View newest version in sPHENIX GitHub at line 72 of file A_Event.h

int A_Event::getErrorCode ( )
virtual

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 from Event.

Definition at line 927 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 927 of file A_Event.cc

References createMap(), and errorcode.

+ Here is the call graph for this function:

unsigned int A_Event::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 74 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 74 of file A_Event.cc

References EventData, and evt_data::evt_length.

Referenced by convert(), Copy(), createMap(), and getPacketList().

+ Here is the caller graph for this function:

int A_Event::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 86 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 86 of file A_Event.cc

References EventData, and evt_data::evt_sequence.

Referenced by createMap().

+ Here is the caller graph for this function:

int A_Event::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 80 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 80 of file A_Event.cc

References EventData, and evt_data::evt_type.

Referenced by A_Event().

+ Here is the caller graph for this function:

unsigned int A_Event::getFrameEntry ( const char *  ,
const int  = 0,
const int  = 0 
) const
virtual

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 from Event.

Definition at line 329 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 329 of file A_Event.cc

References findFramePacketId(), framelist, getFrameValue(), i, j, and ptrFailure.

+ Here is the call graph for this function:

unsigned int A_Event::getFrameValue ( const char *  what,
PHDWORD fp,
const unsigned int  index = 0 
) const
protectedvirtual

Definition at line 363 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 363 of file A_Event.cc

References findFrameAlignBlock(), getFrameAlignLength(), getFrameDataType(), getFrameHdrLength(), getFrameHdrVersion(), getFrameLength(), getFrameMark(), getFrameSourceId(), getFrameStatus(), getFrameType(), index, and merge_hashes::p.

Referenced by getFrameEntry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Packet * A_Event::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 388 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 388 of file A_Event.cc

Packet * A_Event::getPacket ( const int  ,
const int   
)
virtual

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

Implements Event.

Definition at line 460 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 460 of file A_Event.cc

References createMap(), errorcode, hasMap, train_ambiguity_solver::id, makePacket(), and pmap.

+ Here is the call graph for this function:

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

View newest version in sPHENIX GitHub at line 502 of file A_Event.cc

References createMap(), errorcode, findFramePacketIndex(), findNextFramePacket(), framelist, getEvtLength(), getPacketStructure(), hasMap, makePacket(), ptrFailure, and Unstructured.

+ Here is the call graph for this function:

int A_Event::getRunNumber ( )
virtual

getRunNumber() returns the number of the run to which this event belongs.

Implements Event.

Definition at line 92 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 92 of file A_Event.cc

References EventData, and evt_data::run_number.

unsigned int A_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 from Event.

Definition at line 58 of file A_Event.h.

View newest version in sPHENIX GitHub at line 58 of file A_Event.h

References i.

time_t A_Event::getTime ( ) const
virtual

Implements Event.

Definition at line 106 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 106 of file A_Event.cc

References evt_data::date, EventData, t, ticFactor, ticOffset, evt_data::time, ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.

Referenced by identify().

+ Here is the caller graph for this function:

void A_Event::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 729 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 729 of file A_Event.cc

References CORRUPTEVENTMASK, EventData, evt_data::evt_length, evt_data::evt_sequence, evt_data::evt_type, get_evt_mnemonic(), getTime(), NumberFrames, evt_data::run_number, SETW, and ambiguity_solver_full_chain::x.

+ Here is the call graph for this function:

int A_Event::is_pointer_type ( ) const
virtual

Implements Event.

Definition at line 839 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 839 of file A_Event.cc

References is_data_type.

void A_Event::listError ( const int  id = 0,
OSTREAM os = COUT 
) const
virtual

Definition at line 191 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 191 of file A_Event.cc

References dumpBlock(), dumpErrorBlock(), findFrameErrorStart(), findFramePacketId(), framelist, getFrameErrorLength(), i, j, and ptrFailure.

+ Here is the call graph for this function:

void A_Event::listFrame ( const int  id = 0,
OSTREAM os = COUT 
) const
virtual

Definition at line 125 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 125 of file A_Event.cc

References dumpFrame(), findFramePacketId(), framelist, i, j, and ptrFailure.

+ Here is the call graph for this function:

void A_Event::listHistory ( const int  id = 0,
OSTREAM os = COUT 
) const
virtual

Definition at line 158 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 158 of file A_Event.cc

References dumpBlock(), findFrameHistoryStart(), findFramePacketId(), framelist, getFrameHistoryLength(), i, j, and ptrFailure.

+ Here is the call graph for this function:

Packet * A_Event::makePacket ( PHDWORD pp,
const int  hitformat = 0 
)
static

Definition at line 559 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 559 of file A_Event.cc

References getPacketStructure(), getUnstructPacketHitFormat(), getUnstructPacketWordSize(), ID2EVT, ID4EVT, ID4SCALER, IDCDEVBPM, IDCDEVBUCKETS, IDCDEVDVM, IDCDEVIR, IDCDEVMADCH, IDCDEVPOLARIMETER, IDCDEVPOLARIMETERTARGET, IDCDEVRING, IDCDEVRINGFILL, IDCDEVRINGNOPOL, IDCDEVRINGPOL, IDCDEVSIS, IDCDEVWCMHISTORY, IDCSTR, IDDIGITIZER_12S, IDDIGITIZER_16S, IDDIGITIZER_31S, IDDIGITIZERV3_12S, IDDIGITIZERV3_14S, IDDIGITIZERV3_18S, IDDIGITIZERV3_20S, IDDIGITIZERV3_22S, IDDIGITIZERV3_24S, IDDIGITIZERV3_26S, IDDIGITIZERV3_28S, IDDIGITIZERV3_2S, IDDIGITIZERV3_30S, IDDIGITIZERV3_4S, IDDIGITIZERV3_6S, IDDIGITIZERV3_8S, IDFOCAL_FPGATEST, IDFVTX_DCM0, IDFVTX_SIM, IDGL1_EVCLOCK, IDGL1P, IDGL1PSUM, IDGL1PSUMOBS, IDHBD_FPGA, IDHBD_FPGA0SUP, IDHBD_FPGASHORT, IDHBD_FPGASHORT0SUP, IDLL1_20S, IDLL1v2_20S, IDSTARSCALER, and Unstructured.

Referenced by getPacket(), and getPacketList().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int A_Event::updateFramelist ( )
protectedvirtual

Definition at line 846 of file A_Event.cc.

View newest version in sPHENIX GitHub at line 846 of file A_Event.cc

References COUT, evt_data::data, EventData, evt_data::evt_length, evt_data::evt_sequence, evt_data::evt_type, EVTHEADERLENGTH, f, framelist, get_evt_mnemonic(), getFrameLength(), i, index, NumberFrames, evt_data::run_number, SETW, and validFrameHdr().

Referenced by A_Event(), and convert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int A_Event::errorcode
protected

Definition at line 91 of file A_Event.h.

View newest version in sPHENIX GitHub at line 91 of file A_Event.h

Referenced by A_Event(), createMap(), getErrorCode(), getPacket(), and getPacketList().

evtdata_ptr A_Event::EventData
protected

Definition at line 87 of file A_Event.h.

View newest version in sPHENIX GitHub at line 87 of file A_Event.h

Referenced by A_Event(), convert(), Copy(), createMap(), getEvtLength(), getEvtSequence(), getEvtType(), getRunNumber(), getTime(), identify(), updateFramelist(), and ~A_Event().

PHDWORD** A_Event::framelist
protected

Definition at line 88 of file A_Event.h.

View newest version in sPHENIX GitHub at line 88 of file A_Event.h

Referenced by A_Event(), X_Event::change_hf(), X_Event::change_id(), convert(), createMap(), getFrameEntry(), getPacketList(), listError(), listFrame(), listHistory(), updateFramelist(), and ~A_Event().

int A_Event::hasMap
protected

Definition at line 90 of file A_Event.h.

View newest version in sPHENIX GitHub at line 90 of file A_Event.h

Referenced by A_Event(), convert(), createMap(), existPacket(), getPacket(), and getPacketList().

int A_Event::is_data_type
protected

Definition at line 86 of file A_Event.h.

View newest version in sPHENIX GitHub at line 86 of file A_Event.h

Referenced by A_Event(), convert(), is_pointer_type(), and ~A_Event().

int A_Event::NumberFrames
protected

Definition at line 89 of file A_Event.h.

View newest version in sPHENIX GitHub at line 89 of file A_Event.h

Referenced by identify(), and updateFramelist().

std::map<int, PHDWORD *> A_Event::pmap
protected

Definition at line 94 of file A_Event.h.

View newest version in sPHENIX GitHub at line 94 of file A_Event.h

Referenced by convert(), createMap(), existPacket(), getPacket(), and ~A_Event().


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