40 , fInputFileList(new TObjString())
47 , fHistoMissedTS(nullptr)
48 , fHistoMissedTSEvo(nullptr)
49 , fNofTSSinceLastTS(0)
53 , fbWriteOutput(kFALSE)
54 , fTimeSliceMetaDataArray(nullptr)
65 std::string fileList {
""};
67 std::string fileName =
dynamic_cast<TObjString*
>(obj)->GetString().Data();
76 dynamic_cast<fles::TimesliceMultiSubscriber*
>(
fSource.get())->InitTimesliceSubscriber();
78 if (!
fSource) { LOG(fatal) <<
"Could not connect to publisher."; }
82 std::string fileList {
""};
84 std::string fileName =
dynamic_cast<TObjString*
>(obj)->GetString().Data();
89 LOG(info) <<
"Input File String: " << fileList;
92 fSource.reset(
new fles::TimesliceMultiInputArchive(fileList));
101 LOG(info) <<
"Initialize " << (*itUnp)->GetName();
105 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
108 fHistoMissedTSEvo =
new TProfile(
"Missed_TS_Evo",
"Missed TS evolution; TS Idx []", 100000, 0., 10000000.);
116 FairRootManager* ioman = FairRootManager::Instance();
117 if (NULL == ioman) { LOG(fatal) <<
"No FairRootManager instance"; }
134 LOG(warning) <<
"Chosen last spill index larger than spills contained in chosen spill start vector: "
138 LOG(warning) <<
"Using last possible spill instead as final one";
141 LOG(fatal) <<
"Start index also too large, exiting";
151 LOG(warning) <<
"Chosen last spill index larger than spills contained in chosen spill start vector: "
155 LOG(warning) <<
"Using last possible spill instead as final one";
158 LOG(fatal) <<
"Start index also too large, exiting";
168 LOG(warning) <<
"Chosen last spill index larger than spills contained in chosen spill start vector: "
172 LOG(warning) <<
"Using last possible spill instead as final one";
175 LOG(fatal) <<
"Start index also too large, exiting";
231 LOG(info) <<
"Header ID: Ox" << std::hex << static_cast<int>(mdsc.hdr_id) << std::dec;
232 LOG(info) <<
"Header version: Ox" << std::hex << static_cast<int>(mdsc.hdr_ver) << std::dec;
233 LOG(info) <<
"Equipement ID: " << mdsc.eq_id;
234 LOG(info) <<
"Flags: " << mdsc.flags;
235 LOG(info) <<
"Sys ID: Ox" << std::hex << static_cast<int>(mdsc.sys_id) << std::dec;
236 LOG(info) <<
"Sys version: Ox" << std::hex << static_cast<int>(mdsc.sys_ver) << std::dec;
237 LOG(info) <<
"Microslice Idx: " << mdsc.idx;
238 LOG(info) <<
"Checksum: " << mdsc.crc;
239 LOG(info) <<
"Size: " << mdsc.size;
240 LOG(info) <<
"Offset: " << mdsc.offset;
275 while (
auto timeslice =
fSource->get()) {
279 const fles::Timeslice& ts = *timeslice;
280 auto tsIndex = ts.index();
282 LOG(debug) <<
"Missed Timeslices. Old TS Number was " <<
fTSNumber <<
" New TS Number is " << tsIndex;
297 for (
size_t c {0}; c < ts.num_components(); c++) {
298 auto systemID =
static_cast<int>(ts.descriptor(c, 0).sys_id);
299 LOG(info) <<
"Found systemID: " << std::hex << systemID << std::dec;
302 auto it_list =
fUnpackers.equal_range(systemID);
303 if (it_list.first == it_list.second) {
304 LOG(info) <<
"Could not find unpacker for system id 0x" << std::hex << systemID << std::dec;
307 for (
auto it = it_list.first; it != it_list.second; ++it) {
308 it->second->AddMsComponentToList(c, systemID);
309 it->second->SetNbMsInTs(ts.num_core_microslices(), ts.num_microslices(c) - ts.num_core_microslices());
315 auto nMsInTs = ts.num_core_microslices();
318 auto msDescA = ts.descriptor(0, 1);
319 auto msDescB = ts.descriptor(0, 2);
320 auto msLength = msDescB.idx - msDescA.idx;
323 LOG(info) <<
"CbmMcbm2018Source::FillBuffer() - TS 1 - Calculated "
324 <<
"TimesliceMetaData information from microslices Metadata -> "
325 <<
"MS length found to be " << msLength <<
" ns, TS length " <<
fTSLength
329 LOG(warning) <<
"CbmMcbm2018Source::FillBuffer() - TS 1 - Calculate "
330 "TimesliceMetaData information - single microslice timeslices -> "
331 "TS duration can not be calculated with the given method. Hence, "
332 "TimesliceMetaData duration values are filled with 0";
352 (*itUnp)->DoUnpack(ts, 0);