ATLAS Offline Software
Functions
offline_eformat::old Namespace Reference

Functions

uint32_t convert_to_40 (const uint32_t *src, uint32_t *dest, uint32_t max, eformat::CheckSum event_checksum=eformat::NO_CHECKSUM, eformat::CheckSum rob_checksum=eformat::NO_CHECKSUM)
 Converts a full event fragment or a ROS fragment, from some format to v4.0 format, using the space of contiguous memory storage area given. More...
 

Function Documentation

◆ convert_to_40()

uint32_t offline_eformat::old::convert_to_40 ( const uint32_t *  src,
uint32_t *  dest,
uint32_t  max,
eformat::CheckSum  event_checksum = eformat::NO_CHECKSUM,
eformat::CheckSum  rob_checksum = eformat::NO_CHECKSUM 
)

Converts a full event fragment or a ROS fragment, from some format to v4.0 format, using the space of contiguous memory storage area given.

If the event given is already on the current format, no conversion takes place.

Parameters
srcA pointer to the first word of the event, lying in a contiguous area of memory.
destThe destination area of memory, preallocated
maxThe maximum number of words that fit in the preallocated memory area "dest".
event_checksumWhat type of checksum to deploy for full events
rob_checksumWhat type of checksum to deploy for rob fragments
Returns
A counter, for the number of words copied from the source to the destination. If that number is zero, something wrong happened.

Definition at line 21 of file util.cxx.

24 {
25  switch (eformat::peek_type(src)) {
26  case eformat::FULL_EVENT:
27  switch (eformat::peek_major_version(src)) {
28  case ::MAJOR_V50_VERSION:
29  return offline_eformat::v50::convert_to_40(src, dest, max, event_checksum, rob_checksum);
30  case eformat::MAJOR_V40_VERSION:
31  // 40 -> to 40 works (makes a byte-level copy and ignores checksum flags)
32  return offline_eformat::v40::convert_to_40(src, dest, max, event_checksum, rob_checksum);
33  default:
34  throw EFORMAT_BAD_VERSION(eformat::peek_major_version(src), ::MAJOR_V50_VERSION);
35  }
36  default:
37  throw EFORMAT_UNSUPPORTED_OPERATION("convert to v40 format", src[0]);
38  }
39  return 0; //this cannot not happen...
40 }
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
perfmonmt-printer.dest
dest
Definition: perfmonmt-printer.py:189
offline_eformat::v40::convert_to_40
uint32_t convert_to_40(const uint32_t *src, uint32_t *dest, uint32_t max, eformat::CheckSum, eformat::CheckSum)
Definition: v40_util.cxx:13
offline_eformat::v50::convert_to_40
uint32_t convert_to_40(const uint32_t *src, uint32_t *dest, uint32_t max, eformat::CheckSum event_checksum, eformat::CheckSum rob_checksum)
Definition: v50_util.cxx:42