CbmRoot
CbmStar2019EventBuilderEtof.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- CbmStar2019EventBuilderEtof -----
4 // ----- Created 14.11.2018 by P.-A. Loizeau -----
5 // ----- -----
6 // -----------------------------------------------------------------------------
7 
8 #ifndef CbmStar2019EventBuilderEtof_H
9 #define CbmStar2019EventBuilderEtof_H
10 
11 #include "Timeslice.hpp"
12 
13 #include "CbmMcbmUnpack.h"
14 
15 #include "TStopwatch.h"
16 #include "TString.h"
17 
19 
20 /*
21  ** Function to send sub-event block to the STAR DAQ system
22  * trg_word received is packed as:
23  *
24  * trg_cmd|daq_cmd|tkn_hi|tkn_mid|tkn_lo
25 */
26 extern "C" int star_rhicf_write(unsigned int trg_word, void* dta, int bytes);
27 
28 class TH1;
29 class TH2;
30 class TProfile;
31 
33 public:
34  CbmStar2019EventBuilderEtof(UInt_t uNbGdpb = 1);
36 
37  virtual Bool_t Init();
38  virtual Bool_t DoUnpack(const fles::Timeslice& ts, size_t component);
39  virtual void Reset();
40 
41  virtual void Finish();
42 
43  void SetParContainers();
44 
45  Bool_t InitContainers();
46 
47  Bool_t ReInitContainers();
48 
49  void SetSandboxMode(Bool_t bSandboxMode = kTRUE) {
50  fbSandboxMode = bSandboxMode;
51  }
52  void SetEventDumpEnable(Bool_t bDumpEna = kTRUE);
53  inline void SetMonitorMode(Bool_t bFlagIn = kTRUE) {
54  fbMonitorMode = bFlagIn;
55  }
56  inline void SetDebugMonitorMode(Bool_t bFlagIn = kTRUE) {
57  fbDebugMonitorMode = bFlagIn;
58  }
59  inline void SetStoreLostEventMsg(Bool_t bFlagIn = kTRUE) {
60  fbStoreLostEventMsg = bFlagIn;
61  }
62  inline void SetAddStatusToEvent(Bool_t bFlagIn = kTRUE) {
63  fbAddStatusToEvent = bFlagIn;
64  }
65  inline void SetPulserTotLimits(UInt_t uMin, UInt_t uMax) {
66  fuMinTotPulser = uMin;
67  fuMaxTotPulser = uMax;
68  }
69 
71  void AddMsComponentToList(size_t component, UShort_t usDetectorId);
72  void SetNbMsInTs(size_t /*uCoreMsNb*/, size_t /*uOverlapMsNb*/) {};
73 
74  void UseDaqBuffer(Bool_t) {};
75 
76 private:
78  Bool_t
80  Bool_t
82  Bool_t
84  Bool_t
86  Bool_t fbSandboxMode;
87  Bool_t
89 
91  TList* fParCList;
92 
96  TString fsHistoFileName;
97 
99  uint64_t fulTsCounter;
100 
103 
105  Double_t fdMsSizeInNs;
106  Double_t fdTsCoreSizeInSec;
107  TStopwatch fTimer;
108  Double_t fdRealTime;
109  Double_t fdRealTimeMin;
110  Double_t fdRealTimeMax;
111  Double_t fdRealTimeAll;
114  uint64_t fulNbEvents;
118  TProfile* fhMeanRealTimeEvo;
119 
121  std::fstream* fpBinDumpFile;
122  const UInt_t kuBinDumpBegWord = 0xFEEDBEAF;
123  const UInt_t kuBinDumpEndWord = 0xFAEBDEEF;
124 
125  Bool_t SaveHistograms();
126 
129 
130  ClassDef(CbmStar2019EventBuilderEtof, 1)
131 };
132 
133 #endif
CbmStar2019EventBuilderEtof::SetAddStatusToEvent
void SetAddStatusToEvent(Bool_t bFlagIn=kTRUE)
Definition: CbmStar2019EventBuilderEtof.h:62
CbmStar2019EventBuilderEtof::operator=
CbmStar2019EventBuilderEtof operator=(const CbmStar2019EventBuilderEtof &)
CbmStar2019EventBuilderEtof::ReInitContainers
Bool_t ReInitContainers()
Definition: CbmStar2019EventBuilderEtof.cxx:201
CbmStar2019EventBuilderEtof::fulNbEvents
uint64_t fulNbEvents
Definition: CbmStar2019EventBuilderEtof.h:114
CbmStar2019EventBuilderEtof::SetParContainers
void SetParContainers()
Definition: CbmStar2019EventBuilderEtof.cxx:82
CbmStar2019EventBuilderEtof::InitContainers
Bool_t InitContainers()
Definition: CbmStar2019EventBuilderEtof.cxx:106
CbmMcbmUnpack.h
CbmStar2019EventBuilderEtof::SetSandboxMode
void SetSandboxMode(Bool_t bSandboxMode=kTRUE)
Definition: CbmStar2019EventBuilderEtof.h:49
CbmStar2019EventBuilderEtof::Init
virtual Bool_t Init()
Definition: CbmStar2019EventBuilderEtof.cxx:72
CbmStar2019EventBuilderEtof::fulTsCounter
uint64_t fulTsCounter
Statistics & first TS rejection.
Definition: CbmStar2019EventBuilderEtof.h:99
CbmStar2019EventBuilderEtof::fbDebugMonitorMode
Bool_t fbDebugMonitorMode
Switch ON the filling of a minimal set of histograms.
Definition: CbmStar2019EventBuilderEtof.h:81
CbmStar2019EventBuilderEtof::fdRealTimeMinAll
Double_t fdRealTimeMinAll
Definition: CbmStar2019EventBuilderEtof.h:112
CbmStar2019EventBuilderEtof::SetEventDumpEnable
void SetEventDumpEnable(Bool_t bDumpEna=kTRUE)
Definition: CbmStar2019EventBuilderEtof.cxx:208
CbmStar2019EventBuilderEtof::CbmStar2019EventBuilderEtof
CbmStar2019EventBuilderEtof(UInt_t uNbGdpb=1)
Definition: CbmStar2019EventBuilderEtof.cxx:36
CbmStar2019EventBuilderEtof::fdMsSizeInNs
Double_t fdMsSizeInNs
Processing speed watch.
Definition: CbmStar2019EventBuilderEtof.h:105
CbmStar2019EventBuilderEtof::fsHistoFileName
TString fsHistoFileName
Definition: CbmStar2019EventBuilderEtof.h:96
CbmStar2019EventBuilderEtof::fTimer
TStopwatch fTimer
Total size of the core MS in a TS, [seconds].
Definition: CbmStar2019EventBuilderEtof.h:107
CbmStar2019EventBuilderEtof::fbAddStatusToEvent
Bool_t fbAddStatusToEvent
Switch ON the insertion of the LostEvent messages from GET4s with the critical errors.
Definition: CbmStar2019EventBuilderEtof.h:85
CbmStar2019EventBuilderEtof::DoUnpack
virtual Bool_t DoUnpack(const fles::Timeslice &ts, size_t component)
Definition: CbmStar2019EventBuilderEtof.cxx:250
CbmStar2019EventBuilderEtof::~CbmStar2019EventBuilderEtof
virtual ~CbmStar2019EventBuilderEtof()
Definition: CbmStar2019EventBuilderEtof.cxx:68
CbmStar2019EventBuilderEtofAlgo
Definition: CbmStar2019EventBuilderEtofAlgo.h:31
CbmStar2019EventBuilderEtof::SetMonitorMode
void SetMonitorMode(Bool_t bFlagIn=kTRUE)
Definition: CbmStar2019EventBuilderEtof.h:53
CbmStar2019EventBuilderEtof::fbStoreLostEventMsg
Bool_t fbStoreLostEventMsg
Switch ON the filling of a additional set of histograms.
Definition: CbmStar2019EventBuilderEtof.h:83
CbmStar2019EventBuilderEtof::UseDaqBuffer
void UseDaqBuffer(Bool_t)
Definition: CbmStar2019EventBuilderEtof.h:74
CbmStar2019EventBuilderEtof::fdTsCoreSizeInSec
Double_t fdTsCoreSizeInSec
Size of a single MS, [nanoseconds].
Definition: CbmStar2019EventBuilderEtof.h:106
CbmStar2019EventBuilderEtof::fbSandboxMode
Bool_t fbSandboxMode
Switch ON the readout and insertion of STATUS pattern message (default is true)
Definition: CbmStar2019EventBuilderEtof.h:86
CbmStar2019EventBuilderEtof::fuMinTotPulser
UInt_t fuMinTotPulser
User settings: Data selection parameters.
Definition: CbmStar2019EventBuilderEtof.h:94
CbmStar2019EventBuilderEtof::fdRealTimeMaxAll
Double_t fdRealTimeMaxAll
Definition: CbmStar2019EventBuilderEtof.h:113
CbmStar2019EventBuilderEtof::CbmStar2019EventBuilderEtof
CbmStar2019EventBuilderEtof(const CbmStar2019EventBuilderEtof &)
CbmStar2019EventBuilderEtof::AddMsComponentToList
void AddMsComponentToList(size_t component, UShort_t usDetectorId)
Temp until we change from CbmMcbmUnpack to something else.
Definition: CbmStar2019EventBuilderEtof.cxx:245
CbmStar2019EventBuilderEtof::Reset
virtual void Reset()
Definition: CbmStar2019EventBuilderEtof.cxx:379
CbmStar2019EventBuilderEtof::fParCList
TList * fParCList
Switch ON the dumping of the events to a binary file.
Definition: CbmStar2019EventBuilderEtof.h:91
CbmStar2019EventBuilderEtof::fdRealTimeMin
Double_t fdRealTimeMin
Definition: CbmStar2019EventBuilderEtof.h:109
CbmStar2019EventBuilderEtof::fhRealTimeDistr
TH1 * fhRealTimeDistr
Definition: CbmStar2019EventBuilderEtof.h:116
star_rhicf_write
int star_rhicf_write(unsigned int trg_word, void *dta, int bytes)
CbmStar2019EventBuilderEtof::fbMonitorMode
Bool_t fbMonitorMode
Control flags.
Definition: CbmStar2019EventBuilderEtof.h:74
CbmStar2019EventBuilderEtof::fdRealTimeAll
Double_t fdRealTimeAll
Definition: CbmStar2019EventBuilderEtof.h:111
CbmStar2019EventBuilderEtof::fEventBuilderAlgo
CbmStar2019EventBuilderEtofAlgo * fEventBuilderAlgo
Processing algo.
Definition: CbmStar2019EventBuilderEtof.h:102
CbmStar2019EventBuilderEtof
Definition: CbmStar2019EventBuilderEtof.h:32
CbmStar2019EventBuilderEtof::SetDebugMonitorMode
void SetDebugMonitorMode(Bool_t bFlagIn=kTRUE)
Definition: CbmStar2019EventBuilderEtof.h:56
CbmStar2019EventBuilderEtof::fhRealTimeEvo
TH2 * fhRealTimeEvo
Exclude from dictionary because ?!?!
Definition: CbmStar2019EventBuilderEtof.h:117
CbmStar2019EventBuilderEtof::fhMeanRealTimeEvo
TProfile * fhMeanRealTimeEvo
Exclude from dictionary because ?!?!
Definition: CbmStar2019EventBuilderEtof.h:118
CbmStar2019EventBuilderEtof::kuBinDumpBegWord
const UInt_t kuBinDumpBegWord
Definition: CbmStar2019EventBuilderEtof.h:122
CbmStar2019EventBuilderEtof::SaveHistograms
Bool_t SaveHistograms()
Definition: CbmStar2019EventBuilderEtof.cxx:394
CbmStar2019EventBuilderEtof::SetPulserTotLimits
void SetPulserTotLimits(UInt_t uMin, UInt_t uMax)
Definition: CbmStar2019EventBuilderEtof.h:65
CbmStar2019EventBuilderEtof::Finish
virtual void Finish()
Definition: CbmStar2019EventBuilderEtof.cxx:381
CbmStar2019EventBuilderEtof::fdRealTimeMax
Double_t fdRealTimeMax
Definition: CbmStar2019EventBuilderEtof.h:110
CbmStar2019EventBuilderEtof::SetNbMsInTs
void SetNbMsInTs(size_t, size_t)
Definition: CbmStar2019EventBuilderEtof.h:72
CbmStar2019EventBuilderEtof::fdRealTime
Double_t fdRealTime
Definition: CbmStar2019EventBuilderEtof.h:108
CbmStar2019EventBuilderEtof::fulNbEventsSinceLastPrintout
uint64_t fulNbEventsSinceLastPrintout
Definition: CbmStar2019EventBuilderEtof.h:115
CbmStar2019EventBuilderEtof::SetStoreLostEventMsg
void SetStoreLostEventMsg(Bool_t bFlagIn=kTRUE)
Definition: CbmStar2019EventBuilderEtof.h:59
CbmStar2019EventBuilderEtof::fbEventDumpEna
Bool_t fbEventDumpEna
Switch OFF the emission of data toward the STAR DAQ.
Definition: CbmStar2019EventBuilderEtof.h:88
CbmMcbmUnpack
Definition: CbmMcbmUnpack.h:15
CbmStar2019EventBuilderEtof::fpBinDumpFile
std::fstream * fpBinDumpFile
Exclude from dictionary because ?!?!
Definition: CbmStar2019EventBuilderEtof.h:121
CbmStar2019EventBuilderEtof::kuBinDumpEndWord
const UInt_t kuBinDumpEndWord
Definition: CbmStar2019EventBuilderEtof.h:123
CbmStar2019EventBuilderEtof::fuMaxTotPulser
UInt_t fuMaxTotPulser
Definition: CbmStar2019EventBuilderEtof.h:95