13#include "eformat/old/util.h"
14#include "eformat/old/UnboundSourceIdentifierIssue.h"
15#include "eformat/old/FullEventFragment.h"
16#include "eformat/old/SubDetectorFragment.h"
17#include "eformat/old/ROSFragment.h"
18#include "eformat/old/ROBFragment.h"
19#include "eformat/old/RODFragment.h"
20#include "eformat/SourceIdentifier.h"
21#include "eformat/HeaderMarker.h"
22#include "eformat/WrongMarkerIssue.h"
23#include "eformat/Version.h"
24#include "eformat/BadVersionIssue.h"
25#include "ers/StreamFactory.h"
26#include "eformat/write/FullEventFragment.h"
32 uint16_t
id = old_id & 0x00ff;
33 uint8_t sd = ( old_id >> 8 ) & 0xff;
34 uint8_t md = ( old_id >> 16 ) & 0xff;
108 "Propose an equivalent of the source identifier 0x", old_id,
109 " [v2.4], for the 3.0 format, to eformat developers.",
110 "The subdetector identifier field will be zero'd for now.");
128 "Propose an equivalent of the source identifier 0x", old_id,
129 " [v2.4], for the 3.0 format, to eformat developers.",
130 "The subdetector identifier field will be zero'd for now.");
139 "Propose an equivalent of the source identifier 0x", old_id,
140 " [v2.4], for the 3.0 format, to eformat developers.",
141 "The subdetector identifier field will be zero'd for now.");
150 "Propose an equivalent of the source identifier 0x", old_id,
151 " [v2.4], for the 3.0 format, to eformat developers.",
152 "The subdetector identifier field will be zero'd for now.");
157 ERS_DEBUG_3(
"Source identifier 0x%x [v2.4] was converted to 0x%x [v3.0]",
186 if (version.
major2() == MAJOR_DEFAULT_VERSION) {
187 memcpy(dest, src,
sizeof(uint32_t)*src[1]);
190 if (version.
major2() != MAJOR_OLD_VERSION)
207 std::vector<eformat::write::ROBFragment*> acc_rob;
209 for (
size_t k=0; k<ros.
noffset(); ++k) {
213 for (
size_t l=0; l<rob.
noffset(); ++l) {
220 (old::convert_source(source_id), rod.
run_no(), rod.
lvl1_id(),
233 acc_rob.push_back(nrob);
243 for (
size_t i=0; i<acc_rob.size(); ++i)
delete acc_rob[i];
263 memcpy(dest, src,
sizeof(uint32_t)*src[1]);
288 std::vector<eformat::write::SubDetectorFragment*> acc_sd;
289 std::vector<eformat::write::ROSFragment*> acc_ros;
290 std::vector<eformat::write::ROBFragment*> acc_rob;
292 for (
size_t i=0; i<fe.
noffset(); ++i) {
305 for (
size_t j=0; j<sd.
noffset(); ++j) {
319 for (
size_t k=0; k<ros.
noffset(); ++k) {
323 for (
size_t l=0; l<rob.
noffset(); ++l) {
343 acc_rob.push_back(nrob);
349 acc_ros.push_back(nros);
354 acc_sd.push_back(nsd);
363 for (
size_t i=0; i<acc_rob.size(); ++i)
delete acc_rob[i];
364 for (
size_t i=0; i<acc_ros.size(); ++i)
delete acc_ros[i];
365 for (
size_t i=0; i<acc_sd.size(); ++i)
delete acc_sd[i];
uint32_t convert_ros(const uint32_t *src, uint32_t *dest, uint32_t max)