Classes | |
class | eformat::write::FullEventFragment |
struct | eformat::write::node_t |
class | eformat::write::ROBFragment |
class | eformat::write::ROSFragment |
class | eformat::write::SubDetectorFragment |
Typedefs | |
typedef eformat::write::node_t | node_t |
Functions | |
void | cat (node_t *n, uint32_t count) |
void | cat (node_t *n, const struct iovec *v, uint32_t count) |
uint32_t | copy (const node_t &list, uint32_t *dest, size_t max) |
uint32_t | count (const node_t &list) |
uint32_t | count_words (const node_t &list) |
void | set (node_t &i, const struct iovec &v, node_t *n=0) |
void | set (node_t &i, const uint32_t *b, size_t l, node_t *n=0) |
uint32_t | shallow_copy (const node_t &list, struct iovec *dest, uint32_t max) |
|
Defines what is a valid "I/O vector" (a.k.a. iov) node list for eformat |
|
Concatenates an already set vector of eformat::write::node_t to make up a valid list.
00037 { 00038 for (size_t i=0; i<(count-1); ++i) n[i].next = &n[i+1]; 00039 n[count-1].next = 0; 00040 }
|
|
Concatenates a set of IOV's to make up a list as required by some eformat::write functionality.
00031 { 00032 for (size_t i=0; i<(count-1); ++i) set(n[i], v[i], &n[i+1]); 00033 set(n[count-1], v[count-1], 0); 00034 }
|
|
Performs a memcpy like operation, concatenating the list given as parameter to a block of memory, as fast as possible.
00066 { 00067 const eformat::write::node_t* current = &list; 00068 uint32_t cpos = 0; 00069 while (current) { 00070 if (cpos + current->size_word > max) return 0; 00071 if (current->size_word > 0 && current->base) { 00072 memcpy(&dest[cpos], current->base, sizeof(uint32_t)*current->size_word); 00073 cpos += current->size_word; 00074 } 00075 current = current->next; 00076 } 00077 return cpos; 00078 }
|
|
Counts how many pages I'm made of
00043 { 00044 const eformat::write::node_t* current = &list; 00045 uint32_t retval = 0; 00046 while (current) { 00047 ++retval; 00048 current = current->next; 00049 } 00050 return retval; 00051 }
|
|
Count how many words I'm made of
00054 { 00055 const eformat::write::node_t* current = &list; 00056 uint32_t retval = 0; 00057 while (current) { 00058 retval += current->size_word; 00059 current = current->next; 00060 } 00061 return retval; 00062 }
|
|
Sets an IOV base values
00024 { 00025 i.base = reinterpret_cast<uint32_t*>(v.iov_base); 00026 i.size_word = v.iov_len/4; 00027 i.next = n; 00028 }
|
|
Sets an IOV base values
00017 { 00018 i.base = const_cast<uint32_t*>(b); 00019 i.size_word = l; 00020 i.next = n; 00021 }
|
|
Performs a shallow copy like operation, concatenating the list given as parameter to a vector of iovec nodes. This will only copy pointers and sizes, but not real data.
00082 { 00083 const eformat::write::node_t* current = &list; 00084 uint32_t cpos = 0; 00085 while (current) { 00086 if (cpos > max) return 0; 00087 if (current->size_word > 0 && current->base) { 00088 dest[cpos].iov_base = 00089 reinterpret_cast<void*>(const_cast<uint32_t*>(current->base)); 00090 dest[cpos].iov_len = sizeof(uint32_t)*current->size_word; 00091 ++cpos; 00092 } 00093 current = current->next; 00094 } 00095 return cpos; 00096 }
|