#include <FullEventFragment.h>
Public Member Functions | |
void | append (eformat::write::SubDetectorFragment *sd) |
void | append (eformat::write::SubDetectorFragment *sd) |
const eformat::write::node_t * | bind (void) |
const eformat::write::node_t * | bind (void) |
const uint32_t * | event_filter_info (void) const |
void | event_filter_info (const uint32_t *s) |
const uint32_t * | event_filter_info (void) const |
void | event_filter_info (const uint32_t *s) |
const SubDetectorFragment * | first_child (void) const |
const SubDetectorFragment * | first_child (void) const |
FullEventFragment (const FullEventFragment &other) | |
FullEventFragment () | |
FullEventFragment (eformat::write::node_t *fe) | |
FullEventFragment (uint32_t *fe) | |
FullEventFragment (uint32_t source_id, uint32_t use_time, uint32_t global_id, uint32_t run_no, uint32_t lvl1_id, uint32_t lvl1_type, uint32_t lvl2_info, const uint32_t *ef_info) | |
FullEventFragment (uint32_t source_id, uint32_t global_id, uint32_t run_no, uint32_t lvl1_id, uint32_t lvl1_type, uint32_t lvl2_info, const uint32_t *ef_info) | |
FullEventFragment (const FullEventFragment &other) | |
FullEventFragment () | |
FullEventFragment (eformat::write::node_t *fe) | |
FullEventFragment (uint32_t *fe) | |
FullEventFragment (uint32_t source_id, uint32_t use_time, uint32_t global_id, uint32_t run_no, uint32_t lvl1_id, uint32_t lvl1_type, uint32_t lvl2_info, const uint32_t *ef_info) | |
FullEventFragment (uint32_t source_id, uint32_t global_id, uint32_t run_no, uint32_t lvl1_id, uint32_t lvl1_type, uint32_t lvl2_info, const uint32_t *ef_info) | |
uint32_t | global_id (void) const |
void | global_id (uint32_t s) |
uint32_t | global_id (void) const |
void | global_id (uint32_t s) |
uint32_t | lvl1_id (void) const |
void | lvl1_id (uint32_t s) |
uint32_t | lvl1_id (void) const |
void | lvl1_id (uint32_t s) |
uint32_t | lvl1_trigger_type (void) const |
void | lvl1_trigger_type (uint32_t s) |
uint32_t | lvl1_trigger_type (void) const |
void | lvl1_trigger_type (uint32_t s) |
uint32_t | lvl2_trigger_info (void) const |
void | lvl2_trigger_info (uint32_t s) |
uint32_t | lvl2_trigger_info (void) const |
void | lvl2_trigger_info (uint32_t s) |
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) |
uint32_t | nstatus (void) const |
uint32_t | nstatus (void) const |
FullEventFragment & | operator= (const FullEventFragment &other) |
FullEventFragment & | operator= (const FullEventFragment &other) |
uint32_t | page_count (void) const |
uint32_t | page_count (void) const |
const eformat::write::node_t * | rebind (void) |
const eformat::write::node_t * | rebind (void) |
uint32_t | run_no (void) const |
void | run_no (uint32_t s) |
uint32_t | run_no (void) const |
void | run_no (uint32_t s) |
void | size_change (uint32_t o, uint32_t n) |
void | size_change (uint32_t o, uint32_t n) |
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 | time (void) const |
void | time (uint32_t s) |
uint32_t | time (void) const |
void | time (uint32_t s) |
virtual | ~FullEventFragment () |
virtual | ~FullEventFragment () |
Private Attributes | |
eformat::write::SubDetectorFragment * | m_child |
my children | |
eformat::write::SubDetectorFragment * | m_child |
my children | |
eformat::write::node_t | m_extra |
Extra pages I may have. | |
uint32_t | m_extra_count |
How many extra pages I have. | |
uint32_t | m_header [17] |
The FullEvent Header. | |
eformat::write::SubDetectorFragment * | m_last |
my last child | |
eformat::write::SubDetectorFragment * | m_last |
my last child | |
eformat::write::node_t | m_node [3] |
Node representation. |
|
Builds a new FullEvent fragment from scratch, using the current time as the time label.
00058 : m_child(0), 00059 m_last(0), 00060 m_extra_count(0) 00061 { 00062 m_header[0] = eformat::FULL_EVENT; //marker 00063 m_header[1] = 18; //this header size + status size 00064 m_header[2] = 18; //this header size + status size 00065 m_header[3] = eformat::DEFAULT_VERSION; //format version 00066 m_header[4] = source_id; 00067 m_header[5] = 1; //number of status 00068 m_header[6] = 10; //number of fragment specific 00069 m_header[7] = std::time(0); 00070 m_header[8] = global_id; 00071 m_header[9] = run_no; 00072 m_header[10] = lvl1_id; 00073 m_header[11] = lvl1_type; 00074 m_header[12] = lvl2_info; 00075 memcpy(&m_header[13], ef_info, 4*sizeof(uint32_t)); 00076 00077 //now initialize pages 00078 set(m_node[0], m_header, 6, &m_node[1]); 00079 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]); 00080 set(m_node[2], &m_header[6], 11, 0); 00081 ERS_DEBUG_3("%s Source Id. = 0x%x, LVL1 Id. = %d and Run Number = %d", 00082 "Built (write) full event from scratch, with", 00083 FullEventFragment::source_id(), FullEventFragment::lvl1_id(), 00084 FullEventFragment::run_no()); 00085 }
|
|
Builds a new FullEvent fragment from scratch
00025 : m_child(0), 00026 m_last(0), 00027 m_extra_count(0) 00028 { 00029 m_header[0] = eformat::FULL_EVENT; //marker 00030 m_header[1] = 18; //this header size + status size 00031 m_header[2] = 18; //this header size + status size 00032 m_header[3] = eformat::DEFAULT_VERSION; //format version 00033 m_header[4] = source_id; 00034 m_header[5] = 1; //number of status 00035 m_header[6] = 10; //number of fragment specific 00036 m_header[7] = use_time; 00037 m_header[8] = global_id; 00038 m_header[9] = run_no; 00039 m_header[10] = lvl1_id; 00040 m_header[11] = lvl1_type; 00041 m_header[12] = lvl2_info; 00042 memcpy(&m_header[13], ef_info, 4*sizeof(uint32_t)); 00043 00044 //now initialize pages 00045 set(m_node[0], m_header, 6, &m_node[1]); 00046 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]); 00047 set(m_node[2], &m_header[6], 11, 0); 00048 ERS_DEBUG_3("%s Source Id. = 0x%x, LVL1 Id. = %d and Run Number = %d", 00049 "Built (write) full event from scratch, with", 00050 FullEventFragment::source_id(), FullEventFragment::lvl1_id(), 00051 FullEventFragment::run_no()); 00052 }
|
|
Builds a new FullEvent fragment from an existing FullEvent fragment in contiguous memory.
00088 : m_child(0), 00089 m_last(0), 00090 m_extra_count(0) 00091 { 00092 //now initialize pages 00093 set(m_node[0], fe, 6, &m_node[1]); 00094 set(m_node[1], &fe[6], fe[5], &m_node[2]); 00095 set(m_node[2], &fe[6+fe[5]], 11, 0); 00096 eformat::write::set(m_extra, &fe[17+fe[5]], fe[1]-fe[2], 0); 00097 ++m_extra_count; 00098 ERS_DEBUG_3("%s Source Id. = 0x%x, LVL1 Id. = %d and Run Number = %d", 00099 "Built (write) full event from contiguos memory, with", 00100 source_id(), lvl1_id(), run_no()); 00101 }
|
|
Builds a new FullEvent fragment from an existing FullEvent fragment in non-contiguous memory. The top-level fragment header is expected to be on a contiguous area of memory, together with the first word of the first child fragment (i.e. the ROS header marker). The following data can be spread around.
00105 : m_child(0), 00106 m_last(0), 00107 m_extra_count(0) 00108 { 00109 //now initialize pages 00110 set(m_node[0], fe->base, 6, &m_node[1]); 00111 set(m_node[1], &fe->base[6], fe->base[5], &m_node[2]); 00112 set(m_node[2], &fe->base[6+fe->base[5]], 11, 0); 00113 eformat::write::set(m_extra, &fe->base[17+fe->base[5]], 00114 fe->size_word - fe->base[2], fe->next); 00115 m_extra_count += eformat::write::count(m_extra); 00116 ERS_DEBUG_3("%s Source Id. = 0x%x, LVL1 Id. = %d and Run Number = %d", 00117 "Built (write) full event from paged memory, with", 00118 source_id(), lvl1_id(), run_no()); 00119 }
|
|
Builds a new empty FullEventFragment, otherwise invalid. This is useful for array builds and standard containers. 00122 : m_child(0), 00123 m_last(0), 00124 m_extra_count(0) 00125 { 00126 m_header[0] = eformat::FULL_EVENT; //marker 00127 m_header[1] = 18; //this header size + status size 00128 m_header[2] = 18; //this header size + status size 00129 m_header[3] = eformat::DEFAULT_VERSION; //format version 00130 m_header[4] = 0; //source identifier 00131 m_header[5] = 1; //number of status 00132 m_header[6] = 10; //number of fragment specific 00133 m_header[7] = std::time(0); 00134 m_header[8] = 0; //global identifier 00135 m_header[9] = 0; //run number 00136 m_header[10] = 0; //LVL1 identifier 00137 m_header[11] = 0; //LVL1 type 00138 m_header[12] = 0; //LVL2 info 00139 m_header[13] = 0; //EF info [0] 00140 m_header[14] = 0; //EF info [1] 00141 m_header[15] = 0; //EF info [2] 00142 m_header[16] = 0; //EF info [3] 00143 00144 //now initialize pages 00145 set(m_node[0], m_header, 6, &m_node[1]); 00146 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]); 00147 set(m_node[2], &m_header[6], 11, 0); 00148 ERS_DEBUG_3("%s Source Id. = 0x%x, LVL1 Id. = %d and Run Number = %d", 00149 "Built empty (write) full event from scratch, with", 00150 FullEventFragment::source_id(), FullEventFragment::lvl1_id(), 00151 FullEventFragment::run_no()); 00152 }
|
|
Copy constructor. This will only copy the meta data, not the fragment relationships and block-data (children and status block) contained in the to-be-copied fragment. If you wish this fragment has the same children of the copied fragment, you have to do this operation manually, after copying. If you wish to make a copy of the status as well, do it manually and then assign it to this fragment using the status() method.
00156 : m_child(0), 00157 m_last(0), 00158 m_extra_count(0) 00159 { 00160 *this = other; 00161 ERS_DEBUG_3("%s Source Id. = 0x%x, LVL1 Id. = %d and Run Number = %d", 00162 "Built (write) full event from copy, with", 00163 FullEventFragment::source_id(), FullEventFragment::lvl1_id(), 00164 FullEventFragment::run_no()); 00165 }
|
|
Base destructor 00111 {}
|
|
Builds a new FullEvent fragment from scratch, using the current time as the time label.
|
|
Builds a new FullEvent fragment from scratch
|
|
Builds a new FullEvent fragment from an existing FullEvent fragment in contiguous memory.
|
|
Builds a new FullEvent fragment from an existing FullEvent fragment in non-contiguous memory. The top-level fragment header is expected to be on a contiguous area of memory, together with the first word of the first child fragment (i.e. the ROS header marker). The following data can be spread around.
|
|
Builds a new empty FullEventFragment, otherwise invalid. This is useful for array builds and standard containers. |
|
Copy constructor. This will only copy the meta data, not the fragment relationships and block-data (children and status block) contained in the to-be-copied fragment. If you wish this fragment has the same children of the copied fragment, you have to do this operation manually, after copying. If you wish to make a copy of the status as well, do it manually and then assign it to this fragment using the status() method.
|
|
Base destructor 00111 {}
|
|
Appends a new SubDetector fragment to this FullEvent fragment.
|
|
Appends a new SubDetector fragment to this FullEvent fragment.
00202 { 00203 ERS_DEBUG_3("%s Source Id. = 0x%x to full event with Source Id. = 0x%x", 00204 "Appending subdetector with", 00205 sd->source_id(), source_id()); 00206 sd->parent(this); 00207 m_node[0].base[1] += sd->size_word(); 00208 00209 //adjust `m_last' and `m_child' to point to the new last ROB 00210 if (m_last) m_last->next(sd); 00211 else m_child = sd; 00212 m_last = sd; 00213 }
|
|
Returns the first node of a list of nodes that represent the fragment you have constructed. To make use of it, just browse the list as defined in node.h |
|
Returns the first node of a list of nodes that represent the fragment you have constructed. To make use of it, just browse the list as defined in node.h 00225 { 00226 //the header is already concatenated by construction 00227 eformat::write::node_t* last = &m_node[2]; 00228 if (m_extra_count) { 00229 last = &m_extra; 00230 while (last->next) last = last->next; 00231 } 00232 for (SubDetectorFragment* curr = m_child; curr; 00233 curr = const_cast<SubDetectorFragment*>(curr->next())) { 00234 last->next = const_cast<eformat::write::node_t*>(curr->bind()); 00235 while (last->next) last = last->next; //advance until end 00236 } 00237 return m_node; 00238 }
|
|
Returns the event filter trigger info for this fragment
|
|
Changes the event filter trigger info in this fragment
00264 { memcpy(&m_node[2].base[7], s, 4*sizeof(uint32_t)); }
|
|
Returns the event filter trigger info for this fragment
|
|
Changes the event filter trigger info in this fragment
00264 { memcpy(&m_node[2].base[7], s, 4*sizeof(uint32_t)); }
|
|
This returns the first child of this fragment. The system operates as a concatenated list of fragments. From this child you can get to the next. 00307 { return m_child; }
|
|
This returns the first child of this fragment. The system operates as a concatenated list of fragments. From this child you can get to the next. 00307 { return m_child; }
|
|
Returns the global identifier for this event
|
|
Changes the global identifier for this event
|
|
Returns the global identifier for this event
|
|
Changes the global identifier for this event
|
|
Returns the lvl1 identifier for this fragment
|
|
Changes the lvl1 identifier in this fragment
|
|
Returns the lvl1 identifier for this fragment
|
|
Changes the lvl1 identifier in this fragment
|
|
Returns the lvl1 trigger type for this fragment
|
|
Changes the lvl1 trigger type in this fragment
|
|
Returns the lvl1 trigger type for this fragment
|
|
Changes the lvl1 trigger type in this fragment
|
|
Returns the lvl2 trigger info for this fragment
|
|
Changes the lvl2 trigger info in this fragment
|
|
Returns the lvl2 trigger info for this fragment
|
|
Changes the lvl2 trigger info in this fragment
|
|
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 number of status wors in this fragment
|
|
Returns the number of status wors in this fragment
|
|
Assigment operator. This will only copy the meta data, not the fragment relationships and block-data (children and parent and status block) contained in the to-be-copied fragment. If you wish this fragment has the same parents, and children of the copied fragment, you have to do this operation manually, after copying. If you wish to make a copy of the status as well, do it manually and then assign it to this fragment using the status() method.
|
|
Assigment operator. This will only copy the meta data, not the fragment relationships and block-data (children and parent and status block) contained in the to-be-copied fragment. If you wish this fragment has the same parents, and children of the copied fragment, you have to do this operation manually, after copying. If you wish to make a copy of the status as well, do it manually and then assign it to this fragment using the status() method.
00170 { 00171 memcpy(reinterpret_cast<void*>(m_header), 00172 reinterpret_cast<const void*>(other.m_node[0].base), 00173 6*sizeof(uint32_t)); 00174 memcpy(reinterpret_cast<void*>(m_header+6), 00175 reinterpret_cast<const void*>(other.m_node[2].base), 00176 11*sizeof(uint32_t)); 00177 00178 //now initialize pages 00179 set(m_node[0], m_header, 6, &m_node[1]); 00180 set(m_node[1], other.m_node[1].base, other.m_node[1].size_word, &m_node[2]); 00181 set(m_node[2], &m_header[6], 11, 0); 00182 ERS_DEBUG_3("%s Source Id. = 0x%x, LVL1 Id. = %d and Run Number = %d", 00183 "Copied (write) full event, with", 00184 FullEventFragment::source_id(), FullEventFragment::lvl1_id(), 00185 FullEventFragment::run_no()); 00186 return *this; 00187 }
|
|
Returns the total number of (raw memory) pages this fragment is composed of.
|
|
Returns the total number of (raw memory) pages this fragment is composed of.
00216 { 00217 uint32_t retval = 3 + m_extra_count; 00218 for (const SubDetectorFragment* curr = m_child; curr; curr = curr->next()) 00219 retval += curr->page_count(); 00220 return retval; 00221 }
|
|
00337 {return m_node;};
|
|
00337 {return m_node;};
|
|
Returns the run number for this fragment
|
|
Changes the run number
|
|
Returns the run number for this fragment
|
|
Changes the run number
|
|
This method is used by children of this fragment to notify fragment size changes.
|
|
This method is used by children of this fragment to notify fragment size changes.
|
|
Returns the total size for this fragment, in words
|
|
Returns the total size for this fragment, in words
|
|
Returns the source identifier of this fragment
|
|
Changes the source identifier for this fragment
|
|
Returns the source identifier of this fragment
|
|
Changes the source identifier for this 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
|
|
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
00191 { 00192 m_node[0].base[1] -= m_node[0].base[5]; //remove count from previous status 00193 m_node[0].base[2] -= m_node[0].base[5]; //remove count from previous status 00194 m_node[1].size_word = m_node[0].base[5] = n; //set new values 00195 m_node[0].base[1] += n; 00196 m_node[0].base[2] += n; 00197 m_node[1].base = const_cast<uint32_t*>(status); 00198 }
|
|
Returns the time for this fragment
|
|
Changes the time this fragment was produced at
|
|
Returns the time for this fragment
|
|
Changes the time this fragment was produced at
|
|
my children
|
|
my children
|
|
Extra pages I may have.
|
|
How many extra pages I have.
|
|
The FullEvent Header.
|
|
my last child
|
|
my last child
|
|
Node representation.
|