Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

SctApi::PrimListWrapper Struct Reference

Wrap the SctPixelRod::RodPrimList class. More...

#include <primListWrapper.h>


Public Member Functions

 PrimListWrapper ()
 Create a default RodPrimList.

 PrimListWrapper (unsigned int index)
 A RodPrimList with a particular index.

void clear ()
 Clear all datastructures.

void addPrimitive (const SctPixelRod::RodPrimitive &prim, long *data=0)
 If data is non zero then take ownership of the provided memory block.

void addPrimitive (long length, long index, long prim, long rev, const long *data)
 Copy and keep data to end of life.


Data Fields

std::auto_ptr< SctPixelRod::RodPrimListlist
std::list< long * > data


Detailed Description

Wrap the SctPixelRod::RodPrimList class.

Why? When a RodPrimitive is created a buffer containing the primitive is passed to the constructor. This remains under the ownership of the caller, but is used by RodPrimitive, and especially RodPrimList in the call buildList.

PrimListWrapper allows the caller to pass ownership, so the memory buffer isn't leaked.

Definition at line 24 of file primListWrapper.h.


Constructor & Destructor Documentation

SctApi::PrimListWrapper::PrimListWrapper  ) 
 

Create a default RodPrimList.

SctApi::PrimListWrapper::PrimListWrapper unsigned int  index  ) 
 

A RodPrimList with a particular index.


Member Function Documentation

void SctApi::PrimListWrapper::addPrimitive long  length,
long  index,
long  prim,
long  rev,
const long *  data
 

Copy and keep data to end of life.

Parameters:
length Length of data (ie primLength - 4)
index Id of primitive in primList
prim Primitive identifier
rev Primitive revision number
data Contents of primitive. Ownership remains with the caller.

void SctApi::PrimListWrapper::addPrimitive const SctPixelRod::RodPrimitive &  prim,
long *  data = 0
 

If data is non zero then take ownership of the provided memory block.

Parameters:
prim Prebuilt primitive to add to the list
data Memory block to take ownership of (will be deleted by delete[])

void SctApi::PrimListWrapper::clear  ) 
 

Clear all datastructures.

This deletes the contents of the RodPrimList as well as all the data buffers it owns.


The documentation for this struct was generated from the following file:
Generated on Fri Jan 14 12:47:47 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5