CbmRoot
CbmMQTsaMultiSamplerTof.cxx
Go to the documentation of this file.
1 
10 #include "CbmMQDefs.h"
11 
12 #include "FairMQLogger.h"
13 #include "FairMQProgOptions.h" // device->fConfig
14 
15 #include "StorableTimeslice.hpp"
16 #include "TimesliceInputArchive.hpp"
17 #include "TimesliceMultiInputArchive.hpp"
18 #include "TimesliceMultiSubscriber.hpp"
19 #include "TimesliceSubscriber.hpp"
20 
21 #include <boost/algorithm/string.hpp>
22 #include <boost/archive/binary_oarchive.hpp>
23 #include <boost/filesystem.hpp>
24 #include <boost/regex.hpp>
25 
26 namespace filesys = boost::filesystem;
27 
28 #include <algorithm>
29 #include <chrono>
30 #include <ctime>
31 #include <stdio.h>
32 #include <string>
33 #include <thread> // this_thread::sleep_for
34 
35 using namespace std;
36 
37 #include <stdexcept>
38 
39 static uint fiSelectComponents(0);
40 
41 struct InitTaskError : std::runtime_error {
42  using std::runtime_error::runtime_error;
43 };
44 
46  : FairMQDevice()
47  , fMaxTimeslices(0)
48  , fFileName("")
49  , fDirName("")
50  , fInputFileList()
51  , fFileCounter(0)
52  , fHost("")
53  , fPort(0)
54  , fHighWaterMark(1)
55  , fTSNumber(0)
56  , fTSCounter(0)
57  , fMessageCounter(0)
58  , fSource(nullptr)
59  , fTime() {}
60 
62  // Get the values from the command line options (via fConfig)
63  fFileName = fConfig->GetValue<string>("filename");
64  fDirName = fConfig->GetValue<string>("dirname");
65  fHost = fConfig->GetValue<string>("flib-host");
66  fPort = fConfig->GetValue<uint64_t>("flib-port");
67  fHighWaterMark = fConfig->GetValue<uint64_t>("high-water-mark");
68  fMaxTimeslices = fConfig->GetValue<uint64_t>("max-timeslices");
69  if (0 == fMaxTimeslices) fMaxTimeslices = UINT_MAX;
70  fiSelectComponents = fConfig->GetValue<uint64_t>("SelectComponents");
71 
72  if (0 == fMaxTimeslices) fMaxTimeslices = UINT_MAX;
73 
74  // Check which input is defined
75  // Posibilities
76  // filename && ! dirname : single file
77  // filename with wildcards && diranme : all files with filename regex in the directory
78  // host && port : connect to the flim server
79 
80  bool isGoodInputCombi {false};
81  if (0 != fFileName.size() && 0 == fDirName.size() && 0 == fHost.size()
82  && 0 == fPort) {
83  isGoodInputCombi = true;
84  fInputFileList.push_back(fFileName);
85  } else if (0 != fFileName.size() && 0 != fDirName.size() && 0 == fHost.size()
86  && 0 == fPort) {
87  isGoodInputCombi = true;
88  fInputFileList.push_back(fFileName);
89  } else if (0 == fFileName.size() && 0 == fDirName.size() && 0 != fHost.size()
90  && 0 != fPort) {
91  isGoodInputCombi = true;
92  LOG(info) << "Host: " << fHost;
93  LOG(info) << "Port: " << fPort;
94  } else if (0 == fFileName.size() && 0 == fDirName.size() && 0 != fHost.size()
95  && 0 == fPort) {
96  isGoodInputCombi = true;
97  LOG(info) << "Host string: " << fHost;
98  } else if (0 == fFileName.size() && 0 == fDirName.size() && 0 != fHost.size()
99  && 0 == fPort) {
100  isGoodInputCombi = true;
101  LOG(INFO) << "Host string: " << fHost;
102  } else {
103  isGoodInputCombi = false;
104  }
105 
106 
107  if (!isGoodInputCombi) {
108  throw InitTaskError(
109  "Wrong combination of inputs. Either file or wildcard file + directory "
110  "or host + port are allowed combination.");
111  }
112 
113 
114  LOG(info) << "MaxTimeslices: " << fMaxTimeslices;
115 
116  // Get the information about created channels from the device
117  // Check if the defined channels from the topology (by name)
118  // are in the list of channels which are possible/allowed
119  // for the device
120  // The idea is to check at initilization if the devices are
121  // properly connected. For the time beeing this is done with a
122  // nameing convention. It is not avoided that someone sends other
123  // data on this channel.
124  int noChannel = fChannels.size();
125  LOG(info) << "Number of defined output channels: " << noChannel;
126  for (auto const& entry : fChannels) {
127  LOG(info) << "Channel name: " << entry.first;
128  if (!IsChannelNameAllowed(entry.first))
129  throw InitTaskError("Channel name does not match.");
130  }
131 
132  for (auto const& value : fComponentsToSend) {
133  LOG(info) << "Value : " << value;
134  if (value > 1) {
135  throw InitTaskError("Sending same data to more than one output channel "
136  "not implemented yet.");
137  }
138  }
139 
140 
141  if (0 == fFileName.size() && 0 != fHost.size() && 0 != fPort) {
142  // Don't add the protocol since this is done now in the TimesliceMultiSubscriber
143  //std::string connector = "tcp://" + fHost + ":" + std::to_string(fPort);
144  std::string connector = fHost + ":" + std::to_string(fPort);
145  LOG(info) << "Open TSPublisher at " << connector;
146  fSource = new fles::TimesliceMultiSubscriber(connector);
147  } else if (0 == fFileName.size() && 0 != fHost.size()) {
148  std::string connector = fHost;
149  LOG(info) << "Open TSPublisher with host string: " << connector;
150  fSource = new fles::TimesliceMultiSubscriber(connector, fHighWaterMark);
151  } else {
152  // Create a ";" separated string with all file names
153  std::string fileList {""};
154  for (const auto obj : fInputFileList) {
155  std::string fileName = obj;
156  fileList += fileName;
157  fileList += ";";
158  }
159  fileList.pop_back(); // Remove the last ;
160  LOG(info) << "Input File String: " << fileList;
161  fSource = new fles::TimesliceMultiInputArchive(fileList, fDirName);
162  if (!fSource) { throw InitTaskError("Could open files from file list."); }
163  }
164 
165  fTime = std::chrono::steady_clock::now();
166 } catch (InitTaskError& e) {
167  LOG(error) << e.what();
168  // Wrapper defined in CbmMQDefs.h to support different FairMQ versions
170 }
171 
172 bool CbmMQTsaMultiSamplerTof::IsChannelNameAllowed(std::string channelName) {
173 
174  for (auto const& entry : fAllowedChannels) {
175  LOG(info) << "Looking for name " << channelName << " in " << entry;
176  std::size_t pos1 = channelName.find(entry);
177  if (pos1 != std::string::npos) {
178  const vector<std::string>::const_iterator pos =
179  std::find(fAllowedChannels.begin(), fAllowedChannels.end(), entry);
180  const vector<std::string>::size_type idx = pos - fAllowedChannels.begin();
181  LOG(info) << "Found " << entry << " in " << channelName;
182  LOG(info) << "Channel name " << channelName
183  << " found in list of allowed channel names at position "
184  << idx;
185  if (idx < 3) { //FIXME, hardwired constant!!!
186  fComponentsToSend[idx]++;
187  fChannelsToSend[idx].push_back(channelName);
188  }
189  return true;
190  }
191  }
192  LOG(info) << "Channel name " << channelName
193  << " not found in list of allowed channel names.";
194  LOG(error) << "Stop device.";
195  return false;
196 }
197 
198 bool CbmMQTsaMultiSamplerTof::IsChannelUp(std::string channelName) {
199  for (auto const& entry : fChannels) {
200  LOG(info) << "Inspect " << entry.first;
201  std::size_t pos1 = channelName.find(entry.first);
202  if (pos1 != std::string::npos) {
203  LOG(info) << "Channel name " << channelName
204  << " found in list of defined channel names ";
205  return true;
206  }
207  }
208  LOG(info) << "Channel name " << channelName
209  << " not found in list of defined channel names.";
210  LOG(error) << "Stop device.";
211  return false;
212 }
213 
215  auto timeslice = fSource->get();
216  if (timeslice) {
217  if (fTSCounter < fMaxTimeslices) {
218  fTSCounter++;
219 
220  const fles::Timeslice& ts = *timeslice;
221  auto tsIndex = ts.index();
222 
223  if (fTSCounter % 10000 == 0)
224  LOG(info) << "Sample TimeSlice " << fTSCounter << ", Index " << tsIndex;
225 
226  LOG(debug) << "Found " << ts.num_components()
227  << " different components in timeslice " << fTSCounter
228  << ", index " << tsIndex;
229 
230 
231  CheckTimeslice(ts);
232  /*
233  for (int nrComp = 0; nrComp < ts.num_components(); ++nrComp) {
234  CreateAndSendComponent(ts, nrComp);
235  }
236  */
237  // keep components together
238  std::vector<FairMQParts> parts;
239  std::vector<bool> bparts;
240  parts.resize(fComponentsToSend.size());
241  bparts.resize(parts.size());
242  for (uint i = 0; i < bparts.size(); i++)
243  bparts[i] = false;
244 
245  switch (fiSelectComponents) {
246  case 0: { // send complete timeslice
247  int iSysId = 0x60;
248  const vector<int>::const_iterator pos =
249  std::find(fSysId.begin(), fSysId.end(), iSysId);
250  if (pos != fSysId.end()) {
251  const vector<std::string>::size_type idx = pos - fSysId.begin();
252  if (fComponentsToSend[idx] > 0) {
253  fles::StorableTimeslice tss = fles::StorableTimeslice(ts);
254 
255 
256  std::stringstream oss;
257  boost::archive::binary_oarchive oa(oss);
258  oa << tss;
259  std::string* strMsg = new std::string(oss.str());
260  LOG(debug) << "AddPart " << idx << " with length "
261  << strMsg->length();
262 
263  parts[idx].AddPart(NewMessage(
264  const_cast<char*>(strMsg->c_str()), // data
265  strMsg->length(), // size
266  [](void* /*data*/, void* object) {
267  delete static_cast<std::string*>(object);
268  },
269  strMsg)); // object that manages the data
270  LOG(debug) << "AddParts to " << idx << ": current size "
271  << parts[idx].Size();
272  bparts[idx] = true;
273  }
274  }
275  } break;
276 
277  case 1: {
278  LOG(debug) << "parts with size " << parts.size()
279  << ", #components: " << ts.num_components();
280 
281  for (uint nrComp = 0; nrComp < ts.num_components(); ++nrComp) {
282  // CreateAndCombineComponents(ts, nrComp);
283  LOG(debug) << "nrComp " << nrComp << ", SysID: "
284  << static_cast<int>(ts.descriptor(nrComp, 0).sys_id);
285  int iSysId = static_cast<int>(ts.descriptor(nrComp, 0).sys_id);
286  if (iSysId == 0x90 || iSysId == 0x91)
287  iSysId = 0x60; // treat t0 like tof
288  const vector<int>::const_iterator pos =
289  std::find(fSysId.begin(), fSysId.end(), iSysId);
290  if (pos != fSysId.end()) {
291  const vector<std::string>::size_type idx = pos - fSysId.begin();
292  if (fComponentsToSend[idx] > 0) {
293  LOG(debug) << "Append timeslice component of link " << nrComp
294  << " to idx " << idx;
295 
296  fles::StorableTimeslice component {static_cast<uint32_t>(
297  ts.num_microslices(nrComp), ts.index())};
298  component.append_component(ts.num_microslices(0));
299 
300  for (size_t m = 0; m < ts.num_microslices(nrComp); ++m) {
301  component.append_microslice(
302  0, m, ts.descriptor(nrComp, m), ts.content(nrComp, m));
303  }
304 
305  //LOG(debug)<<"Parts size available for "<<idx<<": "<<parts.size();
306  //if(idx > parts.size()-1) parts.resize(idx+1);
307 
308  //if ( !AppendData(component, idx) ) return false;
309  // serialize the timeslice and create the message
310  std::stringstream oss;
311  boost::archive::binary_oarchive oa(oss);
312  oa << component;
313  std::string* strMsg = new std::string(oss.str());
314 
315  LOG(debug) << "AddParts to " << idx << ": current size "
316  << parts[idx].Size();
317 
318  parts[idx].AddPart(NewMessage(
319  const_cast<char*>(strMsg->c_str()), // data
320  strMsg->length(), // size
321  [](void* /*data*/, void* object) {
322  delete static_cast<std::string*>(object);
323  },
324  strMsg)); // object that manages the data
325 
326  bparts[idx] = true;
327  }
328  }
329  }
330  } break;
331 
332  default:;
333  }
334 
335  for (uint idx = 0; idx < parts.size(); idx++)
336  if (bparts[idx]) {
337  LOG(debug) << "Send parts with size " << parts[idx].Size()
338  << " to channel " << fChannelsToSend[idx][0];
339  if (Send(parts[idx], fChannelsToSend[idx][0]) < 0) {
340  LOG(error) << "Problem sending data";
341  return false;
342  }
343  LOG(debug) << "Sent message " << fMessageCounter << " with a size of "
344  << parts[idx].Size();
345  fMessageCounter++;
346  }
347 
348  //if(!SendTs()) return false;
349  return true;
350  } else {
351  LOG(info) << " Number of requested time slices reached, exiting ";
352  SendSysCmdStop();
353  return false;
354  }
355  } else {
356  LOG(info) << " No more data, exiting ";
357  SendSysCmdStop();
358  return false;
359  }
360 }
361 
363  const fles::Timeslice& /*ts*/,
364  int /*nrComp*/) {
365 
366  // Check if component has to be send. If the corresponding channel
367  // is connected append it to parts
368  /*
369  LOG(debug) <<"nrComp "<< nrComp<< ", SysID: " << static_cast<int>(ts.descriptor(nrComp,0).sys_id);
370  const vector<int>::const_iterator pos =
371  std::find(fSysId.begin(), fSysId.end(), static_cast<int>(ts.descriptor(nrComp,0).sys_id));
372  if (pos != fSysId.end() ) {
373  const vector<std::string>::size_type idx = pos-fSysId.begin();
374  if (fComponentsToSend[idx]>0) {
375  LOG(debug) << "Append timeslice component of link " << nrComp<< " to idx "<<idx;
376 
377  fles::StorableTimeslice component{static_cast<uint32_t>(ts.num_microslices(nrComp), ts.index())};
378  component.append_component(ts.num_microslices(0));
379 
380  for (size_t m = 0; m < ts.num_microslices(nrComp); ++m) {
381  component.append_microslice( 0, m, ts.descriptor(nrComp, m), ts.content(nrComp, m) );
382  }
383 
384  //LOG(debug)<<"Parts size available for "<<idx<<": "<<parts.size();
385  if(idx > parts.size()-1) parts.resize(idx+1);
386 
387  if ( !AppendData(component, idx) ) return false;
388  bparts[idx]=true;
389  return true;
390  }
391  }
392  */
393  return true;
394 }
395 
397  const fles::StorableTimeslice& /*component*/,
398  int /*idx*/) {
399  // serialize the timeslice and create the message
400  /*
401  std::stringstream oss;
402  boost::archive::binary_oarchive oa(oss);
403  oa << component;
404  std::string* strMsg = new std::string(oss.str());
405 
406  LOG(debug)<<"AddParts to "<<idx<<": current size "<<parts[idx].Size();
407 
408  parts[idx].AddPart(NewMessage(const_cast<char*>(strMsg->c_str()), // data
409  strMsg->length(), // size
410  [](void*, void* object){ delete static_cast<std::string*>(object); },
411  strMsg)); // object that manages the data
412  */
413  return true;
414 }
415 
417  /*
418  for (int idx=0; idx<parts.size(); idx++)
419  if(bparts[idx]){
420  LOG(debug) << "Send data to channel " << fChannelsToSend[idx][0];
421  if (Send(parts[idx], fChannelsToSend[idx][0]) < 0) {
422  LOG(error) << "Problem sending data";
423  return false;
424  }
425 
426  fMessageCounter++;
427  LOG(debug) << "Send message " << fMessageCounter << " with a size of "
428  << parts[idx].Size();
429  }
430  */
431  return true;
432 }
433 
434 bool CbmMQTsaMultiSamplerTof::CreateAndSendComponent(const fles::Timeslice& ts,
435  int nrComp) {
436 
437  // Check if component has to be send. If the corresponding channel
438  // is connected create the new timeslice and send it to the
439  // correct channel
440 
441  LOG(debug) << "SysID: " << static_cast<int>(ts.descriptor(nrComp, 0).sys_id);
442  const vector<int>::const_iterator pos =
443  std::find(fSysId.begin(),
444  fSysId.end(),
445  static_cast<int>(ts.descriptor(nrComp, 0).sys_id));
446  if (pos != fSysId.end()) {
447  const vector<std::string>::size_type idx = pos - fSysId.begin();
448  if (fComponentsToSend[idx] > 0) {
449  LOG(debug) << "Create timeslice component for link " << nrComp;
450 
451  fles::StorableTimeslice component {
452  static_cast<uint32_t>(ts.num_core_microslices()), ts.index()};
453  component.append_component(ts.num_microslices(nrComp));
454 
455  for (size_t m = 0; m < ts.num_microslices(nrComp); ++m) {
456  component.append_microslice(
457  0, m, ts.descriptor(nrComp, m), ts.content(nrComp, m));
458  }
459  if (!SendData(component, idx)) return false;
460  return true;
461  }
462  }
463  return true;
464 }
465 
466 bool CbmMQTsaMultiSamplerTof::SendData(const fles::StorableTimeslice& component,
467  int idx) {
468  // serialize the timeslice and create the message
469  std::stringstream oss;
470  boost::archive::binary_oarchive oa(oss);
471  oa << component;
472  std::string* strMsg = new std::string(oss.str());
473 
474  FairMQMessagePtr msg(NewMessage(
475  const_cast<char*>(strMsg->c_str()), // data
476  strMsg->length(), // size
477  [](void* /*data*/, void* object) {
478  delete static_cast<std::string*>(object);
479  },
480  strMsg)); // object that manages the data
481 
482  // TODO: Implement sending same data to more than one channel
483  // Need to create new message (copy message??)
484  if (fComponentsToSend[idx] > 1) { LOG(debug) << "Need to copy FairMessage"; }
485 
486  // in case of error or transfer interruption,
487  // return false to go to IDLE state
488  // successfull transfer will return number of bytes
489  // transfered (can be 0 if sending an empty message).
490 
491  LOG(debug) << "Send data to channel " << fChannelsToSend[idx][0];
492  if (Send(msg, fChannelsToSend[idx][0]) < 0) {
493  LOG(error) << "Problem sending data";
494  return false;
495  }
496 
497  fMessageCounter++;
498  LOG(debug) << "Send message " << fMessageCounter << " with a size of "
499  << msg->GetSize();
500 
501  return true;
502 }
503 
504 
506 
508  std::chrono::duration<double> run_time =
509  std::chrono::steady_clock::now() - fTime;
510 
511  LOG(info) << "Runtime: " << run_time.count();
512  LOG(info) << "No more input data";
513 }
514 
515 
517  const fles::MicrosliceDescriptor& mdsc) {
518  LOG(info) << "Header ID: Ox" << std::hex << static_cast<int>(mdsc.hdr_id)
519  << std::dec;
520  LOG(info) << "Header version: Ox" << std::hex
521  << static_cast<int>(mdsc.hdr_ver) << std::dec;
522  LOG(info) << "Equipement ID: " << mdsc.eq_id;
523  LOG(info) << "Flags: " << mdsc.flags;
524  LOG(info) << "Sys ID: Ox" << std::hex << static_cast<int>(mdsc.sys_id)
525  << std::dec;
526  LOG(info) << "Sys version: Ox" << std::hex << static_cast<int>(mdsc.sys_ver)
527  << std::dec;
528  LOG(info) << "Microslice Idx: " << mdsc.idx;
529  LOG(info) << "Checksum: " << mdsc.crc;
530  LOG(info) << "Size: " << mdsc.size;
531  LOG(info) << "Offset: " << mdsc.offset;
532 }
533 
534 bool CbmMQTsaMultiSamplerTof::CheckTimeslice(const fles::Timeslice& ts) {
535  if (0 == ts.num_components()) {
536  LOG(error) << "No Component in TS " << ts.index();
537  return 1;
538  }
539  LOG(debug) << "Found " << ts.num_components()
540  << " different components in timeslice";
541 
542  for (size_t c = 0; c < ts.num_components(); ++c) {
543  LOG(debug) << "Found " << ts.num_microslices(c)
544  << " microslices in component " << c;
545  LOG(debug) << "Component " << c << " has a size of " << ts.size_component(c)
546  << " bytes";
547  LOG(debug) << "Component " << c << " has the system id 0x" << std::hex
548  << static_cast<int>(ts.descriptor(c, 0).sys_id) << std::dec;
549  /*
550  if(ts.descriptor(c,0).sys_id == 0x90 ) { // found a t0 - timeslice
551  ts.descriptor(c,0).sys_id = 0x60; // rename t0 to tof , not allowed
552  }
553  */
554  /*
555  LOG(debug) << "Component " << c << " has the system id 0x"
556  << static_cast<int>(ts.descriptor(c,0).sys_id);
557  */
558  /*
559  for (size_t m = 0; m < ts.num_microslices(c); ++m) {
560  PrintMicroSliceDescriptor(ts.descriptor(c,m));
561  }
562 */
563  }
564 
565  return true;
566 }
567 
569  if (IsChannelUp("syscmd")) {
570  LOG(info) << "stop subscribers in 10 sec";
571  std::this_thread::sleep_for(std::chrono::milliseconds(10000));
572 
573  FairMQMessagePtr pub(NewSimpleMessage("STOP"));
574  if (Send(pub, "syscmd") < 0) {
575  LOG(error) << "Sending STOP message failed";
576  }
577 
578  LOG(info) << "task reset subscribers in 1 sec";
579  std::this_thread::sleep_for(std::chrono::milliseconds(1000));
580  FairMQMessagePtr task_reset(NewSimpleMessage("TASK_RESET"));
581 
582  if (Send(task_reset, "syscmd") < 0) {
583  LOG(error) << "Sending Task_Reset message failed";
584  }
585  }
586  // FairMQStateMachine::ChangeState(STOP);
587 }
CbmMQTsaMultiSamplerTof::CheckTimeslice
bool CheckTimeslice(const fles::Timeslice &ts)
Definition: CbmMQTsaMultiSamplerTof.cxx:534
CbmMQTsaMultiSamplerTof::AppendData
bool AppendData(const fles::StorableTimeslice &, int)
Definition: CbmMQTsaMultiSamplerTof.cxx:396
CbmMQTsaMultiSamplerTof::SendSysCmdStop
void SendSysCmdStop()
Definition: CbmMQTsaMultiSamplerTof.cxx:568
CbmMQTsaMultiSamplerTof::fHighWaterMark
uint64_t fHighWaterMark
Definition: CbmMQTsaMultiSamplerTof.h:38
CbmMQTsaMultiSamplerTof::PrintMicroSliceDescriptor
void PrintMicroSliceDescriptor(const fles::MicrosliceDescriptor &mdsc)
Definition: CbmMQTsaMultiSamplerTof.cxx:516
CbmMQTsaMultiSamplerTof::fTSCounter
uint64_t fTSCounter
Definition: CbmMQTsaMultiSamplerTof.h:41
CbmMQTsaMultiSamplerTof::fMaxTimeslices
uint64_t fMaxTimeslices
Definition: CbmMQTsaMultiSamplerTof.h:29
CbmMQTsaMultiSamplerTof::InitTask
virtual void InitTask()
Definition: CbmMQTsaMultiSamplerTof.cxx:61
CbmMQTsaMultiSamplerTof::CbmMQTsaMultiSamplerTof
CbmMQTsaMultiSamplerTof()
Definition: CbmMQTsaMultiSamplerTof.cxx:45
InitTaskError
CBM headers.
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:36
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMQTsaMultiSamplerTof::fFileName
std::string fFileName
Definition: CbmMQTsaMultiSamplerTof.h:31
CbmMQTsaMultiSamplerTof::fSource
fles::TimesliceSource * fSource
Definition: CbmMQTsaMultiSamplerTof.h:65
CbmMQTsaMultiSamplerTof::fPort
uint64_t fPort
Definition: CbmMQTsaMultiSamplerTof.h:37
cbm::mq::Transition::ErrorFound
@ ErrorFound
CbmMQTsaMultiSamplerTof::IsChannelNameAllowed
bool IsChannelNameAllowed(std::string)
Definition: CbmMQTsaMultiSamplerTof.cxx:172
CbmMQTsaMultiSamplerTof::fDirName
std::string fDirName
Definition: CbmMQTsaMultiSamplerTof.h:32
CbmMQTsaMultiSamplerTof::fMessageCounter
uint64_t fMessageCounter
Definition: CbmMQTsaMultiSamplerTof.h:42
CbmMQTsaMultiSamplerTof::CreateAndSendComponent
bool CreateAndSendComponent(const fles::Timeslice &, int)
Definition: CbmMQTsaMultiSamplerTof.cxx:434
CbmMQTsaMultiSamplerTof::fHost
std::string fHost
Definition: CbmMQTsaMultiSamplerTof.h:36
CbmMQTsaMultiSamplerTof::fComponentsToSend
std::vector< int > fComponentsToSend
Definition: CbmMQTsaMultiSamplerTof.h:88
CbmMQTsaMultiSamplerTof::SendData
bool SendData(const fles::StorableTimeslice &component)
CbmMQTsaMultiSamplerTof::fInputFileList
std::vector< std::string > fInputFileList
List of input files.
Definition: CbmMQTsaMultiSamplerTof.h:34
CbmMQTsaMultiSamplerTof::fChannelsToSend
std::vector< std::vector< std::string > > fChannelsToSend
Definition: CbmMQTsaMultiSamplerTof.h:89
CbmMQTsaMultiSamplerTof::fAllowedChannels
std::vector< std::string > fAllowedChannels
Definition: CbmMQTsaMultiSamplerTof.h:80
CbmMQTsaMultiSamplerTof::~CbmMQTsaMultiSamplerTof
virtual ~CbmMQTsaMultiSamplerTof()
Definition: CbmMQTsaMultiSamplerTof.cxx:505
CbmMQTsaMultiSamplerTof.h
CbmMQTsaMultiSamplerTof::fSysId
std::vector< int > fSysId
Definition: CbmMQTsaMultiSamplerTof.h:85
CbmMQTsaMultiSamplerTof::SendTs
bool SendTs()
Definition: CbmMQTsaMultiSamplerTof.cxx:416
CbmMQTsaMultiSamplerTof::CalcRuntime
void CalcRuntime()
Definition: CbmMQTsaMultiSamplerTof.cxx:507
CbmMQTsaMultiSamplerTof::fTime
std::chrono::steady_clock::time_point fTime
Definition: CbmMQTsaMultiSamplerTof.h:66
CbmMQTsaMultiSamplerTof::IsChannelUp
bool IsChannelUp(std::string)
Definition: CbmMQTsaMultiSamplerTof.cxx:198
m
__m128 m
Definition: L1/vectors/P4_F32vec4.h:26
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmMQDefs.h
CbmMQTsaMultiSamplerTof::ConditionalRun
virtual bool ConditionalRun()
Definition: CbmMQTsaMultiSamplerTof.cxx:214
cbm::mq::ChangeState
void ChangeState(FairMQDevice *device, cbm::mq::Transition transition)
Definition: CbmMQDefs.h:19
CbmMQTsaMultiSamplerTof::CreateAndCombineComponents
bool CreateAndCombineComponents(const fles::Timeslice &, int)
Definition: CbmMQTsaMultiSamplerTof.cxx:362
fiSelectComponents
static uint fiSelectComponents(0)