13#include "eformat/BadVersionIssue.h"
14#include "eformat/HeaderMarker.h"
15#include "eformat/SourceIdentifier.h"
16#include "eformat/Version.h"
17#include "eformat/WrongMarkerIssue.h"
18#include "eformat/old/FullEventFragment.h"
19#include "eformat/old/ROBFragment.h"
20#include "eformat/old/RODFragment.h"
21#include "eformat/old/ROSFragment.h"
22#include "eformat/old/SubDetectorFragment.h"
23#include "eformat/old/UnboundSourceIdentifierIssue.h"
24#include "eformat/old/util.h"
25#include "eformat/write/FullEventFragment.h"
26#include "ers/StreamFactory.h"
31 uint16_t
id = old_id & 0x00ff;
32 uint8_t sd = ( old_id >> 8 ) & 0xff;
33 uint8_t md = ( old_id >> 16 ) & 0xff;
79 case OTHER: retval = sd;
break;
106 ERS_WARN(
"%s%x%s%s",
"Propose an equivalent of the source identifier 0x", old_id,
107 " [v2.4], for the 3.0 format, to eformat developers.",
108 "The subdetector identifier field will be zero'd for now." );
126 ERS_WARN(
"%s%x%s%s",
"Propose an equivalent of the source identifier 0x", old_id,
127 " [v2.4], for the 3.0 format, to eformat developers.",
128 "The subdetector identifier field will be zero'd for now." );
137 ERS_WARN(
"%s%x%s%s",
"Propose an equivalent of the source identifier 0x", old_id,
138 " [v2.4], for the 3.0 format, to eformat developers.",
139 "The subdetector identifier field will be zero'd for now." );
147 ERS_WARN(
"%s%x%s%s",
"Propose an equivalent of the source identifier 0x", old_id,
148 " [v2.4], for the 3.0 format, to eformat developers.",
149 "The subdetector identifier field will be zero'd for now." );
154 ERS_DEBUG_3(
"Source identifier 0x%x [v2.4] was converted to 0x%x [v3.0]", old_id, retval );
181 memcpy( dest, src,
sizeof( uint32_t ) * src[1] );
201 std::vector<eformat::write::ROBFragment*> acc_rob;
203 for (
size_t k = 0; k < ros.
noffset(); ++k )
208 for (
size_t l = 0; l < rob.
noffset(); ++l )
229 acc_rob.push_back( nrob );
239 for (
size_t i = 0; i < acc_rob.size(); ++i )
delete acc_rob[i];
257 memcpy( dest, src,
sizeof( uint32_t ) * src[1] );
282 std::vector<eformat::write::SubDetectorFragment*> acc_sd;
283 std::vector<eformat::write::ROSFragment*> acc_ros;
284 std::vector<eformat::write::ROBFragment*> acc_rob;
286 for (
size_t i = 0; i < fe.
noffset(); ++i )
300 for (
size_t j = 0; j < sd.
noffset(); ++j )
314 for (
size_t k = 0; k < ros.
noffset(); ++k )
319 for (
size_t l = 0; l < rob.
noffset(); ++l )
340 acc_rob.push_back( nrob );
346 acc_ros.push_back( nros );
351 acc_sd.push_back( nsd );
360 for (
size_t i = 0; i < acc_rob.size(); ++i )
delete acc_rob[i];
361 for (
size_t i = 0; i < acc_ros.size(); ++i )
delete acc_ros[i];
362 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)