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

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

+ Inheritance diagram for ospBuffer:
+ Collaboration diagram for ospBuffer:

Public Member Functions

 ospBuffer ()
 
 ospBuffer (const char *filename, PHDWORD *where, const int length, int &status, const int irun, const int iseq)
 
 ospBuffer (int fdin, PHDWORD *where, const int length, const int irun=1, const int iseq=0)
 
 ~ospBuffer ()
 
int nextEvent (const unsigned int evtsize, const int etype, const int evtseq)
 
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

int _broken
 
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
 
ospEventcurrent_event
 
int eventsequence
 
int current_etype
 
int has_end
 
int dirty
 
int fd
 
int our_fd
 
int good_object
 

Detailed Description

Definition at line 8 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 8 of file ospBuffer.h

Constructor & Destructor Documentation

ospBuffer::ospBuffer ( )
inline

Definition at line 14 of file ospBuffer.h.

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

ospBuffer::ospBuffer ( const char *  filename,
PHDWORD where,
const int  length,
int &  status,
const int  irun,
const int  iseq 
)

Definition at line 19 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 19 of file ospBuffer.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, G4BARRELHCAL::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:

ospBuffer::ospBuffer ( int  fdin,
PHDWORD where,
const int  length,
const int  irun = 1,
const int  iseq = 0 
)

Definition at line 53 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 53 of file ospBuffer.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, G4BARRELHCAL::length, max_length, max_size, our_fd, prepare_next(), oBuffer::buffer_ptr::Runnr, runnumber, and sequence.

+ Here is the call graph for this function:

ospBuffer::~ospBuffer ( )

Definition at line 357 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 357 of file ospBuffer.cc

References fd, our_fd, and writeout().

+ Here is the call graph for this function:

Member Function Documentation

int ospBuffer::addEoB ( )
virtual

Implements oBuffer.

Definition at line 344 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 344 of file ospBuffer.cc

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

Referenced by writeout().

+ Here is the caller graph for this function:

int ospBuffer::addEvent ( Event Evt)
virtual

Implements oBuffer.

Definition at line 144 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 144 of file ospBuffer.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 ospBuffer::addFrame ( PHDWORD )
inlinevirtual

Reimplemented from oBuffer.

Definition at line 35 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 35 of file ospBuffer.h

int ospBuffer::addPacket ( const Packet p)
virtual

Implements oBuffer.

Definition at line 173 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 173 of file ospBuffer.cc

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

+ Here is the call graph for this function:

int ospBuffer::addRawEvent ( unsigned int *  data)
virtual

Implements oBuffer.

Definition at line 117 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 117 of file ospBuffer.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 ospBuffer::addUnstructPacketData ( PHDWORD data,
const int  length,
const int  id,
const int  wordsize,
const int  hitformat 
)
virtual

Implements oBuffer.

Definition at line 194 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 194 of file ospBuffer.cc

References ospEvent::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 ospBuffer::getBytesWritten ( ) const
virtual

Implements oBuffer.

Definition at line 263 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 263 of file ospBuffer.cc

References byteswritten.

int ospBuffer::getMaxSize ( ) const
virtual

Implements oBuffer.

Definition at line 257 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 257 of file ospBuffer.cc

References max_size.

int ospBuffer::nextEvent ( const unsigned int  evtsize,
const int  etype,
const int  evtseq 
)
virtual

Implements oBuffer.

Definition at line 79 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 79 of file ospBuffer.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().

+ Here is the call graph for this function:

int ospBuffer::prepare_next ( )
protected

Definition at line 222 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 222 of file ospBuffer.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 ospBuffer().

+ Here is the caller graph for this function:

int ospBuffer::setMaxSize ( const int  size)
virtual

Implements oBuffer.

Definition at line 240 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 240 of file ospBuffer.cc

References BUFFERBLOCKSIZE, max_length, and max_size.

int ospBuffer::writeout ( )
virtual

Implements oBuffer.

Definition at line 271 of file ospBuffer.cc.

View newest version in sPHENIX GitHub at line 271 of file ospBuffer.cc

References addEoB(), bptr, BUFFERBLOCKSIZE, byteswritten, dirty, fd, good_object, has_end, ip(), n, and tree::write().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int ospBuffer::_broken
protected

Definition at line 62 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 62 of file ospBuffer.h

buffer_ptr ospBuffer::bptr
protected

Definition at line 66 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 66 of file ospBuffer.h

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

buffer_ptr ospBuffer::bptr0
protected

Definition at line 69 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 69 of file ospBuffer.h

buffer_ptr ospBuffer::bptr1
protected

Definition at line 70 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 70 of file ospBuffer.h

buffer_ptr ospBuffer::bptr_being_written
protected

Definition at line 67 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 67 of file ospBuffer.h

unsigned long long ospBuffer::byteswritten
protected

Definition at line 78 of file ospBuffer.h.

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

Referenced by getBytesWritten(), ospBuffer(), and writeout().

int ospBuffer::current_etype
protected

Definition at line 81 of file ospBuffer.h.

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

Referenced by nextEvent(), and ospBuffer().

ospEvent* ospBuffer::current_event
protected

Definition at line 79 of file ospBuffer.h.

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

Referenced by addPacket(), addUnstructPacketData(), nextEvent(), and ospBuffer().

int ospBuffer::current_index
protected

Definition at line 72 of file ospBuffer.h.

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

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

PHDWORD* ospBuffer::data_ptr
protected

Definition at line 71 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 71 of file ospBuffer.h

Referenced by ospBuffer().

int ospBuffer::dirty
protected

Definition at line 83 of file ospBuffer.h.

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

Referenced by addEvent(), addRawEvent(), nextEvent(), prepare_next(), and writeout().

int ospBuffer::eventsequence
protected

Definition at line 80 of file ospBuffer.h.

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

Referenced by nextEvent(), and ospBuffer().

int ospBuffer::fd
protected

Definition at line 84 of file ospBuffer.h.

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

Referenced by ospBuffer(), writeout(), and ~ospBuffer().

int ospBuffer::good_object
protected

Definition at line 86 of file ospBuffer.h.

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

Referenced by addEvent(), addPacket(), addRawEvent(), addUnstructPacketData(), ospBuffer(), and writeout().

int ospBuffer::has_end
protected

Definition at line 82 of file ospBuffer.h.

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

Referenced by addEoB(), prepare_next(), and writeout().

unsigned int ospBuffer::left
protected

Definition at line 75 of file ospBuffer.h.

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

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

int ospBuffer::max_length
protected

Definition at line 73 of file ospBuffer.h.

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

Referenced by ospBuffer(), and setMaxSize().

int ospBuffer::max_size
protected

Definition at line 74 of file ospBuffer.h.

View newest version in sPHENIX GitHub at line 74 of file ospBuffer.h

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

int ospBuffer::our_fd
protected

Definition at line 85 of file ospBuffer.h.

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

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

int ospBuffer::runnumber
protected

Definition at line 77 of file ospBuffer.h.

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

Referenced by addEvent(), ospBuffer(), and prepare_next().

int ospBuffer::sequence
protected

Definition at line 76 of file ospBuffer.h.

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

Referenced by ospBuffer(), and prepare_next().


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