RawEvent Class Reference

Container for a block of raw data. More...

#include <RawEvent.hh>

List of all members.

Classes

struct  datablock
 Access to data blocks. More...

Public Types

enum  datablock_type { CAEN_V172X = 0, MONTECARLO = 1 }
 

lists pre-defined types of datablock


Public Member Functions

 RawEvent (bool increment_id_counter=true)
 constructor, automatically increments event_id counter by default
 RawEvent (uint32_t event_id, uint32_t timestamp, uint32_t run_id)
 constructor, sets event_id, timestamp, and run_id explicitly
 ~RawEvent ()
 Destructor.
uint32_t GetDataSize () const
 Get the total size of this event.
size_t GetNumDataBlocks () const
 Get the total number of data blocks in this event.
int AddDataBlock (uint32_t blocktype, uint32_t datasize=0)
 Add new block at end of event, return index of that block (-1 if error).
int RemoveDataBlock (size_t block_n)
 Remove the data block number n, return 0 if success.
const datablockGetDataBlock (size_t block_n) const
 Get a const pointer to data block object block_n.
unsigned char * GetRawDataBlock (size_t block_n)
 Get a pointer to the block of raw data number block_n.
uint32_t GetDataBlockSize (size_t block_n) const
 Get the size of datablock n.
int SetDataBlockSize (size_t block_n, uint32_t newsize)
 Set or reset the size of block n. returns 0 if success.
uint32_t GetDataBlockType (size_t block_n) const
 Get the type of datablock n.
int SetDataBlockType (size_t block_n, uint32_t newtype)
 Set or reset the type of block n, returns 0 on success.
uint32_t GetID () const
 Get the id of this event.
void SetID (uint32_t evid)
 Set the id of this event.
uint32_t GetTimestamp () const
 Get the timestamp of this event.
void SetTimestamp (uint32_t stamp)
 Set the timestamp of this event.
uint32_t GetRunID () const
 Get the ID of the run this event belongs to.
void SetRunID (uint32_t runid)
 Set the run ID this event belongs to.

Static Public Member Functions

static const long GetTotalBufferSize ()
 Get the total memory taken up by all events on the heap.
static void SetEventCount (uint32_t count)
 Set the total number of events processed in this run.
static uint32_t GetEventCount ()
 Get the total number of events processed in this run.

Private Member Functions

 RawEvent (const RawEvent &right)
RawEventoperator= (const RawEvent &right)

Private Attributes

std::vector< datablock_datablocks
uint32_t _event_id
uint32_t _timestamp
uint32_t _run_id
uint32_t _buffer_size

Static Private Attributes

static const uint32_t _extra_buffer_space = 12
static long _total_buffer_size = 0
static uint32_t _event_count = 0

Detailed Description

Container for a block of raw data.

Definition at line 17 of file RawEvent.hh.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1