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

In This Package:

RpcEventBuilder.h
Go to the documentation of this file.
00001 #ifndef DYBDAQ_RPC_EVENT_BUILDER_H
00002 #define DYBDAQ_RPC_EVENT_BUILDER_H
00003 
00004 #include <list>
00005 #include <stdint.h>
00006 
00007 namespace DybDaq {
00008 
00009 class RecordBuffer;
00010 class RecordParser;
00011 class PackedRpcEvent;
00012 
00013 class EventBuilder
00014 {
00015     public :
00016 
00017         EventBuilder();
00018         virtual ~EventBuilder();
00019 
00020         virtual int  size();
00021         virtual bool empty();
00022         virtual int  add(RecordBuffer* record);
00023 
00024         virtual RecordBuffer* front();
00025         virtual RecordBuffer* pop_front();
00026 
00027 
00028     protected:
00029 
00030         int   m_size;
00031         std::list<RecordBuffer*> m_records;
00032 };
00033 
00034 class RpcEventBuilder : public EventBuilder
00035 {
00036     public :
00037 
00038         RpcEventBuilder(RecordParser* parser);
00039         virtual ~RpcEventBuilder();
00040 
00041         int  size();
00042         bool empty();
00043         int  add(RecordBuffer* record);
00044 
00045         RecordBuffer* front();
00046         RecordBuffer* pop_front();
00047 
00048         void  purge();
00049 
00050 
00051     private :
00052 
00053         class ElementList {
00054             public :
00055                 ElementList(int elementSize);
00056                 virtual ~ElementList();
00057 
00058                 bool empty();
00059                 uint32_t* front();
00060                 uint32_t* pre_front();
00061                 void pop_front();
00062                 void push_back(const uint32_t* element);
00063 
00064             private :
00065                 typedef std::list<uint32_t*>::iterator element_iterator;
00066 
00067                 int                  m_elementsSize;
00068                 std::list<uint32_t*> m_elements;
00069                 element_iterator     m_begin;
00070                 element_iterator     m_end;
00071 
00072                 ElementList();
00073         };
00074 
00075     private :
00076 
00077         void  tryPack(bool forced = false);
00078 
00079         ElementList**  m_rtm;
00080         ElementList*** m_fec;
00081 
00082         int            m_totRtm;
00083         int            m_totFec;
00084 
00085         bool             m_fresh;
00086         RecordParser*    m_parser;
00087         PackedRpcEvent*  m_target;
00088 
00089         RpcEventBuilder();  //is not supported
00090 };
00091 
00092 }  // namespace DybDaq
00093 #endif
| 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