BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::write::ROBFragment Class Reference

forward More...

#include <ROBFragment.h>

Public Member Functions

 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 ()
 
 ROBFragment (const ROBFragment &other)
 
 ROBFragment (uint32_t *rod, uint32_t size_word)
 
 ROBFragment (uint32_t *rob)
 
virtual ~ROBFragment ()
 
ROBFragmentoperator= (const ROBFragment &other)
 
void status (uint32_t n, const uint32_t *status)
 
uint32_t nstatus (void) const
 
const uint32_t * status (void) const
 
void minor_version (uint16_t v)
 
uint16_t minor_version (void) const
 
void rod_status (uint32_t n, const uint32_t *status)
 
uint32_t rod_nstatus (void) const
 
const uint32_t * rod_status (void) const
 
void status_position (uint32_t v)
 
uint32_t status_position (void) const
 
void rod_minor_version (uint16_t v)
 
void rod_data (uint32_t n, const uint32_t *data)
 
uint32_t rod_ndata (void) const
 
const uint32_t * rod_data (void) const
 
void source_id (uint32_t s)
 
uint32_t source_id (void) const
 
void rod_run_no (uint32_t s)
 
uint32_t rod_run_no (void) const
 
void rod_lvl1_id (uint32_t s)
 
uint32_t rod_lvl1_id (void) const
 
void rod_bc_id (uint32_t s)
 
uint32_t rod_bc_id (void) const
 
void rod_lvl1_type (uint32_t s)
 
uint32_t rod_lvl1_type (void) const
 
void rod_detev_type (uint32_t s)
 
uint32_t rod_detev_type (void) const
 
uint32_t meta_size_word (void) const
 
uint32_t size_word (void) const
 
uint32_t page_count (void) const
 
const eformat::write::node_tbind (void) const
 
void parent (eformat::write::ROSFragment *ros)
 
const ROSFragmentparent (void) const
 
void next (const ROBFragment *n)
 
const ROBFragmentnext (void) const
 
 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 ()
 
 ROBFragment (const ROBFragment &other)
 
 ROBFragment (uint32_t *rod, uint32_t size_word)
 
 ROBFragment (uint32_t *rob)
 
virtual ~ROBFragment ()
 
ROBFragmentoperator= (const ROBFragment &other)
 
void status (uint32_t n, const uint32_t *status)
 
uint32_t nstatus (void) const
 
const uint32_t * status (void) const
 
void minor_version (uint16_t v)
 
uint16_t minor_version (void) const
 
void rod_status (uint32_t n, const uint32_t *status)
 
uint32_t rod_nstatus (void) const
 
const uint32_t * rod_status (void) const
 
void status_position (uint32_t v)
 
uint32_t status_position (void) const
 
void rod_minor_version (uint16_t v)
 
void rod_data (uint32_t n, const uint32_t *data)
 
uint32_t rod_ndata (void) const
 
const uint32_t * rod_data (void) const
 
void source_id (uint32_t s)
 
uint32_t source_id (void) const
 
void rod_run_no (uint32_t s)
 
uint32_t rod_run_no (void) const
 
void rod_lvl1_id (uint32_t s)
 
uint32_t rod_lvl1_id (void) const
 
void rod_bc_id (uint32_t s)
 
uint32_t rod_bc_id (void) const
 
void rod_lvl1_type (uint32_t s)
 
uint32_t rod_lvl1_type (void) const
 
void rod_detev_type (uint32_t s)
 
uint32_t rod_detev_type (void) const
 
uint32_t meta_size_word (void) const
 
uint32_t size_word (void) const
 
uint32_t page_count (void) const
 
const eformat::write::node_tbind (void) const
 
void parent (eformat::write::ROSFragment *ros)
 
const ROSFragmentparent (void) const
 
void next (const ROBFragment *n)
 
const ROBFragmentnext (void) const
 

Detailed Description

forward

Defines a helper class to aid the creation of ROB fragments.

Definition at line 28 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

Constructor & Destructor Documentation

◆ ROBFragment() [1/10]

eformat::write::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 
)

Builds a new ROB fragment from scratch

Parameters
source_idThe source identifier to be using for this ROB
run_noThe run number for this ROB/ROD
lvl1_idThe LVL1 identifier for this ROB/ROD
bc_idThe bunch crossing identifier for this ROB/ROD
lvl1_typeThe LVL1 trigger type identifier for this ROB/ROD
detev_typeThe detector event type for this ROB/ROD
ndataThe number of 32-bits pointed by "data" bellow
dataA set of 32-bit words that consist the data block of this ROB fragment
status_positionThe status block position you want to have on the ROD format. Use the definitions available in Status.h to get generic identifiers for the possibilities.

Definition at line 20 of file ROBFragment.cxx.

28 : m_parent(0),
29 m_next(0)
30{
31 m_header[0] = eformat::ROB; //marker
32 m_header[1] = 21 + ndata; //total fragment size in words
33 m_header[2] = 8; //this header size + status size
34 m_header[3] = eformat::DEFAULT_VERSION; //format version
35 m_header[4] = source_id;
36 m_header[5] = 1; //number of status
37 m_header[6] = 0; //number of fragment specific
38 m_rod_header[0] = eformat::ROD; //ROD marker
39 m_rod_header[1] = 9; //ROD header size
40 m_rod_header[2] = eformat::DEFAULT_VERSION; //format version
41 m_rod_header[3] = source_id;
42 m_rod_header[4] = run_no;
43 m_rod_header[5] = lvl1_id;
44 m_rod_header[6] = bc_id;
45 m_rod_header[7] = lvl1_type;
46 m_rod_header[8] = detev_type;
47 m_rod_trailer[0] = 1; //number of status in the ROD
48 m_rod_trailer[1] = ndata; //number of data words in the ROD
49 m_rod_trailer[2] = status_position;
50
51 //now initialize pages
52 set(m_node[0], m_header, 6, &m_node[1]);
53 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]);
54 set(m_node[2], &m_header[6], 1, &m_node[3]); //specific part
55 if (m_rod_trailer[2] == eformat::STATUS_FRONT) {
56 set(m_node[3], m_rod_header, 9, &m_node[4]);
57 set(m_node[4], &eformat::DEFAULT_STATUS, 1, &m_node[5]); //status
58 set(m_node[5], data, ndata, &m_node[6]); //data
59 }
60 else {
61 set(m_node[3], m_rod_header, 9, &m_node[5]);
62 set(m_node[5], data, ndata, &m_node[4]); //data
63 set(m_node[4], &eformat::DEFAULT_STATUS, 1, &m_node[6]); //status
64 }
65 set(m_node[6], m_rod_trailer, 3, 0);
66 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d",
67 "Built (write) rob/rod fragment from scratch, with",
69}
TTree * data
void set(node_t &i, const uint32_t *b, size_t l, node_t *n=0)
Definition: node.cxx:16
const uint32_t STATUS_FRONT
status goes in front of data block

◆ ROBFragment() [2/10]

eformat::write::ROBFragment::ROBFragment ( )

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.

Definition at line 71 of file ROBFragment.cxx.

72 : m_parent(0),
73 m_next(0)
74{
75 m_header[0] = eformat::ROB; //marker
76 m_header[1] = 21;
77 m_header[2] = 8; //this header size + status size
78 m_header[3] = eformat::DEFAULT_VERSION; //format version
79 m_header[4] = 0; //source identifier of the ROB fragment
80 m_header[5] = 1; //number of status
81 m_header[6] = 0; //number of fragment specific
82 m_rod_header[0] = eformat::ROD; //ROD marker
83 m_rod_header[1] = 9; //ROD header size
84 m_rod_header[2] = eformat::DEFAULT_VERSION; //format version
85 m_rod_header[3] = 0; //source identifier of the ROD fragment
86 m_rod_header[4] = 0; //run number
87 m_rod_header[5] = 0; //LVL1 identifier
88 m_rod_header[6] = 0; //bunch crossing identifier
89 m_rod_header[7] = 0; //LVL1 type
90 m_rod_header[8] = 0; //detector event type
91 m_rod_trailer[0] = 1; //number of status in the ROD
92 m_rod_trailer[1] = 0; //number of data words in the ROD
93 m_rod_trailer[2] = eformat::STATUS_FRONT; //status block position
94
95 //now initialize pages
96 set(m_node[0], m_header, 6, &m_node[1]);
97 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]);
98 set(m_node[2], &m_header[6], 1, &m_node[3]); //specific part
99 if (m_rod_trailer[2] == eformat::STATUS_FRONT) {
100 set(m_node[3], m_rod_header, 9, &m_node[4]);
101 set(m_node[4], &eformat::DEFAULT_STATUS, 1, &m_node[5]); //status
102 set(m_node[5], 0, 0, &m_node[6]); //data
103 }
104 else {
105 set(m_node[3], m_rod_header, 9, &m_node[5]);
106 set(m_node[5], 0, 0, &m_node[4]); //data
107 set(m_node[4], &eformat::DEFAULT_STATUS, 1, &m_node[6]); //status
108 }
109 set(m_node[6], m_rod_trailer, 3, 0);
110 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d",
111 "Built (write) empty rob/rod fragment, with",
113}

◆ ROBFragment() [3/10]

eformat::write::ROBFragment::ROBFragment ( const ROBFragment other)

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.

Parameters
otherThe other fragment to copy the meta data from.

Definition at line 115 of file ROBFragment.cxx.

117 : m_parent(0),
118 m_next(0)
119{
120 *this = other;
121 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d",
122 "Built new (write) rob/rod fragment from copy, with",
124}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ROBFragment() [4/10]

eformat::write::ROBFragment::ROBFragment ( uint32_t *  rod,
uint32_t  size_word 
)

Builds a new ROB fragment from scratch, starting from an existing ROD fragment as basis.

Parameters
rodThe rod fragment you want to start with, in a contiguous block of memory
size_wordThe size of the ROD fragment, in words

Definition at line 126 of file ROBFragment.cxx.

127 : m_parent(0),
128 m_next(0)
129{
130 m_header[0] = eformat::ROB; //marker
131 m_header[1] = 8 + size_word; //total fragment size in words
132 m_header[2] = 8; //this header size + status size
133 m_header[3] = eformat::DEFAULT_VERSION; //format version
134 m_header[4] = rod[3];
135 m_header[5] = 1; //number of status
136 m_header[6] = 0; //number of fragment specific
137
138 //now initialize pages
139 set(m_node[0], m_header, 6, &m_node[1]);
140 set(m_node[1], &eformat::DEFAULT_STATUS, 1, &m_node[2]);
141 set(m_node[2], &m_header[6], 1, &m_node[3]);
142 set(m_node[6], &rod[size_word-3], 3, 0); //ROD trailer
143 if (m_node[6].base[2] == eformat::STATUS_FRONT) {
144 set(m_node[3], rod, 9, &m_node[4]); //ROD header
145 set(m_node[4], &rod[9], m_node[6].base[0], &m_node[5]); //status
146 set(m_node[5], &rod[9+m_node[6].base[0]], m_node[6].base[1], &m_node[6]);
147 }
148 else {
149 set(m_node[3], rod, 9, &m_node[5]); //ROD header
150 set(m_node[4], &rod[9+m_node[6].base[1]], m_node[6].base[0], &m_node[6]);
151 set(m_node[5], &rod[9], m_node[6].base[1], &m_node[4]); //data
152 }
153 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d",
154 "Built (write) rob/rod fragment from rod on memory, with",
156}

◆ ROBFragment() [5/10]

eformat::write::ROBFragment::ROBFragment ( uint32_t *  rob)

Builds a new ROB fragment from an existing ROB fragment in contiguous memory

Warning
You cannot build from non-contiguous memory. If you have that requirement, please post it to the eformat developers.
Parameters
robThe ROB fragment you want to start with, in a contiguous block of memory

Definition at line 158 of file ROBFragment.cxx.

159 : m_parent(0),
160 m_next(0)
161{
162 //now initialize pages
163 set(m_node[0], rob, 6, &m_node[1]);
164 set(m_node[1], &rob[6], rob[5], &m_node[2]);
165 set(m_node[2], &rob[6+rob[5]], 1, &m_node[3]);
166 set(m_node[6], &rob[rob[1]-3], 3, 0); //ROD trailer
167 if (m_node[6].base[2] == eformat::STATUS_FRONT) {
168 set(m_node[3], &rob[rob[2]], 9, &m_node[4]); //ROD header
169 set(m_node[4], &rob[rob[2]+9], m_node[6].base[0], &m_node[5]); //status
170 set(m_node[5], &rob[rob[2]+9+m_node[6].base[0]], m_node[6].base[1],
171 &m_node[6]); //data
172 }
173 else {
174 set(m_node[3], &rob[rob[2]], 9, &m_node[5]); //ROD header
175 set(m_node[4], &rob[rob[2]+9+m_node[6].base[1]], m_node[6].base[0],
176 &m_node[6]);
177 set(m_node[5], &rob[rob[2]+9], m_node[6].base[1], &m_node[4]); //data
178 }
179 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d",
180 "Built (write) rob/rod fragment from cont. memory, with",
182}

◆ ~ROBFragment() [1/2]

virtual eformat::write::ROBFragment::~ROBFragment ( )
inlinevirtual

Base destructor

Definition at line 107 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

107{}

◆ ROBFragment() [6/10]

eformat::write::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 
)

Builds a new ROB fragment from scratch

Parameters
source_idThe source identifier to be using for this ROB
run_noThe run number for this ROB/ROD
lvl1_idThe LVL1 identifier for this ROB/ROD
bc_idThe bunch crossing identifier for this ROB/ROD
lvl1_typeThe LVL1 trigger type identifier for this ROB/ROD
detev_typeThe detector event type for this ROB/ROD
ndataThe number of 32-bits pointed by "data" bellow
dataA set of 32-bit words that consist the data block of this ROB fragment
status_positionThe status block position you want to have on the ROD format. Use the definitions available in Status.h to get generic identifiers for the possibilities.

◆ ROBFragment() [7/10]

eformat::write::ROBFragment::ROBFragment ( )

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.

◆ ROBFragment() [8/10]

eformat::write::ROBFragment::ROBFragment ( const ROBFragment other)

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.

Parameters
otherThe other fragment to copy the meta data from.

◆ ROBFragment() [9/10]

eformat::write::ROBFragment::ROBFragment ( uint32_t *  rod,
uint32_t  size_word 
)

Builds a new ROB fragment from scratch, starting from an existing ROD fragment as basis.

Parameters
rodThe rod fragment you want to start with, in a contiguous block of memory
size_wordThe size of the ROD fragment, in words

◆ ROBFragment() [10/10]

eformat::write::ROBFragment::ROBFragment ( uint32_t *  rob)

Builds a new ROB fragment from an existing ROB fragment in contiguous memory

Warning
You cannot build from non-contiguous memory. If you have that requirement, please post it to the eformat developers.
Parameters
robThe ROB fragment you want to start with, in a contiguous block of memory

◆ ~ROBFragment() [2/2]

virtual eformat::write::ROBFragment::~ROBFragment ( )
inlinevirtual

Base destructor

Definition at line 107 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

107{}

Member Function Documentation

◆ bind() [1/2]

const eformat::write::node_t * eformat::write::ROBFragment::bind ( void  ) const
inline

Outputs a concatenation of eformat::write::node making up a list with the contents of this ROB fragment.

Definition at line 327 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

328 { return m_node; }

◆ bind() [2/2]

const eformat::write::node_t * eformat::write::ROBFragment::bind ( void  ) const
inline

Outputs a concatenation of eformat::write::node making up a list with the contents of this ROB fragment.

Definition at line 327 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

328 { return m_node; }

◆ meta_size_word() [1/2]

uint32_t eformat::write::ROBFragment::meta_size_word ( void  ) const
inline

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

Definition at line 309 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

310 { return 7 + m_node[0].base[5] + 12 + m_node[6].base[0]; }
uint32_t * base
The base address for this page.

Referenced by size_word().

◆ meta_size_word() [2/2]

uint32_t eformat::write::ROBFragment::meta_size_word ( void  ) const
inline

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

Definition at line 309 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

310 { return 7 + m_node[0].base[5] + 12 + m_node[6].base[0]; }

◆ minor_version() [1/4]

void eformat::write::ROBFragment::minor_version ( uint16_t  v)
inline

Changes the minor version number of the fragment

Parameters
vThe new minor version for this header

Definition at line 148 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

149 { m_node[0].base[3] = eformat::DEFAULT_VERSION | v; }
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35

Referenced by eformat::old::convert(), and convert_ros().

◆ minor_version() [2/4]

void eformat::write::ROBFragment::minor_version ( uint16_t  v)
inline

Changes the minor version number of the fragment

Parameters
vThe new minor version for this header

Definition at line 148 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

149 { m_node[0].base[3] = eformat::DEFAULT_VERSION | v; }

◆ minor_version() [3/4]

uint16_t eformat::write::ROBFragment::minor_version ( void  ) const
inline

Returns the minor version number of the fragment

Definition at line 154 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

155 { return 0xffff & m_node[0].base[3]; }

◆ minor_version() [4/4]

uint16_t eformat::write::ROBFragment::minor_version ( void  ) const
inline

Returns the minor version number of the fragment

Definition at line 154 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

155 { return 0xffff & m_node[0].base[3]; }

◆ next() [1/4]

void eformat::write::ROBFragment::next ( const ROBFragment n)
inline

Sets the next sibling

Parameters
nThe sibling following this fragment

Definition at line 348 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

348{ m_next = n; }
const Int_t n

Referenced by eformat::write::ROSFragment::bind(), PackedRawDataCnvSvc::commitOutput(), and eformat::write::ROSFragment::page_count().

◆ next() [2/4]

void eformat::write::ROBFragment::next ( const ROBFragment n)
inline

Sets the next sibling

Parameters
nThe sibling following this fragment

Definition at line 348 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

348{ m_next = n; }

◆ next() [3/4]

const ROBFragment * eformat::write::ROBFragment::next ( void  ) const
inline

Returns the next sibling

Definition at line 353 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

353{ return m_next; }

◆ next() [4/4]

const ROBFragment * eformat::write::ROBFragment::next ( void  ) const
inline

Returns the next sibling

Definition at line 353 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

353{ return m_next; }

◆ nstatus() [1/2]

uint32_t eformat::write::ROBFragment::nstatus ( void  ) const
inline

Returns the number of status wors in this fragment

Definition at line 136 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

136{ return m_node[0].base[5]; }

◆ nstatus() [2/2]

uint32_t eformat::write::ROBFragment::nstatus ( void  ) const
inline

Returns the number of status wors in this fragment

Definition at line 136 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

136{ return m_node[0].base[5]; }

◆ operator=() [1/2]

eformat::write::ROBFragment & eformat::write::ROBFragment::operator= ( const ROBFragment other)

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.

Parameters
otherThe other fragment to copy the meta data from.

Definition at line 184 of file ROBFragment.cxx.

186{
187 //get the ROB header
188 memcpy(reinterpret_cast<void*>(m_header),
189 reinterpret_cast<const void*>(other.m_node[0].base),
190 6*sizeof(uint32_t));
191 m_header[6] = other.m_node[2].base[0];
192 memcpy(reinterpret_cast<void*>(m_rod_header),
193 reinterpret_cast<const void*>(other.m_node[3].base),
194 9*sizeof(uint32_t));
195 memcpy(reinterpret_cast<void*>(m_rod_trailer),
196 reinterpret_cast<const void*>(other.m_node[6].base),
197 3*sizeof(uint32_t));
198
199 //now re-initialize the pages
200 set(m_node[0], m_header, 6, &m_node[1]);
201 set(m_node[1], other.m_node[1].base, other.m_node[1].size_word, &m_node[2]);
202 set(m_node[2], &m_header[6], 1, &m_node[3]); //specific part
203 if (m_rod_trailer[2] == eformat::STATUS_FRONT) {
204 set(m_node[3], m_rod_header, 9, &m_node[4]);
205 set(m_node[4], other.m_node[4].base,
206 other.m_node[4].size_word, &m_node[5]); //status
207 set(m_node[5], other.m_node[5].base,
208 other.m_node[5].size_word, &m_node[6]); //data
209 }
210 else {
211 set(m_node[3], m_rod_header, 9, &m_node[5]);
212 set(m_node[5], other.m_node[5].base,
213 other.m_node[5].size_word, &m_node[4]); //data
214 set(m_node[4], other.m_node[4].base,
215 other.m_node[4].size_word, &m_node[6]); //status
216 }
217 set(m_node[6], m_rod_trailer, 3, 0);
218 ERS_DEBUG_3("%s Source Id. = 0x%x., LVL1 Id. = %d, Run Number = %d",
219 "Copied (write) rob/rod fragment with",
221
222 return *this;
223}

◆ operator=() [2/2]

ROBFragment & eformat::write::ROBFragment::operator= ( const ROBFragment other)

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.

Parameters
otherThe other fragment to copy the meta data from.

◆ page_count() [1/2]

uint32_t eformat::write::ROBFragment::page_count ( void  ) const
inline

Returns the number of pages of memory I have

Definition at line 321 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

321{ return 7; }

◆ page_count() [2/2]

uint32_t eformat::write::ROBFragment::page_count ( void  ) const
inline

Returns the number of pages of memory I have

Definition at line 321 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

321{ return 7; }

◆ parent() [1/4]

void eformat::write::ROBFragment::parent ( eformat::write::ROSFragment ros)
inline

This sets the parent fragment

Parameters
rosThe ROS parent fragment of this ROB/ROD

Definition at line 335 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

336 { m_parent = ros; }

Referenced by eformat::write::ROSFragment::append().

◆ parent() [2/4]

void eformat::write::ROBFragment::parent ( eformat::write::ROSFragment ros)
inline

This sets the parent fragment

Parameters
rosThe ROS parent fragment of this ROB/ROD

Definition at line 335 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

336 { m_parent = ros; }

◆ parent() [3/4]

const ROSFragment * eformat::write::ROBFragment::parent ( void  ) const
inline

This returns the parent fragment

Definition at line 341 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

341{ return m_parent; }

◆ parent() [4/4]

const ROSFragment * eformat::write::ROBFragment::parent ( void  ) const
inline

This returns the parent fragment

Definition at line 341 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

341{ return m_parent; }

◆ rod_bc_id() [1/4]

void eformat::write::ROBFragment::rod_bc_id ( uint32_t  s)
inline

Changes the bunch crossing identifier in the ROD fragment

Parameters
sThe new value to set

Definition at line 267 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

268 { m_node[3].base[6] = s; }
XmlRpcServer s
Definition: HelloServer.cpp:11

◆ rod_bc_id() [2/4]

void eformat::write::ROBFragment::rod_bc_id ( uint32_t  s)
inline

Changes the bunch crossing identifier in the ROD fragment

Parameters
sThe new value to set

Definition at line 267 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

268 { m_node[3].base[6] = s; }

◆ rod_bc_id() [3/4]

uint32_t eformat::write::ROBFragment::rod_bc_id ( void  ) const
inline

Returns the bunch crossing identifier for the ROD fragment

Definition at line 273 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

274 { return m_node[3].base[6]; }

◆ rod_bc_id() [4/4]

uint32_t eformat::write::ROBFragment::rod_bc_id ( void  ) const
inline

Returns the bunch crossing identifier for the ROD fragment

Definition at line 273 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

274 { return m_node[3].base[6]; }

◆ rod_data() [1/4]

void eformat::write::ROBFragment::rod_data ( uint32_t  n,
const uint32_t *  data 
)

Changes the number of data words and the data words themselves from the ROD fragment

Parameters
nHow many data words the underlying ROD fragment supposed to have
statusA pointer to n pre-allocated words

Definition at line 264 of file ROBFragment.cxx.

265{
266 if (m_parent) m_parent->size_change(m_node[0].base[1],
267 m_node[0].base[1]-m_node[6].base[1]+n);
268
269 //remove count from previous data size
270 m_node[0].base[1] -= m_node[6].base[1];
271 m_node[5].size_word = m_node[6].base[1] = n; //set new values
272 m_node[0].base[1] += n; //set ROB header's total fragment size back
273 m_node[5].base = const_cast<uint32_t*>(data);
274}
void size_change(uint32_t o, uint32_t n)
size_t size_word
The size, in 4-byte words for this page.

◆ rod_data() [2/4]

void eformat::write::ROBFragment::rod_data ( uint32_t  n,
const uint32_t *  data 
)

Changes the number of data words and the data words themselves from the ROD fragment

Parameters
nHow many data words the underlying ROD fragment supposed to have
statusA pointer to n pre-allocated words

◆ rod_data() [3/4]

const uint32_t * eformat::write::ROBFragment::rod_data ( void  ) const
inline

Returns a pointer to the first of the data words at the ROD fragment

Definition at line 218 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

218{ return m_node[5].base; }

◆ rod_data() [4/4]

const uint32_t * eformat::write::ROBFragment::rod_data ( void  ) const
inline

Returns a pointer to the first of the data words at the ROD fragment

Definition at line 218 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

218{ return m_node[5].base; }

◆ rod_detev_type() [1/4]

void eformat::write::ROBFragment::rod_detev_type ( uint32_t  s)
inline

Changes the detector event type in the ROD fragment

Parameters
sThe new value to set

Definition at line 295 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

296 { m_node[3].base[8] = s; }

◆ rod_detev_type() [2/4]

void eformat::write::ROBFragment::rod_detev_type ( uint32_t  s)
inline

Changes the detector event type in the ROD fragment

Parameters
sThe new value to set

Definition at line 295 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

296 { m_node[3].base[8] = s; }

◆ rod_detev_type() [3/4]

uint32_t eformat::write::ROBFragment::rod_detev_type ( void  ) const
inline

Returns the detector event type identifier for the ROD fragment

Definition at line 301 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

302 { return m_node[3].base[8]; }

◆ rod_detev_type() [4/4]

uint32_t eformat::write::ROBFragment::rod_detev_type ( void  ) const
inline

Returns the detector event type identifier for the ROD fragment

Definition at line 301 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

302 { return m_node[3].base[8]; }

◆ rod_lvl1_id() [1/4]

void eformat::write::ROBFragment::rod_lvl1_id ( uint32_t  s)
inline

Changes the lvl1 identifier in the ROD fragment

Parameters
sThe new value to set

Definition at line 253 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

254 { m_node[3].base[5] = s; }

◆ rod_lvl1_id() [2/4]

void eformat::write::ROBFragment::rod_lvl1_id ( uint32_t  s)
inline

Changes the lvl1 identifier in the ROD fragment

Parameters
sThe new value to set

Definition at line 253 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

254 { m_node[3].base[5] = s; }

◆ rod_lvl1_id() [3/4]

uint32_t eformat::write::ROBFragment::rod_lvl1_id ( void  ) const
inline

Returns the lvl1 identifier for the ROD fragment

Definition at line 259 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

260 { return m_node[3].base[5]; }

Referenced by ROBFragment().

◆ rod_lvl1_id() [4/4]

uint32_t eformat::write::ROBFragment::rod_lvl1_id ( void  ) const
inline

Returns the lvl1 identifier for the ROD fragment

Definition at line 259 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

260 { return m_node[3].base[5]; }

◆ rod_lvl1_type() [1/4]

void eformat::write::ROBFragment::rod_lvl1_type ( uint32_t  s)
inline

Changes the lvl1 trigger type in the ROD fragment

Parameters
sThe new value to set

Definition at line 281 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

282 { m_node[3].base[7] = s; }

◆ rod_lvl1_type() [2/4]

void eformat::write::ROBFragment::rod_lvl1_type ( uint32_t  s)
inline

Changes the lvl1 trigger type in the ROD fragment

Parameters
sThe new value to set

Definition at line 281 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

282 { m_node[3].base[7] = s; }

◆ rod_lvl1_type() [3/4]

uint32_t eformat::write::ROBFragment::rod_lvl1_type ( void  ) const
inline

Returns the lvl1 event type identifier for the ROD fragment

Definition at line 287 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

288 { return m_node[3].base[7]; }

◆ rod_lvl1_type() [4/4]

uint32_t eformat::write::ROBFragment::rod_lvl1_type ( void  ) const
inline

Returns the lvl1 event type identifier for the ROD fragment

Definition at line 287 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

288 { return m_node[3].base[7]; }

◆ rod_minor_version() [1/2]

void eformat::write::ROBFragment::rod_minor_version ( uint16_t  v)
inline

Changes the minor version number of the underlying ROD fragment

Parameters
vThe new minor version for this header

Definition at line 197 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

198 { m_node[3].base[2] = eformat::DEFAULT_VERSION | v; }

Referenced by eformat::old::convert(), and convert_ros().

◆ rod_minor_version() [2/2]

void eformat::write::ROBFragment::rod_minor_version ( uint16_t  v)
inline

Changes the minor version number of the underlying ROD fragment

Parameters
vThe new minor version for this header

Definition at line 197 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

198 { m_node[3].base[2] = eformat::DEFAULT_VERSION | v; }

◆ rod_ndata() [1/2]

uint32_t eformat::write::ROBFragment::rod_ndata ( void  ) const
inline

Returns the number of data words at the ROD fragment

Definition at line 213 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

213{ return m_node[6].base[1]; }

◆ rod_ndata() [2/2]

uint32_t eformat::write::ROBFragment::rod_ndata ( void  ) const
inline

Returns the number of data words at the ROD fragment

Definition at line 213 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

213{ return m_node[6].base[1]; }

◆ rod_nstatus() [1/2]

uint32_t eformat::write::ROBFragment::rod_nstatus ( void  ) const
inline

Returns the number of status wors in this fragment

Definition at line 170 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

170{ return m_node[6].base[0]; }

◆ rod_nstatus() [2/2]

uint32_t eformat::write::ROBFragment::rod_nstatus ( void  ) const
inline

Returns the number of status wors in this fragment

Definition at line 170 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

170{ return m_node[6].base[0]; }

◆ rod_run_no() [1/4]

void eformat::write::ROBFragment::rod_run_no ( uint32_t  s)
inline

Changes the run number for the ROD fragment

Parameters
sThe new value to set

Definition at line 239 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

240 { m_node[3].base[4] = s; }

◆ rod_run_no() [2/4]

void eformat::write::ROBFragment::rod_run_no ( uint32_t  s)
inline

Changes the run number for the ROD fragment

Parameters
sThe new value to set

Definition at line 239 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

240 { m_node[3].base[4] = s; }

◆ rod_run_no() [3/4]

uint32_t eformat::write::ROBFragment::rod_run_no ( void  ) const
inline

Returns the run number for the ROD fragment

Definition at line 245 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

246 { return m_node[3].base[4]; }

Referenced by ROBFragment().

◆ rod_run_no() [4/4]

uint32_t eformat::write::ROBFragment::rod_run_no ( void  ) const
inline

Returns the run number for the ROD fragment

Definition at line 245 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

246 { return m_node[3].base[4]; }

◆ rod_status() [1/4]

void eformat::write::ROBFragment::rod_status ( uint32_t  n,
const uint32_t *  status 
)

Changes the number of status words and the status words themselves from the ROD fragment

Parameters
nHow many status words the underlying ROD fragment supposed to have
statusA pointer to n pre-allocated words

Definition at line 237 of file ROBFragment.cxx.

239{
240 if (m_parent) m_parent->size_change(m_node[0].base[1],
241 m_node[0].base[1]-m_node[6].base[0]+n);
242 m_node[0].base[1] -= m_node[6].base[0]; //remove count from previous status
243 m_node[4].size_word = m_node[6].base[0] = n; //set new values
244 m_node[0].base[1] += n; //set ROB header's total fragment size
245 m_node[4].base = const_cast<uint32_t*>(status);
246}

Referenced by Builder::append2event(), eformat::old::convert(), and convert_ros().

◆ rod_status() [2/4]

void eformat::write::ROBFragment::rod_status ( uint32_t  n,
const uint32_t *  status 
)

Changes the number of status words and the status words themselves from the ROD fragment

Parameters
nHow many status words the underlying ROD fragment supposed to have
statusA pointer to n pre-allocated words

◆ rod_status() [3/4]

const uint32_t * eformat::write::ROBFragment::rod_status ( void  ) const
inline

Returns a pointer to the first ROD status word to be used by this fragment

Definition at line 176 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

176{ return m_node[4].base; }

◆ rod_status() [4/4]

const uint32_t * eformat::write::ROBFragment::rod_status ( void  ) const
inline

Returns a pointer to the first ROD status word to be used by this fragment

Definition at line 176 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

176{ return m_node[4].base; }

◆ size_word() [1/2]

uint32_t eformat::write::ROBFragment::size_word ( void  ) const
inline

Returns the total size for this fragment, in words

Definition at line 315 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

316 { return meta_size_word() + m_node[6].base[1]; }

Referenced by eformat::write::ROSFragment::append(), and ROBFragment().

◆ size_word() [2/2]

uint32_t eformat::write::ROBFragment::size_word ( void  ) const
inline

Returns the total size for this fragment, in words

Definition at line 315 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

316 { return meta_size_word() + m_node[6].base[1]; }

◆ source_id() [1/4]

void eformat::write::ROBFragment::source_id ( uint32_t  s)
inline

Changes the source identifier for both the ROB and the ROD fragments

Parameters
sThe new value to set

Definition at line 225 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

226 { m_node[0].base[4] = m_node[3].base[3] = s; }

Referenced by eformat::write::ROSFragment::append().

◆ source_id() [2/4]

void eformat::write::ROBFragment::source_id ( uint32_t  s)
inline

Changes the source identifier for both the ROB and the ROD fragments

Parameters
sThe new value to set

Definition at line 225 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

226 { m_node[0].base[4] = m_node[3].base[3] = s; }

◆ source_id() [3/4]

uint32_t eformat::write::ROBFragment::source_id ( void  ) const
inline

Returns the source identifier for both the ROB and the ROD fragments

Definition at line 231 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

232 { return m_node[0].base[4]; }

Referenced by operator=(), and ROBFragment().

◆ source_id() [4/4]

uint32_t eformat::write::ROBFragment::source_id ( void  ) const
inline

Returns the source identifier for both the ROB and the ROD fragments

Definition at line 231 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

232 { return m_node[0].base[4]; }

◆ status() [1/4]

void eformat::write::ROBFragment::status ( uint32_t  n,
const uint32_t *  status 
)

Changes the number of status words and the status words themselves from the fragment

Parameters
nHow many status words the underlying ROD fragment supposed to have.
statusA pointer to n pre-allocated words

Definition at line 225 of file ROBFragment.cxx.

226{
227 if (m_parent) m_parent->size_change(m_node[0].base[1],
228 m_node[0].base[1]-m_node[0].base[5]+n);
229 m_node[0].base[1] -= m_node[0].base[5]; //remove count from previous status
230 m_node[0].base[2] -= m_node[0].base[5]; //remove count from previous status
231 m_node[1].size_word = m_node[0].base[5] = n; //set new values
232 m_node[0].base[1] += n;
233 m_node[0].base[2] += n;
234 m_node[1].base = const_cast<uint32_t*>(status);
235}

Referenced by Builder::append2event(), eformat::old::convert(), and convert_ros().

◆ status() [2/4]

void eformat::write::ROBFragment::status ( uint32_t  n,
const uint32_t *  status 
)

Changes the number of status words and the status words themselves from the fragment

Parameters
nHow many status words the underlying ROD fragment supposed to have.
statusA pointer to n pre-allocated words

◆ status() [3/4]

const uint32_t * eformat::write::ROBFragment::status ( void  ) const
inline

Returns a pointer to the first status word to be used by this fragment

Definition at line 141 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

141{ return m_node[1].base; }

◆ status() [4/4]

const uint32_t * eformat::write::ROBFragment::status ( void  ) const
inline

Returns a pointer to the first status word to be used by this fragment

Definition at line 141 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

141{ return m_node[1].base; }

◆ status_position() [1/4]

void eformat::write::ROBFragment::status_position ( uint32_t  v)

Changes the order of the status and data blocks in the ROD fragment

Parameters
sThe new value. If v is zero, the status will preceed the data, while the contrary will happen if v equals 1.

Definition at line 248 of file ROBFragment.cxx.

249{
250 if (v == m_node[6].base[2]) return; //do nothing in this case:)
251 m_node[6].base[2] = v;
252 if (m_node[6].base[2] == eformat::STATUS_FRONT) {
253 m_node[3].next = &m_node[4];
254 m_node[4].next = &m_node[5];
255 m_node[5].next = &m_node[6];
256 }
257 else {
258 m_node[3].next = &m_node[5];
259 m_node[5].next = &m_node[4];
260 m_node[4].next = &m_node[6];
261 }
262}

◆ status_position() [2/4]

void eformat::write::ROBFragment::status_position ( uint32_t  v)

Changes the order of the status and data blocks in the ROD fragment

Parameters
sThe new value. If v is zero, the status will preceed the data, while the contrary will happen if v equals 1.

◆ status_position() [3/4]

uint32_t eformat::write::ROBFragment::status_position ( void  ) const
inline

Returns the current status position

Definition at line 189 of file Event/eformat/eformat-00-00-04/eformat/write/ROBFragment.h.

190 { return m_node[6].base[2]; }

Referenced by ROBFragment().

◆ status_position() [4/4]

uint32_t eformat::write::ROBFragment::status_position ( void  ) const
inline

Returns the current status position

Definition at line 189 of file InstallArea/include/eformat/eformat/write/ROBFragment.h.

190 { return m_node[6].base[2]; }

The documentation for this class was generated from the following files: