11 #include "StorableTimeslice.hpp"
13 #include "FairMQLogger.h"
14 #include "FairMQProgOptions.h"
16 #include <boost/archive/binary_iarchive.hpp>
22 using std::runtime_error::runtime_error;
38 int noChannel = fChannels.size();
39 LOG(info) <<
"Number of defined input channels: " << noChannel;
40 for (
auto const& entry : fChannels) {
41 LOG(info) <<
"Channel name: " << entry.first;
47 LOG(error) << e.what();
55 std::size_t pos1 = channelName.find(entry);
56 if (pos1 != std::string::npos) {
57 const vector<std::string>::const_iterator
pos =
60 LOG(info) <<
"Found " << entry <<
" in " << channelName;
61 LOG(info) <<
"Channel name " << channelName
62 <<
" found in list of allowed channel names at position "
67 LOG(info) <<
"Channel name " << channelName
68 <<
" not found in list of allowed channel names.";
69 LOG(error) <<
"Stop device.";
80 LOG(info) <<
"Received message number " <<
fNumMessages <<
" with size "
83 std::string msgStr(
static_cast<char*
>(msg->GetData()), msg->GetSize());
84 std::istringstream iss(msgStr);
85 boost::archive::binary_iarchive inputArchive(iss);
87 fles::StorableTimeslice component {0};
88 inputArchive >> component;
98 const fles::MicrosliceDescriptor& mdsc) {
99 LOG(info) <<
"Header ID: Ox" << std::hex << static_cast<int>(mdsc.hdr_id)
101 LOG(info) <<
"Header version: Ox" << std::hex
102 <<
static_cast<int>(mdsc.hdr_ver) << std::dec;
103 LOG(info) <<
"Equipement ID: " << mdsc.eq_id;
104 LOG(info) <<
"Flags: " << mdsc.flags;
105 LOG(info) <<
"Sys ID: Ox" << std::hex << static_cast<int>(mdsc.sys_id)
107 LOG(info) <<
"Sys version: Ox" << std::hex << static_cast<int>(mdsc.sys_ver)
109 LOG(info) <<
"Microslice Idx: " << mdsc.idx;
110 LOG(info) <<
"Checksum: " << mdsc.crc;
111 LOG(info) <<
"Size: " << mdsc.size;
112 LOG(info) <<
"Offset: " << mdsc.offset;
116 if (0 == ts.num_components()) {
117 LOG(error) <<
"No Component in TS " << ts.index();
120 LOG(info) <<
"Found " << ts.num_components()
121 <<
" different components in timeslice";
123 for (
size_t c = 0; c < ts.num_components(); ++c) {
124 LOG(info) <<
"Found " << ts.num_microslices(c)
125 <<
" microslices in component " << c;
126 LOG(info) <<
"Component " << c <<
" has a size of " << ts.size_component(c)
128 LOG(info) <<
"Sys ID: Ox" << std::hex
129 <<
static_cast<int>(ts.descriptor(0, 0).sys_id) << std::dec;