/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Private Types | Private Member Functions | Private Attributes
DybDaq::RpcEventBuilder::ElementList Class Reference

List of all members.

Public Member Functions

 ElementList (int elementSize)
virtual ~ElementList ()
bool empty ()
uint32_t * front ()
uint32_t * pre_front ()
void pop_front ()
void push_back (const uint32_t *element)

Private Types

typedef std::list< uint32_t * >
::iterator 
element_iterator

Private Member Functions

 ElementList ()

Private Attributes

int m_elementsSize
std::list< uint32_t * > m_elements
element_iterator m_begin
element_iterator m_end

Detailed Description

Definition at line 53 of file RpcEventBuilder.h.


Member Typedef Documentation

typedef std::list<uint32_t*>::iterator DybDaq::RpcEventBuilder::ElementList::element_iterator [private]

Definition at line 65 of file RpcEventBuilder.h.


Constructor & Destructor Documentation

RpcEventBuilder::ElementList::ElementList ( int  elementSize)

Definition at line 75 of file RpcEventBuilder.cc.

    : m_elementsSize(elementSize)
{
    for ( int i = 0; i < 16; ++i ) {
        m_elements.push_back(new uint32_t[elementSize]);
    }
    m_begin = m_elements.begin();
    m_end   = m_elements.begin();
}
RpcEventBuilder::ElementList::~ElementList ( ) [virtual]

Definition at line 85 of file RpcEventBuilder.cc.

{
    element_iterator it = m_elements.begin();
    while ( it != m_elements.end() ) {
        delete [] (*it);
        ++it;
    }
}
DybDaq::RpcEventBuilder::ElementList::ElementList ( ) [private]

Member Function Documentation

bool RpcEventBuilder::ElementList::empty ( )

Definition at line 94 of file RpcEventBuilder.cc.

{
    return (m_begin == m_end);
}
uint32_t * RpcEventBuilder::ElementList::front ( )

Definition at line 99 of file RpcEventBuilder.cc.

{
    if ( m_begin != m_end ) {
        return *m_begin;
    }
    return 0;
}
uint32_t * RpcEventBuilder::ElementList::pre_front ( )

Definition at line 107 of file RpcEventBuilder.cc.

{
    if ( m_begin != m_elements.begin() ) {
        --m_begin;
        uint32_t* result = *m_begin;
        ++m_begin;
        return result;
    }
    return m_elements.back();
}
void RpcEventBuilder::ElementList::pop_front ( )

Definition at line 118 of file RpcEventBuilder.cc.

{
    if ( (m_begin != m_end) ) {
        ++m_begin;
        if ( m_begin == m_elements.end() ) {
            m_begin = m_elements.begin();
        }
    }
}
void RpcEventBuilder::ElementList::push_back ( const uint32_t *  element)

Definition at line 128 of file RpcEventBuilder.cc.

{
    element_iterator bak = m_end++;
    if ( m_end == m_elements.end() ) {
        m_end = m_elements.begin();
    }
    if ( m_end == m_begin ) {
        m_end = bak;
        bak = m_elements.insert(bak, new uint32_t[m_elementsSize]);
    }
    memcpy(*bak, element, m_elementsSize*sizeof(uint32_t));
}

Member Data Documentation

Definition at line 67 of file RpcEventBuilder.h.

std::list<uint32_t*> DybDaq::RpcEventBuilder::ElementList::m_elements [private]

Definition at line 68 of file RpcEventBuilder.h.

Definition at line 69 of file RpcEventBuilder.h.

Definition at line 70 of file RpcEventBuilder.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:52:46 for RawRecordPool by doxygen 1.7.4