CbmRoot
CbmDeviceEventBuilderEtofStar2019.cxx
Go to the documentation of this file.
1 
6 #include "CbmMQDefs.h"
7 
9 #include "CbmStar2019TofPar.h"
10 
11 #include "StorableTimeslice.hpp"
12 
13 #include "FairMQLogger.h"
14 #include "FairMQProgOptions.h" // device->fConfig
15 #include "FairParGenericSet.h"
16 #include "FairRuntimeDb.h"
17 
18 #include "TFile.h"
19 #include "TH1.h"
20 #include "TH2.h"
21 #include "THttpServer.h"
22 #include "TROOT.h"
23 #include "TString.h"
24 
25 #include <boost/archive/binary_iarchive.hpp>
26 #include <boost/archive/binary_oarchive.hpp>
27 
28 // include this header to serialize vectors
29 #include <boost/serialization/vector.hpp>
30 
31 #include <array>
32 #include <iomanip>
33 #include <string>
34 
35 #include <stdexcept>
36 struct InitTaskError : std::runtime_error {
37  using std::runtime_error::runtime_error;
38 };
39 
40 using namespace std;
41 
42 //static Int_t iMess=0;
43 const Int_t DetMask = 0x003FFFFF;
44 static uint fiSelectComponents {0};
45 
47  : //CbmDeviceUnpackTofMcbm2018(),
48  fNumMessages(0)
49  , fbMonitorMode(kFALSE)
50  , fbDebugMonitorMode(kFALSE)
51  , fbSandboxMode(kFALSE)
52  , fbEventDumpEna(kFALSE)
53  , fParCList(nullptr)
54  , fulTsCounter(0)
55  , fNumEvt(0)
56  , fEventBuilderAlgo(nullptr)
57  , fTimer()
58  , fUnpackPar(nullptr)
59  , fpBinDumpFile(nullptr) {
61 }
62 
64  delete fEventBuilderAlgo;
65 }
66 
68  // Get the information about created channels from the device
69  // Check if the defined channels from the topology (by name)
70  // are in the list of channels which are possible/allowed
71  // for the device
72  // The idea is to check at initilization if the devices are
73  // properly connected. For the time beeing this is done with a
74  // nameing convention. It is not avoided that someone sends other
75  // data on this channel.
76  //logger::SetLogLevel("INFO");
77 
78  int noChannel = fChannels.size();
79  LOG(info) << "Number of defined channels: " << noChannel;
80  for (auto const& entry : fChannels) {
81  LOG(info) << "Channel name: " << entry.first;
82  if (!IsChannelNameAllowed(entry.first))
83  throw InitTaskError("Channel name does not match.");
84  if (entry.first == "syscmd") {
86  continue;
87  }
88  //if(entry.first != "etofevts") OnData(entry.first, &CbmDeviceEventBuilderEtofStar2019::HandleData);
89  if (entry.first != "etofevts")
91  else {
92  fChannelsToSend[0].push_back(entry.first);
93  LOG(info) << "Init to send data to channel " << fChannelsToSend[0][0];
94  }
95  }
97 } catch (InitTaskError& e) {
98  LOG(error) << e.what();
99  // Wrapper defined in CbmMQDefs.h to support different FairMQ versions
101 }
102 
104  std::string channelName) {
105  for (auto const& entry : fAllowedChannels) {
106  LOG(info) << "Inspect " << entry;
107  std::size_t pos1 = channelName.find(entry);
108  if (pos1 != std::string::npos) {
109  const vector<std::string>::const_iterator pos =
110  std::find(fAllowedChannels.begin(), fAllowedChannels.end(), entry);
111  const vector<std::string>::size_type idx = pos - fAllowedChannels.begin();
112  LOG(info) << "Found " << entry << " in " << channelName;
113  LOG(info) << "Channel name " << channelName
114  << " found in list of allowed channel names at position "
115  << idx;
116  return true;
117  }
118  }
119  LOG(info) << "Channel name " << channelName
120  << " not found in list of allowed channel names.";
121  LOG(error) << "Stop device.";
122  return false;
123 }
124 
126  LOG(info)
127  << "Init parameter containers for CbmDeviceEventBuilderEtofStar2019.";
128  // FairRuntimeDb* fRtdb = FairRuntimeDb::instance();
129 
130  // NewSimpleMessage creates a copy of the data and takes care of its destruction (after the transfer takes place).
131  // Should only be used for small data because of the cost of an additional copy
132  std::string message {"CbmStar2019TofPar,111"};
133  LOG(info)
134  << "Requesting parameter container CbmStar2019TofPar, sending message: "
135  << message;
136 
137  FairMQMessagePtr req(NewSimpleMessage("CbmStar2019TofPar,111"));
138  FairMQMessagePtr rep(NewMessage());
139 
140  if (Send(req, "parameters") > 0) {
141  if (Receive(rep, "parameters") >= 0) {
142  if (rep->GetSize() != 0) {
143  CbmMQTMessage tmsg(rep->GetData(), rep->GetSize());
144  fUnpackPar =
145  dynamic_cast<CbmStar2019TofPar*>(tmsg.ReadObject(tmsg.GetClass()));
146  LOG(info) << "Received unpack parameter from parmq server: "
147  << fUnpackPar;
148  fUnpackPar->Print();
149  } else {
150  LOG(error) << "Received empty reply. Parameter not available";
151  }
152  }
153  }
154 
155 
157 
158  Bool_t initOK = kTRUE;
159  initOK &= fEventBuilderAlgo->InitContainers();
160  initOK &= ReInitContainers(); // needed for TInt parameters
162 
163  if (kTRUE == fbMonitorMode) { // CreateHistograms();
164  initOK &= fEventBuilderAlgo->CreateHistograms();
165 
167  std::vector<std::pair<TNamed*, std::string>> vHistos =
169  /* FIXME
171  THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
172  for( UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto )
173  {
174  server->Register( Form( "/%s", vHistos[ uHisto ].second.data() ), vHistos[ uHisto ].first );
175  } // for( UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto )
176 
177  server->RegisterCommand("/Reset_EvtBuild_Hist", "bStarEtof2019EventBuilderResetHistos=kTRUE");
178  server->Restrict("/Reset_EvtBuild_Hist", "allow=admin");
179  */
180  } // if( kTRUE == fbMonitorMode )
181 
182  return initOK;
183 }
184 
186  FairRuntimeDb* fRtdb = FairRuntimeDb::instance();
187 
189 
190  LOG(info) << "Setting parameter containers for " << fParCList->GetEntries()
191  << " entries ";
192 
193  for (Int_t iparC = 0; iparC < fParCList->GetEntries(); ++iparC) {
194  FairParGenericSet* tempObj = (FairParGenericSet*) (fParCList->At(iparC));
195  fParCList->Remove(tempObj);
196 
197  std::string sParamName {tempObj->GetName()};
198 
199  FairParGenericSet* newObj =
200  dynamic_cast<FairParGenericSet*>(fRtdb->getContainer(sParamName.data()));
201  LOG(info) << " - Get " << sParamName.data() << " at " << newObj;
202  if (nullptr == newObj) {
203 
204  LOG(error) << "Failed to obtain parameter container " << sParamName
205  << ", for parameter index " << iparC;
206  return;
207  } // if( nullptr == newObj )
208  if (iparC == 0) {
209  newObj = (FairParGenericSet*) fUnpackPar;
210  LOG(info) << " - Mod " << sParamName.data() << " to " << newObj;
211  }
212  fParCList->AddAt(newObj, iparC);
213  // delete tempObj;
214  } // for( Int_t iparC = 0; iparC < fParCList->GetEntries(); ++iparC )
215 }
216 
218  size_t component,
219  UShort_t usDetectorId) {
220  fEventBuilderAlgo->AddMsComponentToList(component, usDetectorId);
221 }
222 
223 Bool_t CbmDeviceEventBuilderEtofStar2019::DoUnpack(const fles::Timeslice& ts,
224  size_t /*component*/) {
225  if (0 == fulTsCounter) {
226  LOG(info) << "FIXME ===> Jumping 1st TS as corrupted with current FW + "
227  "FLESNET combination";
228  fulTsCounter++;
229  return kTRUE;
230  } // if( 0 == fulTsCounter )
231  if (kFALSE == fEventBuilderAlgo->ProcessTs(ts)) {
232  LOG(error) << "Failed processing TS " << ts.index()
233  << " in event builder algorithm class";
234  return kTRUE;
235  } // if( kFALSE == fEventBuilderAlgo->ProcessTs( ts ) )
236 
237  std::vector<CbmTofStarSubevent2019>& eventBuffer =
239 
240  for (UInt_t uEvent = 0; uEvent < eventBuffer.size(); ++uEvent) {
242  Int_t iBuffSzByte = 0;
243  void* pDataBuff = eventBuffer[uEvent].BuildOutput(iBuffSzByte);
244  if (NULL != pDataBuff) {
246  // Bool_t fbSendEventToStar = kFALSE;
247  if (kFALSE == fbSandboxMode) {
248  /*
249  ** Function to send sub-event block to the STAR DAQ system
250  * trg_word received is packed as:
251  *
252  * trg_cmd|daq_cmd|tkn_hi|tkn_mid|tkn_lo
253  */
254  /*
255  star_rhicf_write( eventBuffer[ uEvent ].GetTrigger().GetStarTrigerWord(),
256  pDataBuff, iBuffSzByte );
257  */
258 
259  SendSubevent(eventBuffer[uEvent].GetTrigger().GetStarTrigerWord(),
260  (char*) pDataBuff,
261  iBuffSzByte,
262  0);
263 
264  } // if( kFALSE == fbSandboxMode )
265 
266  LOG(debug) << "Sent STAR event with size " << iBuffSzByte << " Bytes"
267  << " and token "
268  << eventBuffer[uEvent].GetTrigger().GetStarToken();
269  } // if( NULL != pDataBuff )
270  else
271  LOG(error) << "Invalid STAR SubEvent Output, can only happen if trigger "
272  << " object was not set => Do Nothing more with it!!! ";
273  } // for( UInt_t uEvent = 0; uEvent < eventBuffer.size(); ++uEvent )
274 
275  return kTRUE;
276 }
277 
278 
280  LOG(info)
281  << "ReInit parameter containers for CbmDeviceEventBuilderEtofStar2019";
282  Bool_t initOK = fEventBuilderAlgo->ReInitContainers();
283  return initOK;
284 }
285 
286 // handler is called whenever a message arrives on "data", with a reference to the message and a sub-channel index (here 0)
288  int /*index*/) {
289  // Don't do anything with the data
290  // Maybe add an message counter which counts the incomming messages and add
291  // an output
292  fNumMessages++;
293  LOG(debug) << "Received message number " << fNumMessages << " with size "
294  << msg->GetSize();
295 
296  std::string msgStr(static_cast<char*>(msg->GetData()), msg->GetSize());
297  std::istringstream iss(msgStr);
298  boost::archive::binary_iarchive inputArchive(iss);
299 
300  fles::StorableTimeslice component {0};
301  inputArchive >> component;
302 
303  CheckTimeslice(component);
304 
305  DoUnpack(component, 0);
306 
307  // if(fNumMessages%10000 == 0) LOG(info)<<"Processed "<<fNumMessages<<" time slices";
308 
309  return true;
310 }
311 
312 static Double_t dctime = 0.;
313 
315  int /*index*/) {
316  // Don't do anything with the data
317  // Maybe add an message counter which counts the incomming messages and add
318  // an output
319  fNumMessages++;
320  LOG(debug) << "Received message number " << fNumMessages << " with "
321  << parts.Size() << " parts";
322 
323  fles::StorableTimeslice ts {0}; // rename ??? FIXME
324 
325  switch (fiSelectComponents) {
326  case 0: {
327  std::string msgStr(static_cast<char*>(parts.At(0)->GetData()),
328  (parts.At(0))->GetSize());
329  std::istringstream iss(msgStr);
330  boost::archive::binary_iarchive inputArchive(iss);
331  inputArchive >> ts;
332  CheckTimeslice(ts);
333  if (1 == fNumMessages) {
334  LOG(info) << "Initialize TS components list to " << ts.num_components();
335  for (size_t c {0}; c < ts.num_components(); c++) {
336  auto systemID = static_cast<int>(ts.descriptor(c, 0).sys_id);
337  LOG(info) << "Found systemID: " << std::hex << systemID << std::dec;
338  fEventBuilderAlgo->AddMsComponentToList(c, systemID); // TOF data
339  }
340  }
341  } break;
342  case 1: {
343  fles::StorableTimeslice component {0};
344 
345  uint ncomp = parts.Size();
346  for (uint i = 0; i < ncomp; i++) {
347  std::string msgStr(static_cast<char*>(parts.At(i)->GetData()),
348  (parts.At(i))->GetSize());
349  std::istringstream iss(msgStr);
350  boost::archive::binary_iarchive inputArchive(iss);
351  //fles::StorableTimeslice component{i};
352  inputArchive >> component;
353 
354  CheckTimeslice(component);
355  fEventBuilderAlgo->AddMsComponentToList(i, 0x60); // TOF data
356  LOG(debug) << "HandleParts message " << fNumMessages << " with indx "
357  << component.index();
358  }
359  } break;
360  default:;
361  }
362 
363  if (kFALSE == fEventBuilderAlgo->ProcessTs(ts)) {
364  LOG(error) << "Failed processing TS " << ts.index()
365  << " in event builder algorithm class";
366  return kTRUE;
367  } // if( kFALSE == fEventBuilderAlgo->ProcessTs( ts ) )
368 
369  std::vector<CbmTofStarSubevent2019>& eventBuffer =
371  LOG(debug) << "Process time slice " << fNumMessages << " with "
372  << eventBuffer.size() << " events";
373 
374  //if(fNumMessages%10000 == 0) LOG(info)<<"Processed "<<fNumMessages<<" time slices";
375 
376  for (UInt_t uEvent = 0; uEvent < eventBuffer.size(); ++uEvent) {
378  Int_t iBuffSzByte = 0;
379  void* pDataBuff = eventBuffer[uEvent].BuildOutput(iBuffSzByte);
380  if (NULL != pDataBuff) {
382  // Send to Star TriggerHandler, TBD
383  if (kFALSE == fbSandboxMode) {
384  /*
385  ** Function to send sub-event block to the STAR DAQ system
386  * trg_word received is packed as:
387  *
388  * trg_cmd|daq_cmd|tkn_hi|tkn_mid|tkn_lo
389  */
390  /*
391  star_rhicf_write( eventBuffer[ uEvent ].GetTrigger().GetStarTrigerWord(),
392  pDataBuff, iBuffSzByte );
393  */
394  } // if( kFALSE == fbSandboxMode )
395  SendSubevent(eventBuffer[uEvent].GetTrigger().GetStarTrigerWord(),
396  (char*) pDataBuff,
397  iBuffSzByte,
398  0);
399 
400  LOG(debug) << "Sent STAR event " << uEvent << " with size " << iBuffSzByte
401  << " Bytes"
402  << ", token "
403  << eventBuffer[uEvent].GetTrigger().GetStarToken()
404  << ", TrigWord "
405  << eventBuffer[uEvent].GetTrigger().GetStarTrigerWord();
406  }
407  }
408 
409  if (0 == fulTsCounter % 10000) {
410  LOG(info) << "Processed " << fulTsCounter
411  << " TS, CPUtime: " << dctime / 10. << " ms/TS";
412  dctime = 0.;
413  }
414  fulTsCounter++;
415  return true;
416 }
417 
419  int /*index*/) {
420  const char* cmd = (char*) (msg->GetData());
421  const char cmda[4] = {*cmd};
422  LOG(info) << "Handle message " << cmd << ", " << cmd[0];
423  cbm::mq::LogState(this);
424 
425  // only one implemented so far "Stop"
426 
427  if (strcmp(cmda, "STOP")) {
428  LOG(info) << "STOP";
430  cbm::mq::LogState(this);
432  cbm::mq::LogState(this);
434  cbm::mq::LogState(this);
436  cbm::mq::LogState(this);
437  }
438  return true;
439 }
440 
441 
443  const fles::Timeslice& ts) {
444  if (0 == ts.num_components()) {
445  LOG(error) << "No Component in TS " << ts.index();
446  return 1;
447  }
448  auto tsIndex = ts.index();
449 
450  LOG(debug) << "Found " << ts.num_components()
451  << " different components in timeslice " << tsIndex;
452 
453  /*
454  for (size_t c = 0; c < ts.num_components(); ++c) {
455  LOG(debug) << "Found " << ts.num_microslices(c)
456  << " microslices in component " << c;
457  LOG(debug) << "Component " << c << " has a size of "
458  << ts.size_component(c) << " bytes";
459  LOG(debug) << "Sys ID: Ox" << std::hex << static_cast<int>(ts.descriptor(0,0).sys_id)
460  << std::dec;
461 
462  for (size_t m = 0; m < ts.num_microslices(c); ++m) {
463  PrintMicroSliceDescriptor(ts.descriptor(c,m));
464  }
465  }
466 */
467  return true;
468 }
469 
470 bool CbmDeviceEventBuilderEtofStar2019::SendEvent(std::vector<Int_t> vdigi,
471  int idx) {
472  LOG(debug) << "Send Data for event " << fNumEvt << " with size "
473  << vdigi.size() << Form(" at %p ", &vdigi);
474  // LOG(debug) << "EventHeader: "<< fEventHeader[0] << " " << fEventHeader[1] << " " << fEventHeader[2] << " " << fEventHeader[3];
475 
476  std::stringstream oss;
477  boost::archive::binary_oarchive oa(oss);
478  oa << vdigi;
479  std::string* strMsg = new std::string(oss.str());
480 
481  FairMQParts parts;
482  parts.AddPart(NewMessage(
483  const_cast<char*>(strMsg->c_str()), // data
484  strMsg->length(), // size
485  [](void*, void* object) { delete static_cast<std::string*>(object); },
486  strMsg)); // object that manages the data
487 
488  LOG(debug) << "Send data to channel " << idx << " "
489  << fChannelsToSend[idx][0];
490 
491 
492  // if (Send(msg, fChannelsToSend[idx][0]) < 0) {
493  if (Send(parts, fChannelsToSend[idx][0]) < 0) {
494  LOG(error) << "Problem sending data " << fChannelsToSend[idx][0];
495  return false;
496  }
497  fNumEvt++;
498  //if(fNumEvt==100) FairMQStateMachine::ChangeState(PAUSE); //sleep(10000); // Stop for debugging ...
499  return true;
500 }
501 
503  char* pData,
504  int nData,
505  int idx) {
506 
507  LOG(debug) << "SendSubevent " << fNumEvt << ", TrigWord " << trig
508  << " with size " << nData << Form(" at %p ", pData);
509 
510  std::stringstream ossE;
511  boost::archive::binary_oarchive oaE(ossE);
512  oaE << trig;
513  std::string* strMsgE = new std::string(ossE.str());
514 
515  /*
516  std::stringstream oss;
517  boost::archive::binary_oarchive oa(oss);
518  oa << cData;
519  std::string* strMsg = new std::string(oss.str());
520  */
521 
522  std::string* strMsg = new std::string(pData, nData);
523 
524  FairMQParts parts;
525  parts.AddPart(NewMessage(
526  const_cast<char*>(strMsgE->c_str()), // data
527  strMsgE->length(), // size
528  [](void*, void* object) { delete static_cast<std::string*>(object); },
529  strMsgE)); // object that manages the data
530 
531  parts.AddPart(NewMessage(
532  const_cast<char*>(strMsg->c_str()), // data
533  strMsg->length(), // size
534  [](void*, void* object) { delete static_cast<std::string*>(object); },
535  strMsg)); // object that manages the data
536 
537  LOG(debug) << "Send data to channel " << idx << " "
538  << fChannelsToSend[idx][0];
539 
540 
541  // if (Send(msg, fChannelsToSend[idx][0]) < 0) {
542  if (Send(parts, fChannelsToSend[idx][0]) < 0) {
543  LOG(error) << "Problem sending data " << fChannelsToSend[idx][0];
544  return false;
545  }
546  fNumEvt++;
547  //if(fNumEvt==100) FairMQStateMachine::ChangeState(PAUSE); //sleep(10000); // Stop for debugging ...
548  return true;
549 }
550 
552 
554  if (NULL != fpBinDumpFile) {
555  LOG(info) << "Closing binary file used for event dump.";
556  fpBinDumpFile->close();
557  } // if( NULL != fpBinDumpFile )
558 
560  if (kTRUE == fbMonitorMode) {
562  std::vector<std::pair<TNamed*, std::string>> vHistos =
564 
566  TDirectory* oldDir = NULL;
567  TFile* histoFile = NULL;
568  // Store current directory position to allow restore later
569  oldDir = gDirectory;
570  // open separate histo file in recreate mode
571  histoFile = new TFile("data/eventBuilderMonHist.root", "RECREATE");
572  histoFile->cd();
573 
575  for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) {
577  gDirectory->mkdir(vHistos[uHisto].second.data());
578  gDirectory->cd(vHistos[uHisto].second.data());
579 
581  vHistos[uHisto].first->Write();
582 
583  histoFile->cd();
584  } // for( UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto )
585 
586  // Restore original directory position
587  oldDir->cd();
588  histoFile->Close();
589  } // if( kTRUE == fbMonitorMode )
590 }
CbmDeviceEventBuilderEtofStar2019::CheckTimeslice
bool CheckTimeslice(const fles::Timeslice &ts)
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:442
CbmStar2019EventBuilderEtofAlgo::GetParList
TList * GetParList()
Definition: CbmStar2019EventBuilderEtofAlgo.cxx:175
CbmDeviceEventBuilderEtofStar2019::fbSandboxMode
Bool_t fbSandboxMode
Switch ON the filling of a additional set of histograms.
Definition: CbmDeviceEventBuilderEtofStar2019.h:63
DetMask
const Int_t DetMask
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:43
CbmStar2019EventBuilderEtofAlgo.h
CbmStar2019Algo::GetHistoVector
std::vector< std::pair< TNamed *, std::string > > GetHistoVector()
Definition: CbmStar2019Algo.h:84
CbmStar2019EventBuilderEtofAlgo::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmStar2019EventBuilderEtofAlgo.cxx:163
CbmDeviceEventBuilderEtofStar2019::InitTask
virtual void InitTask()
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:67
CbmDeviceEventBuilderEtofStar2019::fParCList
TList * fParCList
Switch ON the dumping of the events to a binary file.
Definition: CbmDeviceEventBuilderEtofStar2019.h:68
CbmDeviceEventBuilderEtofStar2019::fUnpackPar
CbmStar2019TofPar * fUnpackPar
Definition: CbmDeviceEventBuilderEtofStar2019.h:87
InitTaskError
CBM headers.
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:36
CbmDeviceEventBuilderEtofStar2019::InitContainers
Bool_t InitContainers()
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:125
CbmDeviceEventBuilderEtofStar2019::DoUnpack
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:223
CbmStar2019EventBuilderEtofAlgo::AddMsComponentToList
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Definition: CbmStar2019EventBuilderEtofAlgo.cxx:329
CbmDeviceEventBuilderEtofStar2019::CbmDeviceEventBuilderEtofStar2019
CbmDeviceEventBuilderEtofStar2019()
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:46
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
cbm::mq::Transition::End
@ End
CbmStar2019EventBuilderEtofAlgo::InitContainers
Bool_t InitContainers()
Definition: CbmStar2019EventBuilderEtofAlgo.cxx:157
CbmDeviceEventBuilderEtofStar2019::AddMsComponentToList
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Temp until we change from CbmMcbmUnpack to something else.
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:217
dctime
static Double_t dctime
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:312
CbmMQTMessage
Definition: CbmDeviceEventBuilderEtofStar2019.h:96
CbmStar2019EventBuilderEtofAlgo::CreateHistograms
Bool_t CreateHistograms()
Definition: CbmStar2019EventBuilderEtofAlgo.cxx:1805
CbmDeviceEventBuilderEtofStar2019.h
CbmDeviceEventBuilderEtofStar2019::HandleMessage
bool HandleMessage(FairMQMessagePtr &, int)
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:418
cbm::mq::Transition::ErrorFound
@ ErrorFound
CbmDeviceEventBuilderEtofStar2019::fEventBuilderAlgo
CbmStar2019EventBuilderEtofAlgo * fEventBuilderAlgo
Processing algo.
Definition: CbmDeviceEventBuilderEtofStar2019.h:84
CbmDeviceEventBuilderEtofStar2019::fAllowedChannels
std::vector< std::string > fAllowedChannels
Definition: CbmDeviceEventBuilderEtofStar2019.h:77
CbmDeviceEventBuilderEtofStar2019::IsChannelNameAllowed
bool IsChannelNameAllowed(std::string channelName)
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:103
CbmStar2019EventBuilderEtofAlgo
Definition: CbmStar2019EventBuilderEtofAlgo.h:31
cbm::mq::LogState
void LogState(FairMQDevice *device)
Definition: CbmMQDefs.h:53
CbmStar2019EventBuilderEtofAlgo::GetEventBuffer
std::vector< CbmTofStarSubevent2019 > & GetEventBuffer()
Definition: CbmStar2019EventBuilderEtofAlgo.h:55
fiSelectComponents
static uint fiSelectComponents
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:44
CbmDeviceEventBuilderEtofStar2019::fbMonitorMode
Bool_t fbMonitorMode
Control flags.
Definition: CbmDeviceEventBuilderEtofStar2019.h:60
CbmDeviceEventBuilderEtofStar2019::HandleParts
bool HandleParts(FairMQParts &, int)
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:314
CbmDeviceEventBuilderEtofStar2019::fpBinDumpFile
std::fstream * fpBinDumpFile
Event dump to binary file.
Definition: CbmDeviceEventBuilderEtofStar2019.h:90
CbmDeviceEventBuilderEtofStar2019::fChannelsToSend
std::vector< std::vector< std::string > > fChannelsToSend
Definition: CbmDeviceEventBuilderEtofStar2019.h:81
CbmDeviceEventBuilderEtofStar2019::SendEvent
virtual bool SendEvent(std::vector< Int_t >, int)
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:470
CbmStar2019TofPar.h
cbm::mq::Transition::Ready
@ Ready
CbmDeviceEventBuilderEtofStar2019::SendSubevent
virtual bool SendSubevent(uint, char *, int, int)
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:502
CbmDeviceEventBuilderEtofStar2019::Reset
virtual void Reset()
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:551
CbmStar2019EventBuilderEtofAlgo::ProcessTs
Bool_t ProcessTs(const fles::Timeslice &ts)
Definition: CbmStar2019EventBuilderEtofAlgo.cxx:346
CbmStar2019TofPar
Definition: CbmStar2019TofPar.h:18
CbmDeviceEventBuilderEtofStar2019::Finish
virtual void Finish()
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:553
CbmDeviceEventBuilderEtofStar2019::~CbmDeviceEventBuilderEtofStar2019
virtual ~CbmDeviceEventBuilderEtofStar2019()
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:63
cbm::mq::Transition::DeviceReady
@ DeviceReady
CbmDeviceEventBuilderEtofStar2019::HandleData
bool HandleData(FairMQMessagePtr &, int)
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:287
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmDeviceEventBuilderEtofStar2019::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:279
CbmDeviceEventBuilderEtofStar2019::fNumMessages
uint64_t fNumMessages
Definition: CbmDeviceEventBuilderEtofStar2019.h:57
CbmMQDefs.h
CbmStar2019EventBuilderEtofAlgo::SetAddStatusToEvent
void SetAddStatusToEvent(Bool_t bFlagIn=kTRUE)
Definition: CbmStar2019EventBuilderEtofAlgo.h:72
cbm::mq::ChangeState
void ChangeState(FairMQDevice *device, cbm::mq::Transition transition)
Definition: CbmMQDefs.h:19
CbmDeviceEventBuilderEtofStar2019::SetParContainers
void SetParContainers()
Definition: CbmDeviceEventBuilderEtofStar2019.cxx:185
CbmDeviceEventBuilderEtofStar2019::fNumEvt
uint64_t fNumEvt
Definition: CbmDeviceEventBuilderEtofStar2019.h:72
cbm::mq::Transition::Idle
@ Idle
CbmDeviceEventBuilderEtofStar2019::fulTsCounter
uint64_t fulTsCounter
Statistics & first TS rejection.
Definition: CbmDeviceEventBuilderEtofStar2019.h:71