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

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

+ Inheritance diagram for ophBuffer:
+ Collaboration diagram for ophBuffer:

Public Member Functions

 ophBuffer ()
 
 ophBuffer (int fd, PHDWORD *where, const int length, const int irun=1, const int iseq=0)
 
 ophBuffer (const char *filename, PHDWORD *where, const int length, int &status, const int irun=1, const int iseq=0)
 
 ~ophBuffer ()
 
int nextEvent (const unsigned int evtsize, const int etype=0, const int evtseq=0)
 
int addRawEvent (unsigned int *)
 
int addEvent (Event *)
 
int addFrame (PHDWORD *)
 
int addPacket (const Packet *p)
 
int addUnstructPacketData (PHDWORD *data, const int length, const int id, const int wordsize, const int hitformat)
 
int writeout ()
 
int setMaxSize (const int size)
 
int getMaxSize () const
 
unsigned long long getBytesWritten () const
 
int addEoB ()
 
- Public Member Functions inherited from oBuffer
 oBuffer ()
 
virtual ~oBuffer ()
 

Protected Member Functions

int prepare_next ()
 

Protected Attributes

buffer_ptr bptr
 
buffer_ptr bptr_being_written
 
buffer_ptr bptr0
 
buffer_ptr bptr1
 
PHDWORDdata_ptr
 
int current_index
 
int max_length
 
int max_size
 
unsigned int left
 
int sequence
 
int runnumber
 
unsigned long long byteswritten
 
oEventcurrent_event
 
int eventsequence
 
int current_etype
 
int has_end
 
int dirty
 
int fd
 
int our_fd
 
int good_object
 

Detailed Description

Definition at line 12 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 12 of file ophBuffer.h

Constructor & Destructor Documentation

ophBuffer::ophBuffer ( )
inline

Definition at line 21 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 21 of file ophBuffer.h

ophBuffer::ophBuffer ( int  fd,
PHDWORD where,
const int  length,
const int  irun = 1,
const int  iseq = 0 
)

Definition at line 56 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 56 of file ophBuffer.cc

References bptr, BUFFERHEADERLENGTH, oBuffer::buffer_ptr::Bufseq, byteswritten, current_etype, current_event, oBuffer::buffer_ptr::data, data_ptr, DATAEVENT, eventsequence, fd, good_object, oBuffer::buffer_ptr::ID, left, BTOF::length, max_length, max_size, our_fd, prepare_next(), oBuffer::buffer_ptr::Runnr, runnumber, and sequence.

+ Here is the call graph for this function:

ophBuffer::ophBuffer ( const char *  filename,
PHDWORD where,
const int  length,
int status,
const int  irun = 1,
const int  iseq = 0 
)

Definition at line 22 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 22 of file ophBuffer.cc

References bptr, BUFFERHEADERLENGTH, oBuffer::buffer_ptr::Bufseq, byteswritten, current_etype, current_event, oBuffer::buffer_ptr::data, data_ptr, DATAEVENT, eventsequence, fd, good_object, oBuffer::buffer_ptr::ID, left, BTOF::length, max_length, max_size, Acts::open, our_fd, prepare_next(), oBuffer::buffer_ptr::Runnr, runnumber, and sequence.

+ Here is the call graph for this function:

ophBuffer::~ophBuffer ( )

Definition at line 387 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 387 of file ophBuffer.cc

References close(), fd, our_fd, and writeout().

+ Here is the call graph for this function:

Member Function Documentation

int ophBuffer::addEoB ( )
virtual

Implements oBuffer.

Definition at line 375 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 375 of file ophBuffer.cc

References bptr, current_index, oBuffer::buffer_ptr::data, has_end, and oBuffer::buffer_ptr::Length.

Referenced by ogzBuffer::writeout(), olzoBuffer::writeout(), oamlBuffer::writeout(), and writeout().

+ Here is the caller graph for this function:

int ophBuffer::addEvent ( Event Evt)
virtual

Implements oBuffer.

Definition at line 161 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 161 of file ophBuffer.cc

References bptr, oBuffer::buffer_ptr::Bufseq, Event::Copy(), current_index, oBuffer::buffer_ptr::data, dirty, EOBLENGTH, Event::getEvtLength(), Event::getRunNumber(), good_object, left, oBuffer::buffer_ptr::Length, prepare_next(), runnumber, and writeout().

+ Here is the call graph for this function:

int ophBuffer::addFrame ( PHDWORD frame)
virtual

Reimplemented from oBuffer.

Definition at line 189 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 189 of file ophBuffer.cc

References oEvent::addFrame(), bptr, current_event, current_index, good_object, left, and oBuffer::buffer_ptr::Length.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ophBuffer::addPacket ( const Packet p)
virtual

Implements oBuffer.

Definition at line 211 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 211 of file ophBuffer.cc

References oEvent::addPacket(), bptr, current_event, current_index, good_object, left, and oBuffer::buffer_ptr::Length.

+ Here is the call graph for this function:

int ophBuffer::addRawEvent ( unsigned int data)
virtual

Implements oBuffer.

Definition at line 134 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 134 of file ophBuffer.cc

References bptr, oBuffer::buffer_ptr::Bufseq, current_index, oBuffer::buffer_ptr::data, dirty, EOBLENGTH, good_object, left, oBuffer::buffer_ptr::Length, prepare_next(), and writeout().

+ Here is the call graph for this function:

int ophBuffer::addUnstructPacketData ( PHDWORD data,
const int  length,
const int  id,
const int  wordsize,
const int  hitformat 
)
virtual

Implements oBuffer.

Definition at line 232 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 232 of file ophBuffer.cc

References oEvent::addUnstructPacketData(), bptr, current_event, current_index, good_object, left, and oBuffer::buffer_ptr::Length.

+ Here is the call graph for this function:

unsigned long long ophBuffer::getBytesWritten ( ) const
virtual

Implements oBuffer.

Definition at line 369 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 369 of file ophBuffer.cc

References byteswritten.

int ophBuffer::getMaxSize ( ) const
virtual

Implements oBuffer.

Definition at line 363 of file ophBuffer.cc.

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

References max_size.

int ophBuffer::nextEvent ( const unsigned int  evtsize,
const int  etype = 0,
const int  evtseq = 0 
)
virtual

Implements oBuffer.

Definition at line 101 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 101 of file ophBuffer.cc

References bptr, oBuffer::buffer_ptr::Bufseq, current_etype, current_event, current_index, oBuffer::buffer_ptr::data, dirty, EOBLENGTH, eventsequence, EVTHEADERLENGTH, left, oBuffer::buffer_ptr::Length, max_size, prepare_next(), oBuffer::buffer_ptr::Runnr, and writeout().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ophBuffer::prepare_next ( )
protected

Definition at line 82 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 82 of file ophBuffer.cc

References bptr, BUFFERHEADERLENGTH, oBuffer::buffer_ptr::Bufseq, current_index, dirty, has_end, oBuffer::buffer_ptr::ID, left, oBuffer::buffer_ptr::Length, max_size, oBuffer::buffer_ptr::Runnr, runnumber, and sequence.

Referenced by addEvent(), addRawEvent(), nextEvent(), and ophBuffer().

+ Here is the caller graph for this function:

int ophBuffer::setMaxSize ( const int  size)
virtual

Implements oBuffer.

Definition at line 346 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 346 of file ophBuffer.cc

References BUFFERBLOCKSIZE, max_length, and max_size.

int ophBuffer::writeout ( )
virtual

Implements oBuffer.

Definition at line 274 of file ophBuffer.cc.

View newest version in sPHENIX GitHub at line 274 of file ophBuffer.cc

References addEoB(), bptr, BUFFERBLOCKSIZE, byteswritten, cp, dirty, fd, good_object, has_end, and n.

Referenced by addEvent(), addRawEvent(), nextEvent(), and ~ophBuffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

buffer_ptr ophBuffer::bptr
protected
buffer_ptr ophBuffer::bptr0
protected

Definition at line 75 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 75 of file ophBuffer.h

buffer_ptr ophBuffer::bptr1
protected

Definition at line 76 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 76 of file ophBuffer.h

buffer_ptr ophBuffer::bptr_being_written
protected

Definition at line 73 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 73 of file ophBuffer.h

unsigned long long ophBuffer::byteswritten
protected

Definition at line 84 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 84 of file ophBuffer.h

Referenced by getBytesWritten(), ophBuffer(), ogzBuffer::writeout(), olzoBuffer::writeout(), oamlBuffer::writeout(), and writeout().

int ophBuffer::current_etype
protected

Definition at line 87 of file ophBuffer.h.

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

Referenced by nextEvent(), and ophBuffer().

oEvent* ophBuffer::current_event
protected

Definition at line 85 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 85 of file ophBuffer.h

Referenced by addFrame(), addPacket(), addUnstructPacketData(), nextEvent(), and ophBuffer().

int ophBuffer::current_index
protected

Definition at line 78 of file ophBuffer.h.

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

Referenced by addEoB(), addEvent(), addFrame(), addPacket(), addRawEvent(), addUnstructPacketData(), nextEvent(), and prepare_next().

PHDWORD* ophBuffer::data_ptr
protected

Definition at line 77 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 77 of file ophBuffer.h

Referenced by ophBuffer().

int ophBuffer::dirty
protected

Definition at line 89 of file ophBuffer.h.

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

Referenced by addEvent(), addRawEvent(), nextEvent(), prepare_next(), ogzBuffer::writeout(), olzoBuffer::writeout(), oamlBuffer::writeout(), writeout(), and oamlBuffer::~oamlBuffer().

int ophBuffer::eventsequence
protected

Definition at line 86 of file ophBuffer.h.

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

Referenced by nextEvent(), and ophBuffer().

int ophBuffer::fd
protected

Definition at line 90 of file ophBuffer.h.

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

Referenced by ophBuffer(), olzoBuffer::writeout(), ogzBuffer::writeout(), writeout(), and ~ophBuffer().

int ophBuffer::good_object
protected

Definition at line 92 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 92 of file ophBuffer.h

Referenced by addEvent(), addFrame(), addPacket(), addRawEvent(), addUnstructPacketData(), oamlBuffer::connect_aml(), oamlBuffer::oamlBuffer(), ophBuffer(), oamlBuffer::writeout(), and writeout().

int ophBuffer::has_end
protected

Definition at line 88 of file ophBuffer.h.

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

Referenced by addEoB(), prepare_next(), ogzBuffer::writeout(), olzoBuffer::writeout(), oamlBuffer::writeout(), and writeout().

unsigned int ophBuffer::left
protected

Definition at line 81 of file ophBuffer.h.

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

Referenced by addEvent(), addFrame(), addPacket(), addRawEvent(), addUnstructPacketData(), nextEvent(), ophBuffer(), and prepare_next().

int ophBuffer::max_length
protected

Definition at line 79 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 79 of file ophBuffer.h

Referenced by ophBuffer(), and setMaxSize().

int ophBuffer::max_size
protected

Definition at line 80 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 80 of file ophBuffer.h

Referenced by getMaxSize(), nextEvent(), ophBuffer(), prepare_next(), and setMaxSize().

int ophBuffer::our_fd
protected

Definition at line 91 of file ophBuffer.h.

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

Referenced by ophBuffer(), and ~ophBuffer().

int ophBuffer::runnumber
protected

Definition at line 83 of file ophBuffer.h.

View newest version in sPHENIX GitHub at line 83 of file ophBuffer.h

Referenced by addEvent(), oamlBuffer::begin_run(), ophBuffer(), and prepare_next().

int ophBuffer::sequence
protected

Definition at line 82 of file ophBuffer.h.

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

Referenced by ophBuffer(), and prepare_next().


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