GeezerVison is showing github.com — Drop o2::byte (#6253) · kkimura0623/AliceO2@bc86bb4
File treeExpand file treeCollapse file tree Open diff view settings include/TPCReconstruction
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: Algorithm/include/Algorithm/TableView.h +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -79,7 +79,7 @@ class TableView | 79 | 79 |
| 80 | 80 | /// descriptor pointing to payload of one frame | 81 | 81 | struct FrameData { | 82 | | - const byte* buffer = nullptr; | | 82 | + const std::byte* buffer = nullptr; | 83 | 83 | size_t size = 0; | 84 | 84 | }; | 85 | 85 |
| @@ -94,7 +94,7 @@ class TableView | 94 | 94 | * @param seqSize Length of sequence | 95 | 95 | * @return number of inserted elements | 96 | 96 | */ | 97 | | - size_t addRow(RowDescType rowData, byte* seqData, size_t seqSize) | | 97 | + size_t addRow(RowDescType rowData, std::byte* seqData, size_t seqSize) | 98 | 98 | { | 99 | 99 | unsigned nFrames = mFrames.size(); | 100 | 100 | unsigned currentRow = mRowData.size(); | @@ -118,7 +118,7 @@ class TableView | 118 | 118 |
| 119 | 119 | // insert frame descriptor under key composed from header and row | 120 | 120 | auto result = mFrames.emplace(FrameIndex{*entry.header, currentRow}, | 121 | | - FrameData{entry.payload, entry.length}); | | 121 | + FrameData{(std::byte*)entry.payload, entry.length}); | 122 | 122 | return result.second; | 123 | 123 | }); | 124 | 124 | auto insertedFrames = mFrames.size() - nFrames; | |
Collapse file Copy file name to clipboardExpand all lines: Algorithm/test/tableview.cxx +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -78,8 +78,8 @@ BOOST_AUTO_TEST_CASE(test_tableview_reverse) | 78 | 78 | dh2.subSpecification = 0xdeadbeef; | 79 | 79 | dh2.payloadSize = 0; | 80 | 80 |
| 81 | | - heartbeatview.addRow(dh1, tf1.buffer.get(), tf1.size()); | 82 | | - heartbeatview.addRow(dh2, tf2.buffer.get(), tf2.size()); | | 81 | + heartbeatview.addRow(dh1, (std::byte*)tf1.buffer.get(), tf1.size()); | | 82 | + heartbeatview.addRow(dh2, (std::byte*)tf2.buffer.get(), tf2.size()); | 83 | 83 |
| 84 | 84 | std::cout << "slots: " << heartbeatview.getNRows() | 85 | 85 | << " columns: " << heartbeatview.getNColumns() | @@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(test_tableview_formaterror) | 145 | 145 | dh.subSpecification = 0; | 146 | 146 | dh.payloadSize = 0; | 147 | 147 |
| 148 | | - heartbeatview.addRow(dh, tf1.buffer.get(), tf1.size()); | | 148 | + heartbeatview.addRow(dh, (std::byte*)tf1.buffer.get(), tf1.size()); | 149 | 149 |
| 150 | 150 | BOOST_CHECK(heartbeatview.getNRows() == 0); | 151 | 151 | BOOST_CHECK(heartbeatview.getNColumns() == 0); | |
Collapse file Copy file name to clipboardExpand all lines: DataFormats/Headers/include/Headers/DataHeader.h +10-13Lines changed: 10 additions & 13 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 30 | 30 | #ifndef ALICEO2_BASE_DATA_HEADER_ | 31 | 31 | #define ALICEO2_BASE_DATA_HEADER_ | 32 | 32 |
| | 33 | +#include <cstddef> | 33 | 34 | #include <cstdint> | 34 | 35 | #include <memory> | 35 | 36 | #include <cassert> | 36 | 37 | #include <cstring> //needed for memcmp | 37 | | -#include <algorithm> // std::min | 38 | | -#include <stdexcept> | 39 | 38 | #include <string> | | 39 | +#include <stdexcept> | 40 | 40 | #include <climits> | 41 | 41 | #include <limits> | 42 | | -// FIXME: for o2::byte. Use std::byte as soon as we move to C++17.. | 43 | | -#include "MemoryResources/Types.h" | 44 | | -#include <cerrno> | 45 | 42 |
| 46 | 43 | namespace o2::header | 47 | 44 | { | @@ -241,7 +238,7 @@ struct Descriptor { | 241 | 238 | { | 242 | 239 | static_assert(L <= N + 1, "initializer string must not exceed descriptor size"); | 243 | 240 | unsigned i = 0; | 244 | | - for (; in[i] && i < std::min(N, L); ++i) { | | 241 | + for (; in[i] && i < (N < L ? N : L); ++i) { | 245 | 242 | str[i] = in[i]; | 246 | 243 | } | 247 | 244 | } | @@ -392,7 +389,7 @@ struct BaseHeader { | 392 | 389 | /// @brief access header in buffer | 393 | 390 | /// | 394 | 391 | /// this is to guess if the buffer starting at b looks like a header | 395 | | - inline static const BaseHeader* get(const o2::byte* b, size_t /*len*/ = 0) | | 392 | + inline static const BaseHeader* get(const std::byte* b, size_t /*len*/ = 0) | 396 | 393 | { | 397 | 394 | return (b != nullptr && *(reinterpret_cast<const uint32_t*>(b)) == sMagicString) | 398 | 395 | ? reinterpret_cast<const BaseHeader*>(b) | @@ -402,27 +399,27 @@ struct BaseHeader { | 402 | 399 | /// @brief access header in buffer | 403 | 400 | /// | 404 | 401 | /// this is to guess if the buffer starting at b looks like a header | 405 | | - inline static BaseHeader* get(o2::byte* b, size_t /*len*/ = 0) | | 402 | + inline static BaseHeader* get(std::byte* b, size_t /*len*/ = 0) | 406 | 403 | { | 407 | 404 | return (b != nullptr && *(reinterpret_cast<uint32_t*>(b)) == sMagicString) ? reinterpret_cast<BaseHeader*>(b) | 408 | 405 | : nullptr; | 409 | 406 | } | 410 | 407 |
| 411 | 408 | constexpr uint32_t size() const noexcept { return headerSize; } | 412 | | - inline const o2::byte* data() const noexcept { return reinterpret_cast<const o2::byte*>(this); } | | 409 | + inline const std::byte* data() const noexcept { return reinterpret_cast<const std::byte*>(this); } | 413 | 410 |
| 414 | 411 | /// get the next header if any (const version) | 415 | 412 | inline const BaseHeader* next() const noexcept | 416 | 413 | { | 417 | 414 | // BaseHeader::get checks that next header starts with the BaseHeader information at the | 418 | 415 | // offset given by the size of the current header. | 419 | | - return (flagsNextHeader) ? BaseHeader::get(reinterpret_cast<const o2::byte*>(this) + headerSize) : nullptr; | | 416 | + return (flagsNextHeader) ? BaseHeader::get(reinterpret_cast<const std::byte*>(this) + headerSize) : nullptr; | 420 | 417 | } | 421 | 418 |
| 422 | 419 | /// get the next header if any (non-const version) | 423 | 420 | inline BaseHeader* next() noexcept | 424 | 421 | { | 425 | | - return (flagsNextHeader) ? BaseHeader::get(reinterpret_cast<o2::byte*>(this) + headerSize) : nullptr; | | 422 | + return (flagsNextHeader) ? BaseHeader::get(reinterpret_cast<std::byte*>(this) + headerSize) : nullptr; | 426 | 423 | } | 427 | 424 |
| 428 | 425 | /// check if the header matches expected version | @@ -441,7 +438,7 @@ struct BaseHeader { | 441 | 438 | /// use like this: | 442 | 439 | /// HeaderType* h = get<HeaderType*>(buffer) | 443 | 440 | template <typename HeaderType, typename std::enable_if_t<std::is_pointer<HeaderType>::value, int> = 0> | 444 | | -auto get(const o2::byte* buffer, size_t /*len*/ = 0) | | 441 | +auto get(const std::byte* buffer, size_t /*len*/ = 0) | 445 | 442 | { | 446 | 443 | using HeaderConstPtrType = const typename std::remove_pointer<HeaderType>::type*; | 447 | 444 | using HeaderValueType = typename std::remove_pointer<HeaderType>::type; | @@ -482,7 +479,7 @@ auto get(const o2::byte* buffer, size_t /*len*/ = 0) | 482 | 479 | template <typename HeaderType, typename std::enable_if_t<std::is_pointer<HeaderType>::value, int> = 0> | 483 | 480 | auto get(const void* buffer, size_t len = 0) | 484 | 481 | { | 485 | | - return get<HeaderType>(reinterpret_cast<const byte*>(buffer), len); | | 482 | + return get<HeaderType>(reinterpret_cast<const std::byte*>(buffer), len); | 486 | 483 | } | 487 | 484 |
| 488 | 485 | //__________________________________________________________________________________________________ | |
Collapse file Copy file name to clipboardExpand all lines: DataFormats/Headers/include/Headers/Stack.h +13-13Lines changed: 13 additions & 13 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -39,12 +39,12 @@ struct Stack { | 39 | 39 | struct freeobj { | 40 | 40 | freeobj(memory_resource* mr) : resource(mr) {} | 41 | 41 | memory_resource* resource{nullptr}; | 42 | | - void operator()(o2::byte* ptr) { resource->deallocate(ptr, 0, 0); } | | 42 | + void operator()(std::byte* ptr) { resource->deallocate(ptr, 0, 0); } | 43 | 43 | }; | 44 | 44 |
| 45 | 45 | public: | 46 | | - using allocator_type = boost::container::pmr::polymorphic_allocator<o2::byte>; | 47 | | - using value_type = o2::byte; | | 46 | + using allocator_type = boost::container::pmr::polymorphic_allocator<std::byte>; | | 47 | + using value_type = std::byte; | 48 | 48 | using BufferType = std::unique_ptr<value_type[], freeobj>; //this gives us proper default move semantics for free | 49 | 49 |
| 50 | 50 | Stack() = default; | @@ -57,16 +57,16 @@ struct Stack { | 57 | 57 | size_t size() const { return bufferSize; } | 58 | 58 | allocator_type get_allocator() const { return allocator; } | 59 | 59 | const BaseHeader* first() const { return reinterpret_cast<const BaseHeader*>(this->data()); } | 60 | | - static const BaseHeader* firstHeader(o2::byte const* buf) { return BaseHeader::get(buf); } | 61 | | - static const BaseHeader* lastHeader(o2::byte const* buf) | | 60 | + static const BaseHeader* firstHeader(std::byte const* buf) { return BaseHeader::get(buf); } | | 61 | + static const BaseHeader* lastHeader(std::byte const* buf) | 62 | 62 | { | 63 | 63 | const BaseHeader* last{firstHeader(buf)}; | 64 | 64 | while (last && last->flagsNextHeader) { | 65 | 65 | last = last->next(); | 66 | 66 | } | 67 | 67 | return last; | 68 | 68 | } | 69 | | - static size_t headerStackSize(o2::byte const* buf) | | 69 | + static size_t headerStackSize(std::byte const* buf) | 70 | 70 | { | 71 | 71 | size_t result = 0; | 72 | 72 | const BaseHeader* last{firstHeader(buf)}; | @@ -88,7 +88,7 @@ struct Stack { | 88 | 88 | /// all headers must derive from BaseHeader, in addition also other stacks can be passed to ctor. | 89 | 89 | template <typename FirstArgType, typename... Headers, | 90 | 90 | typename std::enable_if_t< | 91 | | - !std::is_convertible<FirstArgType, boost::container::pmr::polymorphic_allocator<o2::byte>>::value, int> = 0> | | 91 | + !std::is_convertible<FirstArgType, boost::container::pmr::polymorphic_allocator<std::byte>>::value, int> = 0> | 92 | 92 | Stack(FirstArgType&& firstHeader, Headers&&... headers) | 93 | 93 | : Stack(boost::container::pmr::new_delete_resource(), std::forward<FirstArgType>(firstHeader), | 94 | 94 | std::forward<Headers>(headers)...) | @@ -100,7 +100,7 @@ struct Stack { | 100 | 100 | Stack(const allocator_type allocatorArg, Headers&&... headers) | 101 | 101 | : allocator{allocatorArg}, | 102 | 102 | bufferSize{calculateSize(std::forward<Headers>(headers)...)}, | 103 | | - buffer{static_cast<o2::byte*>(allocator.resource()->allocate(bufferSize, alignof(std::max_align_t))), freeobj{allocator.resource()}} | | 103 | + buffer{static_cast<std::byte*>(allocator.resource()->allocate(bufferSize, alignof(std::max_align_t))), freeobj{allocator.resource()}} | 104 | 104 | { | 105 | 105 | inject(buffer.get(), std::forward<Headers>(headers)...); | 106 | 106 | } | @@ -117,7 +117,7 @@ struct Stack { | 117 | 117 | constexpr static size_t calculateSize(T&& h) noexcept | 118 | 118 | { | 119 | 119 | //if it's a pointer (to a stack) traverse it | 120 | | - if constexpr (std::is_convertible_v<T, o2::byte*>) { | | 120 | + if constexpr (std::is_convertible_v<T, std::byte*>) { | 121 | 121 | const BaseHeader* next = BaseHeader::get(std::forward<T>(h)); | 122 | 122 | if (!next) { | 123 | 123 | return 0; | @@ -143,7 +143,7 @@ struct Stack { | 143 | 143 |
| 144 | 144 | //______________________________________________________________________________________________ | 145 | 145 | template <typename T> | 146 | | - static o2::byte* inject(o2::byte* here, T&& h, bool more = false) noexcept | | 146 | + static std::byte* inject(std::byte* here, T&& h, bool more = false) noexcept | 147 | 147 | { | 148 | 148 | using headerType = typename std::remove_cv<typename std::remove_reference<T>::type>::type; | 149 | 149 | if (here == nullptr) { | @@ -168,7 +168,7 @@ struct Stack { | 168 | 168 | ::new (static_cast<void*>(here)) headerType(std::forward<T>(h)); | 169 | 169 | reinterpret_cast<BaseHeader*>(here)->flagsNextHeader = more; | 170 | 170 | return here + h.size(); | 171 | | - } else if constexpr (std::is_same_v<headerType, o2::byte*>) { | | 171 | + } else if constexpr (std::is_same_v<headerType, std::byte*>) { | 172 | 172 | BaseHeader* from{BaseHeader::get(h)}; | 173 | 173 | BaseHeader* last{nullptr}; | 174 | 174 | while (from) { | @@ -188,7 +188,7 @@ struct Stack { | 188 | 188 |
| 189 | 189 | //______________________________________________________________________________________________ | 190 | 190 | template <typename T, typename... Args> | 191 | | - static o2::byte* inject(o2::byte* here, T&& h, Args&&... args) noexcept | | 191 | + static std::byte* inject(std::byte* here, T&& h, Args&&... args) noexcept | 192 | 192 | { | 193 | 193 | bool more = hasNonEmptyArg(args...); | 194 | 194 | auto alsohere = inject(here, h, more); | @@ -210,7 +210,7 @@ struct Stack { | 210 | 210 | template <typename T> | 211 | 211 | static bool hasNonEmptyArg(const T& h) noexcept | 212 | 212 | { | 213 | | - if constexpr (std::is_convertible_v<T, o2::byte*>) { | | 213 | + if constexpr (std::is_convertible_v<T, std::byte*>) { | 214 | 214 | return get<BaseHeader*>(h); | 215 | 215 | } else { | 216 | 216 | if (h.size() > 0) { | |
Collapse file Copy file name to clipboardExpand all lines: DataFormats/Headers/src/DataHeader.cxx +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -108,7 +108,7 @@ void o2::header::hexDump(const char* desc, const void* voidaddr, size_t len, siz | 108 | 108 | size_t i; | 109 | 109 | unsigned char buff[17]; // stores the ASCII data | 110 | 110 | memset(&buff[0], '\0', 17); | 111 | | - const byte* addr = reinterpret_cast<const byte*>(voidaddr); | | 111 | + const std::byte* addr = reinterpret_cast<const std::byte*>(voidaddr); | 112 | 112 |
| 113 | 113 | // Output description if given. | 114 | 114 | if (desc != nullptr) { | @@ -143,13 +143,13 @@ void o2::header::hexDump(const char* desc, const void* voidaddr, size_t len, siz | 143 | 143 | } | 144 | 144 |
| 145 | 145 | // Now the hex code for the specific character. | 146 | | - printf(" %02x", addr[i]); | | 146 | + printf(" %02x", (char)addr[i]); | 147 | 147 |
| 148 | 148 | // And store a printable ASCII character for later. | 149 | | - if ((addr[i] < 0x20) || (addr[i] > 0x7e)) { | | 149 | + if (((char)addr[i] < 0x20) || ((char)addr[i] > 0x7e)) { | 150 | 150 | buff[i % 16] = '.'; | 151 | 151 | } else { | 152 | | - buff[i % 16] = addr[i]; | | 152 | + buff[i % 16] = (char)addr[i]; | 153 | 153 | } | 154 | 154 | buff[(i % 16) + 1] = '\0'; | 155 | 155 | fflush(stdout); | |
Collapse file Copy file name to clipboardExpand all lines: DataFormats/MemoryResources/include/MemoryResources/MemoryResources.h +2-3Lines changed: 2 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 41 | 41 | #include <FairMQTransportFactory.h> | 42 | 42 | #include <fairmq/MemoryResources.h> | 43 | 43 | #include <fairmq/MemoryResourceTools.h> | 44 | | -#include "Types.h" | 45 | 44 |
| 46 | 45 | namespace o2 | 47 | 46 | { | @@ -305,8 +304,8 @@ class NoConstructAllocator : public boost::container::pmr::polymorphic_allocator | 305 | 304 | //__________________________________________________________________________________________________ | 306 | 305 | //__________________________________________________________________________________________________ | 307 | 306 |
| 308 | | -using ByteSpectatorAllocator = SpectatorAllocator<o2::byte>; | 309 | | -using BytePmrAllocator = boost::container::pmr::polymorphic_allocator<o2::byte>; | | 307 | +using ByteSpectatorAllocator = SpectatorAllocator<std::byte>; | | 308 | +using BytePmrAllocator = boost::container::pmr::polymorphic_allocator<std::byte>; | 310 | 309 | template <class T> | 311 | 310 | using vector = std::vector<T, o2::pmr::polymorphic_allocator<T>>; | 312 | 311 |
| |
Collapse file Copy file name to clipboardExpand all lines: DataFormats/MemoryResources/include/MemoryResources/Types.h -19Lines changed: 0 additions & 19 deletions Collapse file Copy file name to clipboardExpand all lines: DataFormats/MemoryResources/test/testMemoryResources.cxx +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE(allocator_test) | 82 | 82 | v.emplace_back(1); | 83 | 83 | v.emplace_back(2); | 84 | 84 | v.emplace_back(3); | 85 | | - BOOST_CHECK((byte*)&(*v.end()) - (byte*)&(*v.begin()) == 3 * sizeof(testData)); | | 85 | + BOOST_CHECK((std::byte*)&(*v.end()) - (std::byte*)&(*v.begin()) == 3 * sizeof(testData)); | 86 | 86 | BOOST_CHECK(testData::nconstructions == 3); | 87 | 87 | } | 88 | 88 |
| |
Collapse file Copy file name to clipboardExpand all lines: Detectors/TPC/reconstruction/include/TPCReconstruction/RawReaderCRU.h +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 31 | 31 | #include <gsl/span> | 32 | 32 | #include "DetectorsRaw/RDHUtils.h" | 33 | 33 |
| 34 | | -#include "MemoryResources/Types.h" | 35 | 34 | #include "TPCBase/CRU.h" | 36 | 35 | #include "Headers/RAWDataHeader.h" | 37 | 36 | #include "Headers/RDHAny.h" | @@ -239,7 +238,7 @@ class GBTFrame | 239 | 238 | void getAdcValues(ADCRawData& rawData); | 240 | 239 |
| 241 | 240 | /// read from memory | 242 | | - void readFromMemory(gsl::span<const o2::byte> data); | | 241 | + void readFromMemory(gsl::span<const std::byte> data); | 243 | 242 |
| 244 | 243 | /// read from istream | 245 | 244 | void streamFrom(std::istream& input); | @@ -610,7 +609,7 @@ class RawReaderCRU | 610 | 609 |
| 611 | 610 | /// Process data from memory for a single link | 612 | 611 | /// The data must be collected before, merged over 8k packets | 613 | | - int processMemory(const std::vector<o2::byte>& data, ADCRawData& rawData); | | 612 | + int processMemory(const std::vector<std::byte>& data, ADCRawData& rawData); | 614 | 613 |
| 615 | 614 | /// process links | 616 | 615 | void processLinks(const uint32_t linkMask = 0); | @@ -798,7 +797,7 @@ class RawReaderCRU | 798 | 797 | std::ifstream mFileHandle; ///< file handle for input file | 799 | 798 |
| 800 | 799 | /// collect raw GBT data | 801 | | - void collectGBTData(std::vector<o2::byte>& data); | | 800 | + void collectGBTData(std::vector<std::byte>& data); | 802 | 801 |
| 803 | 802 | /// fill adc data to output map | 804 | 803 | void fillADCdataMap(const ADCRawData& rawData); | @@ -915,7 +914,7 @@ inline void GBTFrame::getAdcValues(ADCRawData& rawData) | 915 | 914 | // std::cout << std::endl; | 916 | 915 | } | 917 | 916 |
| 918 | | -inline void GBTFrame::readFromMemory(gsl::span<const o2::byte> data) | | 917 | +inline void GBTFrame::readFromMemory(gsl::span<const std::byte> data) | 919 | 918 | { | 920 | 919 | assert(sizeof(mData) == data.size_bytes()); | 921 | 920 | memcpy(mData.data(), data.data(), data.size_bytes()); | |
Collapse file Copy file name to clipboardExpand all lines: Detectors/TPC/reconstruction/src/RawReaderCRU.cxx +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -491,7 +491,7 @@ int RawReaderCRU::processPacket(GBTFrame& gFrame, uint32_t startPos, uint32_t si | 491 | 491 | return 0; | 492 | 492 | } | 493 | 493 |
| 494 | | -int RawReaderCRU::processMemory(const std::vector<o2::byte>& data, ADCRawData& rawData) | | 494 | +int RawReaderCRU::processMemory(const std::vector<std::byte>& data, ADCRawData& rawData) | 495 | 495 | { | 496 | 496 | GBTFrame gFrame; | 497 | 497 |
| @@ -507,7 +507,7 @@ int RawReaderCRU::processMemory(const std::vector<o2::byte>& data, ADCRawData& r | 507 | 507 | // reinterpret_cast<const uint32_t*>(data.data() + iFrame * 16), so it could be accessed the | 508 | 508 | // same way as the mData array. | 509 | 509 | // however, this was ~5% slower in execution time. I suspect due to cache misses | 510 | | - gFrame.readFromMemory(gsl::span<const o2::byte>(data.data() + iFrame * 16, 16)); | | 510 | + gFrame.readFromMemory(gsl::span<const std::byte>(data.data() + iFrame * 16, 16)); | 511 | 511 |
| 512 | 512 | // extract the half words from the 4 32-bit words | 513 | 513 | gFrame.getFrameHalfWords(); | @@ -702,7 +702,7 @@ void RawReaderCRU::processDataMemory() | 702 | 702 | //dataSize = 4000 * 16; | 703 | 703 | //} | 704 | 704 |
| 705 | | - std::vector<o2::byte> data; | | 705 | + std::vector<std::byte> data; | 706 | 706 | data.reserve(dataSize); | 707 | 707 | collectGBTData(data); | 708 | 708 |
| @@ -718,7 +718,7 @@ void RawReaderCRU::processDataMemory() | 718 | 718 | } | 719 | 719 | } | 720 | 720 |
| 721 | | -void RawReaderCRU::collectGBTData(std::vector<o2::byte>& data) | | 721 | +void RawReaderCRU::collectGBTData(std::vector<std::byte>& data) | 722 | 722 | { | 723 | 723 | const auto& linkInfoArray = mManager->mEventSync.getLinkInfoArrayForEvent(mEventNumber, mCRU); | 724 | 724 | auto& file = getFileHandle(); | @@ -732,7 +732,7 @@ void RawReaderCRU::collectGBTData(std::vector<o2::byte>& data) | 732 | 732 |
| 733 | 733 | const auto payloadStart = packet.getPayloadOffset(); | 734 | 734 | const auto payloadSize = size_t(packet.getPayloadSize()); | 735 | | - data.insert(data.end(), payloadSize, 0); | | 735 | + data.insert(data.end(), payloadSize, (std::byte)0); | 736 | 736 | // jump to the start position of the packet | 737 | 737 | file.seekg(payloadStart, std::ios::beg); | 738 | 738 |
| |
|