Skip to content

Commit 2c9f7a0

Browse files
committed
Use Fragment constructor
1 parent 5167fa1 commit 2c9f7a0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

artdaq-mu2e/Generators/CFOZmqReceiver_generator.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ void mu2e::CFOZmqReceiver::receiveCFOData_()
153153
}
154154

155155
// Process the received data and create an artdaq Fragment
156-
auto frag = artdaq::Fragment::FragmentBytes(sizeof(CFOLib::CFO_EventRecord),
157-
static_cast<artdaq::Fragment::sequence_id_t>(timestamp),
158-
fragment_id(),
159-
FragmentType::CFO,
160-
static_cast<artdaq::Fragment::timestamp_t>(timestamp));
156+
auto frag = std::make_unique<artdaq::Fragment>(static_cast<artdaq::Fragment::sequence_id_t>(timestamp),
157+
fragment_id(),
158+
FragmentType::CFO,
159+
static_cast<artdaq::Fragment::timestamp_t>(timestamp));
160+
frag->resizeBytes(sizeof(CFOLib::CFO_EventRecord));
161161
std::memcpy(frag->dataBegin(), cfoEvent.GetRawBufferPointer(), sizeof(CFOLib::CFO_EventRecord));
162162
{
163163
std::lock_guard<std::mutex> lock(frag_mutex_);

0 commit comments

Comments
 (0)