#include <ROBFragment.h>
Public Member Functions | |
const eformat::write::node_t * | bind (void) const |
const eformat::write::node_t * | bind (void) const |
uint32_t | meta_size_word (void) const |
uint32_t | meta_size_word (void) const |
uint16_t | minor_version (void) const |
void | minor_version (uint16_t v) |
uint16_t | minor_version (void) const |
void | minor_version (uint16_t v) |
const ROBFragment * | next (void) const |
void | next (const ROBFragment *n) |
const ROBFragment * | next (void) const |
void | next (const ROBFragment *n) |
uint32_t | nstatus (void) const |
uint32_t | nstatus (void) const |
ROBFragment & | operator= (const ROBFragment &other) |
ROBFragment & | operator= (const ROBFragment &other) |
uint32_t | page_count (void) const |
uint32_t | page_count (void) const |
const ROSFragment * | parent (void) const |
void | parent (eformat::write::ROSFragment *ros) |
const ROSFragment * | parent (void) const |
void | parent (eformat::write::ROSFragment *ros) |
ROBFragment (uint32_t *rob) | |
ROBFragment (uint32_t *rod, uint32_t size_word) | |
ROBFragment (const ROBFragment &other) | |
ROBFragment () | |
ROBFragment (uint32_t source_id, uint32_t run_no, uint32_t lvl1_id, uint32_t bc_id, uint32_t lvl1_type, uint32_t detev_type, uint32_t ndata, const uint32_t *data, uint32_t status_position) | |
ROBFragment (uint32_t *rob) | |
ROBFragment (uint32_t *rod, uint32_t size_word) | |
ROBFragment (const ROBFragment &other) | |
ROBFragment () | |
ROBFragment (uint32_t source_id, uint32_t run_no, uint32_t lvl1_id, uint32_t bc_id, uint32_t lvl1_type, uint32_t detev_type, uint32_t ndata, const uint32_t *data, uint32_t status_position) | |
uint32_t | rod_bc_id (void) const |
void | rod_bc_id (uint32_t s) |
uint32_t | rod_bc_id (void) const |
void | rod_bc_id (uint32_t s) |
const uint32_t * | rod_data (void) const |
void | rod_data (uint32_t n, const uint32_t *data) |
const uint32_t * | rod_data (void) const |
void | rod_data (uint32_t n, const uint32_t *data) |
uint32_t | rod_detev_type (void) const |
void | rod_detev_type (uint32_t s) |
uint32_t | rod_detev_type (void) const |
void | rod_detev_type (uint32_t s) |
uint32_t | rod_lvl1_id (void) const |
void | rod_lvl1_id (uint32_t s) |
uint32_t | rod_lvl1_id (void) const |
void | rod_lvl1_id (uint32_t s) |
uint32_t | rod_lvl1_type (void) const |
void | rod_lvl1_type (uint32_t s) |
uint32_t | rod_lvl1_type (void) const |
void | rod_lvl1_type (uint32_t s) |
void | rod_minor_version (uint16_t v) |
void | rod_minor_version (uint16_t v) |
uint32_t | rod_ndata (void) const |
uint32_t | rod_ndata (void) const |
uint32_t | rod_nstatus (void) const |
uint32_t | rod_nstatus (void) const |
uint32_t | rod_run_no (void) const |
void | rod_run_no (uint32_t s) |
uint32_t | rod_run_no (void) const |
void | rod_run_no (uint32_t s) |
const uint32_t * | rod_status (void) const |
void | rod_status (uint32_t n, const uint32_t *status) |
const uint32_t * | rod_status (void) const |
void | rod_status (uint32_t n, const uint32_t *status) |
uint32_t | size_word (void) const |
uint32_t | size_word (void) const |
uint32_t | source_id (void) const |
void | source_id (uint32_t s) |
uint32_t | source_id (void) const |
void | source_id (uint32_t s) |
const uint32_t * | status (void) const |
void | status (uint32_t n, const uint32_t *status) |
const uint32_t * | status (void) const |
void | status (uint32_t n, const uint32_t *status) |
uint32_t | status_position (void) const |
void | status_position (uint32_t v) |
uint32_t | status_position (void) const |
void | status_position (uint32_t v) |
virtual | ~ROBFragment () |
virtual | ~ROBFragment () |
Private Attributes | |
uint32_t | m_header [7] |
The ROB Header. | |
const eformat::write::ROBFragment * | m_next |
Next sibling. | |
const eformat::write::ROBFragment * | m_next |
Next sibling. | |
eformat::write::node_t | m_node [7] |
Node representation. | |
eformat::write::ROSFragment * | m_parent |
My parent. | |
eformat::write::ROSFragment * | m_parent |
My parent. | |
uint32_t | m_rod_header [9] |
The ROD Header. | |
uint32_t | m_rod_trailer [3] |
The ROD trailer. |
|
Builds a new ROB fragment from scratch
00028 : m_parent(0), 00029 m_next(0) 00030 { 00031 m_header[0] = eformat::ROB; //marker 00032 m_header[1] = 21 + ndata; //total fragment size in words 00033 m_header[2] = 8; //this header size + status size 00034 m_header[3] = eformat::DEFAULT_VERSION; //format version 00035 m_header[4] = source_id; 00036 m_header[5] = 1; //number of status 00037 m_header[6] = 0; //number of fragment specific 00038 m_rod_header[0] = eformat::ROD; //ROD marker 00039 m_rod_header[1] = 9; //ROD header size 00040 m_rod_header[2] = eformat::DEFAULT_VERSION; //format version 00041 m_rod_header[3] = source_id; 00042 m_rod_header[4] = run_no; 00043 m_rod_header[5] = lvl1_id; 00044 m_rod_header[6] = bc_id; 00045 m_rod_header[7] = lvl1_type; 00046 m_rod_header[8] = detev_type; 00047 m_rod_trailer[0] = 1; //number of status in the ROD 00048 m_rod_trailer[1] = ndata; //number of data words in the ROD 00049 m_rod_trailer[2] = status_position; 00050 00051 //now initialize pages 00052 set(m_node[0], m_header, 6, &m_node[1]); 00053 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]); 00054 set(m_node[2], &m_header[6], 1, &m_node[3]); //specific part 00055 if (m_rod_trailer[2] == eformat::STATUS_FRONT) { 00056 set(m_node[3], m_rod_header, 9, &m_node[4]); 00057 set(m_node[4], &eformat::DEFAULT_STATUS, 1, &m_node[5]); //status 00058 set(m_node[5], data, ndata, &m_node[6]); //data 00059 } 00060 else { 00061 set(m_node[3], m_rod_header, 9, &m_node[5]); 00062 set(m_node[5], data, ndata, &m_node[4]); //data 00063 set(m_node[4], &eformat::DEFAULT_STATUS, 1, &m_node[6]); //status 00064 } 00065 set(m_node[6], m_rod_trailer, 3, 0); 00066 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d", 00067 "Built (write) rob/rod fragment from scratch, with", 00068 ROBFragment::source_id(), rod_lvl1_id(), rod_run_no()); 00069 }
|
|
Builds a new "empty" ROB fragment, otherwise invalid. Use the methods bellow to set its fields. This is useful to pre-allocate objects of this class in the stack and later use them by assigment. Another option are standard containers, that demand the contained classes to have this method. 00072 : m_parent(0), 00073 m_next(0) 00074 { 00075 m_header[0] = eformat::ROB; //marker 00076 m_header[1] = 21; 00077 m_header[2] = 8; //this header size + status size 00078 m_header[3] = eformat::DEFAULT_VERSION; //format version 00079 m_header[4] = 0; //source identifier of the ROB fragment 00080 m_header[5] = 1; //number of status 00081 m_header[6] = 0; //number of fragment specific 00082 m_rod_header[0] = eformat::ROD; //ROD marker 00083 m_rod_header[1] = 9; //ROD header size 00084 m_rod_header[2] = eformat::DEFAULT_VERSION; //format version 00085 m_rod_header[3] = 0; //source identifier of the ROD fragment 00086 m_rod_header[4] = 0; //run number 00087 m_rod_header[5] = 0; //LVL1 identifier 00088 m_rod_header[6] = 0; //bunch crossing identifier 00089 m_rod_header[7] = 0; //LVL1 type 00090 m_rod_header[8] = 0; //detector event type 00091 m_rod_trailer[0] = 1; //number of status in the ROD 00092 m_rod_trailer[1] = 0; //number of data words in the ROD 00093 m_rod_trailer[2] = eformat::STATUS_FRONT; //status block position 00094 00095 //now initialize pages 00096 set(m_node[0], m_header, 6, &m_node[1]); 00097 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]); 00098 set(m_node[2], &m_header[6], 1, &m_node[3]); //specific part 00099 if (m_rod_trailer[2] == eformat::STATUS_FRONT) { 00100 set(m_node[3], m_rod_header, 9, &m_node[4]); 00101 set(m_node[4], &eformat::DEFAULT_STATUS, 1, &m_node[5]); //status 00102 set(m_node[5], 0, 0, &m_node[6]); //data 00103 } 00104 else { 00105 set(m_node[3], m_rod_header, 9, &m_node[5]); 00106 set(m_node[5], 0, 0, &m_node[4]); //data 00107 set(m_node[4], &eformat::DEFAULT_STATUS, 1, &m_node[6]); //status 00108 } 00109 set(m_node[6], m_rod_trailer, 3, 0); 00110 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d", 00111 "Built (write) empty rob/rod fragment, with", 00112 ROBFragment::source_id(), rod_lvl1_id(), rod_run_no()); 00113 }
|
|
Copy constructor. This will perform a shallow copy of the fragment. In this case, the data and status blocks are not copied, only the meta information, i.e., all but the payload of the underlying ROD fragment and non-variable data blocks are copied. If you wish to have the data/status copied, you have to copy it manually yourself and set the data pointer with the rod_data() and status() and rod_status() methods. The parent fragment remains unset, and you have to append this fragment manually after creation. Binding also doesn't take place.
00117 : m_parent(0), 00118 m_next(0) 00119 { 00120 *this = other; 00121 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d", 00122 "Built new (write) rob/rod fragment from copy, with", 00123 ROBFragment::source_id(), rod_lvl1_id(), rod_run_no()); 00124 }
|
|
Builds a new ROB fragment from scratch, starting from an existing ROD fragment as basis.
00127 : m_parent(0), 00128 m_next(0) 00129 { 00130 m_header[0] = eformat::ROB; //marker 00131 m_header[1] = 8 + size_word; //total fragment size in words 00132 m_header[2] = 8; //this header size + status size 00133 m_header[3] = eformat::DEFAULT_VERSION; //format version 00134 m_header[4] = rod[3]; 00135 m_header[5] = 1; //number of status 00136 m_header[6] = 0; //number of fragment specific 00137 00138 //now initialize pages 00139 set(m_node[0], m_header, 6, &m_node[1]); 00140 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]); 00141 set(m_node[2], &m_header[6], 1, &m_node[3]); 00142 set(m_node[6], &rod[size_word-3], 3, 0); //ROD trailer 00143 if (m_node[6].base[2] == eformat::STATUS_FRONT) { 00144 set(m_node[3], rod, 9, &m_node[4]); //ROD header 00145 set(m_node[4], &rod[9], m_node[6].base[0], &m_node[5]); //status 00146 set(m_node[5], &rod[9+m_node[6].base[0]], m_node[6].base[1], &m_node[6]); 00147 } 00148 else { 00149 set(m_node[3], rod, 9, &m_node[5]); //ROD header 00150 set(m_node[4], &rod[9+m_node[6].base[1]], m_node[6].base[0], &m_node[6]); 00151 set(m_node[5], &rod[9], m_node[6].base[1], &m_node[4]); //data 00152 } 00153 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d", 00154 "Built (write) rob/rod fragment from rod on memory, with", 00155 source_id(), rod_lvl1_id(), rod_run_no()); 00156 }
|
|
Builds a new ROB fragment from an existing ROB fragment in contiguous memory
00159 : m_parent(0), 00160 m_next(0) 00161 { 00162 //now initialize pages 00163 set(m_node[0], rob, 6, &m_node[1]); 00164 set(m_node[1], &rob[6], rob[5], &m_node[2]); 00165 set(m_node[2], &rob[6+rob[5]], 1, &m_node[3]); 00166 set(m_node[6], &rob[rob[1]-3], 3, 0); //ROD trailer 00167 if (m_node[6].base[2] == eformat::STATUS_FRONT) { 00168 set(m_node[3], &rob[rob[2]], 9, &m_node[4]); //ROD header 00169 set(m_node[4], &rob[rob[2]+9], m_node[6].base[0], &m_node[5]); //status 00170 set(m_node[5], &rob[rob[2]+9+m_node[6].base[0]], m_node[6].base[1], 00171 &m_node[6]); //data 00172 } 00173 else { 00174 set(m_node[3], &rob[rob[2]], 9, &m_node[5]); //ROD header 00175 set(m_node[4], &rob[rob[2]+9+m_node[6].base[1]], m_node[6].base[0], 00176 &m_node[6]); 00177 set(m_node[5], &rob[rob[2]+9], m_node[6].base[1], &m_node[4]); //data 00178 } 00179 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d", 00180 "Built (write) rob/rod fragment from cont. memory, with", 00181 source_id(), rod_lvl1_id(), rod_run_no()); 00182 }
|
|
Base destructor 00107 {}
|
|
Builds a new ROB fragment from scratch
|
|
Builds a new "empty" ROB fragment, otherwise invalid. Use the methods bellow to set its fields. This is useful to pre-allocate objects of this class in the stack and later use them by assigment. Another option are standard containers, that demand the contained classes to have this method. |
|
Copy constructor. This will perform a shallow copy of the fragment. In this case, the data and status blocks are not copied, only the meta information, i.e., all but the payload of the underlying ROD fragment and non-variable data blocks are copied. If you wish to have the data/status copied, you have to copy it manually yourself and set the data pointer with the rod_data() and status() and rod_status() methods. The parent fragment remains unset, and you have to append this fragment manually after creation. Binding also doesn't take place.
|
|
Builds a new ROB fragment from scratch, starting from an existing ROD fragment as basis.
|
|
Builds a new ROB fragment from an existing ROB fragment in contiguous memory
|
|
Base destructor 00107 {}
|
|
Outputs a concatenation of eformat::write::node making up a list with the contents of this ROB fragment. 00328 { return m_node; }
|
|
Outputs a concatenation of eformat::write::node making up a list with the contents of this ROB fragment. 00328 { return m_node; }
|
|
Returns the total size for the meta data (everything that does not encompass the contents of the m_data pointer in the private representation of this class) in the fragment, in words
|
|
Returns the total size for the meta data (everything that does not encompass the contents of the m_data pointer in the private representation of this class) in the fragment, in words
|
|
Returns the minor version number of the fragment
|
|
Changes the minor version number of the fragment
|
|
Returns the minor version number of the fragment
|
|
Changes the minor version number of the fragment
|
|
Returns the next sibling 00353 { return m_next; }
|
|
Sets the next sibling
00348 { m_next = n; }
|
|
Returns the next sibling 00353 { return m_next; }
|
|
Sets the next sibling
00348 { m_next = n; }
|
|
Returns the number of status wors in this fragment
|
|
Returns the number of status wors in this fragment
|
|
Assignment operator. This will perform a shallow copy of the fragment. In this case, the data and status blocks are not copied, only the meta information, i.e., all but the payload of the underlying ROD fragment and non-variable data blocks are copied. If you wish to have the data/status copied, you have to copy it manually yourself and set the data pointer with the rod_data() and status() and rod_status() methods. The parent fragment is not changed in this operation. Previous binding operations remain valid after assignment.
|
|
Assignment operator. This will perform a shallow copy of the fragment. In this case, the data and status blocks are not copied, only the meta information, i.e., all but the payload of the underlying ROD fragment and non-variable data blocks are copied. If you wish to have the data/status copied, you have to copy it manually yourself and set the data pointer with the rod_data() and status() and rod_status() methods. The parent fragment is not changed in this operation. Previous binding operations remain valid after assignment.
00186 { 00187 //get the ROB header 00188 memcpy(reinterpret_cast<void*>(m_header), 00189 reinterpret_cast<const void*>(other.m_node[0].base), 00190 6*sizeof(uint32_t)); 00191 m_header[6] = other.m_node[2].base[0]; 00192 memcpy(reinterpret_cast<void*>(m_rod_header), 00193 reinterpret_cast<const void*>(other.m_node[3].base), 00194 9*sizeof(uint32_t)); 00195 memcpy(reinterpret_cast<void*>(m_rod_trailer), 00196 reinterpret_cast<const void*>(other.m_node[6].base), 00197 3*sizeof(uint32_t)); 00198 00199 //now re-initialize the pages 00200 set(m_node[0], m_header, 6, &m_node[1]); 00201 set(m_node[1], other.m_node[1].base, other.m_node[1].size_word, &m_node[2]); 00202 set(m_node[2], &m_header[6], 1, &m_node[3]); //specific part 00203 if (m_rod_trailer[2] == eformat::STATUS_FRONT) { 00204 set(m_node[3], m_rod_header, 9, &m_node[4]); 00205 set(m_node[4], other.m_node[4].base, 00206 other.m_node[4].size_word, &m_node[5]); //status 00207 set(m_node[5], other.m_node[5].base, 00208 other.m_node[5].size_word, &m_node[6]); //data 00209 } 00210 else { 00211 set(m_node[3], m_rod_header, 9, &m_node[5]); 00212 set(m_node[5], other.m_node[5].base, 00213 other.m_node[5].size_word, &m_node[4]); //data 00214 set(m_node[4], other.m_node[4].base, 00215 other.m_node[4].size_word, &m_node[6]); //status 00216 } 00217 set(m_node[6], m_rod_trailer, 3, 0); 00218 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d", 00219 "Copied (write) rob/rod fragment with", 00220 ROBFragment::source_id(), rod_lvl1_id(), rod_run_no()); 00221 00222 return *this; 00223 }
|
|
Returns the number of pages of memory I have 00321 { return 7; }
|
|
Returns the number of pages of memory I have 00321 { return 7; }
|
|
This returns the parent fragment 00341 { return m_parent; }
|
|
This sets the parent fragment
00336 { m_parent = ros; }
|
|
This returns the parent fragment 00341 { return m_parent; }
|
|
This sets the parent fragment
00336 { m_parent = ros; }
|
|
Returns the bunch crossing identifier for the ROD fragment
|
|
Changes the bunch crossing identifier in the ROD fragment
|
|
Returns the bunch crossing identifier for the ROD fragment
|
|
Changes the bunch crossing identifier in the ROD fragment
|
|
Returns a pointer to the first of the data words at the ROD fragment
|
|
Changes the number of data words and the data words themselves from the ROD fragment
|
|
Returns a pointer to the first of the data words at the ROD fragment
|
|
Changes the number of data words and the data words themselves from the ROD fragment
00265 { 00266 if (m_parent) m_parent->size_change(m_node[0].base[1], 00267 m_node[0].base[1]-m_node[6].base[1]+n); 00268 00269 //remove count from previous data size 00270 m_node[0].base[1] -= m_node[6].base[1]; 00271 m_node[5].size_word = m_node[6].base[1] = n; //set new values 00272 m_node[0].base[1] += n; //set ROB header's total fragment size back 00273 m_node[5].base = const_cast<uint32_t*>(data); 00274 }
|
|
Returns the detector event type identifier for the ROD fragment
|
|
Changes the detector event type in the ROD fragment
|
|
Returns the detector event type identifier for the ROD fragment
|
|
Changes the detector event type in the ROD fragment
|
|
Returns the lvl1 identifier for the ROD fragment
|
|
Changes the lvl1 identifier in the ROD fragment
|
|
Returns the lvl1 identifier for the ROD fragment
|
|
Changes the lvl1 identifier in the ROD fragment
|
|
Returns the lvl1 event type identifier for the ROD fragment
|
|
Changes the lvl1 trigger type in the ROD fragment
|
|
Returns the lvl1 event type identifier for the ROD fragment
|
|
Changes the lvl1 trigger type in the ROD fragment
|
|
Changes the minor version number of the underlying ROD fragment
|
|
Changes the minor version number of the underlying ROD fragment
|
|
Returns the number of data words at the ROD fragment
|
|
Returns the number of data words at the ROD fragment
|
|
Returns the number of status wors in this fragment
|
|
Returns the number of status wors in this fragment
|
|
Returns the run number for the ROD fragment
|
|
Changes the run number for the ROD fragment
|
|
Returns the run number for the ROD fragment
|
|
Changes the run number for the ROD fragment
|
|
Returns a pointer to the first ROD status word to be used by this fragment
|
|
Changes the number of status words and the status words themselves from the ROD fragment
|
|
Returns a pointer to the first ROD status word to be used by this fragment
|
|
Changes the number of status words and the status words themselves from the ROD fragment
00239 { 00240 if (m_parent) m_parent->size_change(m_node[0].base[1], 00241 m_node[0].base[1]-m_node[6].base[0]+n); 00242 m_node[0].base[1] -= m_node[6].base[0]; //remove count from previous status 00243 m_node[4].size_word = m_node[6].base[0] = n; //set new values 00244 m_node[0].base[1] += n; //set ROB header's total fragment size 00245 m_node[4].base = const_cast<uint32_t*>(status); 00246 }
|
|
Returns the total size for this fragment, in words 00316 { return meta_size_word() + m_node[6].base[1]; }
|
|
Returns the total size for this fragment, in words 00316 { return meta_size_word() + m_node[6].base[1]; }
|
|
Returns the source identifier for both the ROB and the ROD fragments
|
|
Changes the source identifier for both the ROB and the ROD fragments
|
|
Returns the source identifier for both the ROB and the ROD fragments
|
|
Changes the source identifier for both the ROB and the ROD fragments
|
|
Returns a pointer to the first status word to be used by this fragment
|
|
Changes the number of status words and the status words themselves from the fragment
|
|
Returns a pointer to the first status word to be used by this fragment
|
|
Changes the number of status words and the status words themselves from the fragment
00226 { 00227 if (m_parent) m_parent->size_change(m_node[0].base[1], 00228 m_node[0].base[1]-m_node[0].base[5]+n); 00229 m_node[0].base[1] -= m_node[0].base[5]; //remove count from previous status 00230 m_node[0].base[2] -= m_node[0].base[5]; //remove count from previous status 00231 m_node[1].size_word = m_node[0].base[5] = n; //set new values 00232 m_node[0].base[1] += n; 00233 m_node[0].base[2] += n; 00234 m_node[1].base = const_cast<uint32_t*>(status); 00235 }
|
|
Returns the current status position
|
|
Changes the order of the status and data blocks in the ROD fragment
|
|
Returns the current status position
|
|
Changes the order of the status and data blocks in the ROD fragment
00249 { 00250 if (v == m_node[6].base[2]) return; //do nothing in this case:) 00251 m_node[6].base[2] = v; 00252 if (m_node[6].base[2] == eformat::STATUS_FRONT) { 00253 m_node[3].next = &m_node[4]; 00254 m_node[4].next = &m_node[5]; 00255 m_node[5].next = &m_node[6]; 00256 } 00257 else { 00258 m_node[3].next = &m_node[5]; 00259 m_node[5].next = &m_node[4]; 00260 m_node[4].next = &m_node[6]; 00261 } 00262 }
|
|
The ROB Header.
|
|
Next sibling.
|
|
Next sibling.
|
|
Node representation.
|
|
My parent.
|
|
My parent.
|
|
The ROD Header.
|
|
The ROD trailer.
|