CbmMcbm2018MonitorTaskT0.h 3.03 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
// -----------------------------------------------------------------------------
// -----                                                                   -----
// -----                     CbmMcbm2018MonitorTaskT0                      -----
// -----               Created 10.02.2019 by P.-A. Loizeau                 -----
// -----                                                                   -----
// -----------------------------------------------------------------------------

#ifndef CbmMcbm2018MonitorTaskT0_H
#define CbmMcbm2018MonitorTaskT0_H

#include "Timeslice.hpp"

#include "CbmMcbm2018MonitorAlgoT0.h"
Administrator's avatar
Administrator committed
14
#include "CbmMcbmUnpack.h"
15
16
17

#include "TString.h"

Administrator's avatar
Administrator committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class CbmMcbm2018MonitorTaskT0 : public CbmMcbmUnpack {
public:
  CbmMcbm2018MonitorTaskT0();
  CbmMcbm2018MonitorTaskT0(const CbmMcbm2018MonitorTaskT0&) = delete;
  CbmMcbm2018MonitorTaskT0 operator=(const CbmMcbm2018MonitorTaskT0&) = delete;

  virtual ~CbmMcbm2018MonitorTaskT0();

  virtual Bool_t Init();
  virtual Bool_t DoUnpack(const fles::Timeslice& ts, size_t component);
  virtual void Reset();

  virtual void Finish();

  void SetParContainers();

  Bool_t InitContainers();

  Bool_t ReInitContainers();

  /// Temp until we change from CbmMcbmUnpack to something else
  void AddMsComponentToList(size_t component, UShort_t usDetectorId);
  void SetNbMsInTs(size_t /*uCoreMsNb*/, size_t /*uOverlapMsNb*/) {};

  /// Algo settings setters
  inline void SetMonitorMode(Bool_t bFlagIn = kTRUE) {
    fbMonitorMode = bFlagIn;
  }
  void SetIgnoreOverlapMs(Bool_t bFlagIn = kTRUE);
  inline void SetHistoryHistoSize(UInt_t inHistorySizeSec = 1800) {
    fuHistoryHistoSize = inHistorySizeSec;
  }
  inline void SetHistoFilename(TString sNameIn) { fsHistoFileName = sNameIn; }
  inline void SetPulserTotLimits(UInt_t uMin, UInt_t uMax) {
    fuMinTotPulser = uMin;
    fuMaxTotPulser = uMax;
  }
  inline void SetSpillThreshold(UInt_t uCntLimit) {
    fuOffSpillCountLimit = uCntLimit;
  }
Pierre-Alain Loizeau's avatar
Pierre-Alain Loizeau committed
58
59
  inline void SetSpillThresholdNonPulser(UInt_t uCntLimit) { fuOffSpillCountLimitNonPulser = uCntLimit; }
  inline void SetSpillCheckInterval(Double_t dIntervalSec) { fdSpillCheckInterval = dIntervalSec; }
Administrator's avatar
Administrator committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  void SetChannelMap(UInt_t uChan0,
                     UInt_t uChan1,
                     UInt_t uChan2,
                     UInt_t uChan3,
                     UInt_t uChan4,
                     UInt_t uChan5,
                     UInt_t uChan6,
                     UInt_t uChan7);

private:
  /// Control flags
  Bool_t
    fbMonitorMode;  //! Switch ON the filling of a minimal set of histograms
  Bool_t
    fbDebugMonitorMode;  //! Switch ON the filling of a additional set of histograms

  /// User settings parameters
  UInt_t fuHistoryHistoSize;
  TString fsHistoFileName;
  UInt_t fuMinTotPulser;
  UInt_t fuMaxTotPulser;
  UInt_t fuOffSpillCountLimit;
82
83
  UInt_t fuOffSpillCountLimitNonPulser;
  Double_t fdSpillCheckInterval;
Administrator's avatar
Administrator committed
84
85
86
87
88
89
90
91

  /// Statistics & first TS rejection
  uint64_t fulTsCounter;

  /// Processing algo
  CbmMcbm2018MonitorAlgoT0* fMonitorAlgo;

  ClassDef(CbmMcbm2018MonitorTaskT0, 1)
92
93
94
};

#endif