CbmRoot
Loading...
Searching...
No Matches
CbmStar2019EventBuilderEtof.h
Go to the documentation of this file.
1/* Copyright (C) 2018-2019 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5// -----------------------------------------------------------------------------
6// ----- -----
7// ----- CbmStar2019EventBuilderEtof -----
8// ----- Created 14.11.2018 by P.-A. Loizeau -----
9// ----- -----
10// -----------------------------------------------------------------------------
11
12#ifndef CbmStar2019EventBuilderEtof_H
13#define CbmStar2019EventBuilderEtof_H
14
15#include "CbmMcbmUnpack.h"
16
17#include "Timeslice.hpp"
18
19#include "TStopwatch.h"
20#include "TString.h"
21
23
24/*
25 ** Function to send sub-event block to the STAR DAQ system
26 * trg_word received is packed as:
27 *
28 * trg_cmd|daq_cmd|tkn_hi|tkn_mid|tkn_lo
29*/
30extern "C" int star_rhicf_write(unsigned int trg_word, void* dta, int bytes);
31
32class TH1;
33class TH2;
34class TProfile;
35
37public:
38 CbmStar2019EventBuilderEtof(UInt_t uNbGdpb = 1);
40
41 virtual Bool_t Init();
42 virtual Bool_t DoUnpack(const fles::Timeslice& ts, size_t component);
43 virtual void Reset();
44
45 virtual void Finish();
46
47 void SetParContainers();
48
49 Bool_t InitContainers();
50
51 Bool_t ReInitContainers();
52
53 void SetSandboxMode(Bool_t bSandboxMode = kTRUE) { fbSandboxMode = bSandboxMode; }
54 void SetEventDumpEnable(Bool_t bDumpEna = kTRUE);
55 inline void SetMonitorMode(Bool_t bFlagIn = kTRUE) { fbMonitorMode = bFlagIn; }
56 inline void SetDebugMonitorMode(Bool_t bFlagIn = kTRUE) { fbDebugMonitorMode = bFlagIn; }
57 inline void SetStoreLostEventMsg(Bool_t bFlagIn = kTRUE) { fbStoreLostEventMsg = bFlagIn; }
58 inline void SetAddStatusToEvent(Bool_t bFlagIn = kTRUE) { fbAddStatusToEvent = bFlagIn; }
59 inline void SetPulserTotLimits(UInt_t uMin, UInt_t uMax)
60 {
61 fuMinTotPulser = uMin;
62 fuMaxTotPulser = uMax;
63 }
64
66 void AddMsComponentToList(size_t component, UShort_t usDetectorId);
67 void SetNbMsInTs(size_t /*uCoreMsNb*/, size_t /*uOverlapMsNb*/) {};
68
69 void UseDaqBuffer(Bool_t) {};
70
71private:
79
81 TList* fParCList;
82
87
89 uint64_t fulTsCounter;
90
93
95 Double_t fdMsSizeInNs;
97 TStopwatch fTimer;
98 Double_t fdRealTime;
99 Double_t fdRealTimeMin;
104 uint64_t fulNbEvents;
109
111 std::fstream* fpBinDumpFile;
112 const UInt_t kuBinDumpBegWord = 0xFEEDBEAF;
113 const UInt_t kuBinDumpEndWord = 0xFAEBDEEF;
114
115 Bool_t SaveHistograms();
116
119
120 ClassDef(CbmStar2019EventBuilderEtof, 1)
121};
122
123#endif
int star_rhicf_write(unsigned int trg_word, void *dta, int bytes)
void SetAddStatusToEvent(Bool_t bFlagIn=kTRUE)
Bool_t fbSandboxMode
Switch ON the readout and insertion of STATUS pattern message (default is true)
TStopwatch fTimer
Total size of the core MS in a TS, [seconds].
TH2 * fhRealTimeEvo
Exclude from dictionary because ?!?!
Double_t fdTsCoreSizeInSec
Size of a single MS, [nanoseconds].
TProfile * fhMeanRealTimeEvo
Exclude from dictionary because ?!?!
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
void SetPulserTotLimits(UInt_t uMin, UInt_t uMax)
CbmStar2019EventBuilderEtof(const CbmStar2019EventBuilderEtof &)
Bool_t fbDebugMonitorMode
Switch ON the filling of a minimal set of histograms.
void SetMonitorMode(Bool_t bFlagIn=kTRUE)
Double_t fdMsSizeInNs
Processing speed watch.
Bool_t fbEventDumpEna
Switch OFF the emission of data toward the STAR DAQ.
std::fstream * fpBinDumpFile
Exclude from dictionary because ?!?!
UInt_t fuMinTotPulser
User settings: Data selection parameters.
CbmStar2019EventBuilderEtofAlgo * fEventBuilderAlgo
Processing algo.
Bool_t fbAddStatusToEvent
Switch ON the insertion of the LostEvent messages from GET4s with the critical errors.
CbmStar2019EventBuilderEtof operator=(const CbmStar2019EventBuilderEtof &)
Bool_t fbStoreLostEventMsg
Switch ON the filling of a additional set of histograms.
void SetEventDumpEnable(Bool_t bDumpEna=kTRUE)
TList * fParCList
Switch ON the dumping of the events to a binary file.
void SetDebugMonitorMode(Bool_t bFlagIn=kTRUE)
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Temp until we change from CbmMcbmUnpack to something else.
void SetStoreLostEventMsg(Bool_t bFlagIn=kTRUE)
void SetSandboxMode(Bool_t bSandboxMode=kTRUE)
uint64_t fulTsCounter
Statistics & first TS rejection.