CbmRoot
CbmMcbm2018PsdPar.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmMcbm2018PsdPar header file -----
3 // ----- Created 26.09.2019 by N.Karpushkin -----
4 // ----- based on CbmMcbm2018TofPar by P.-A. Loizeau -----
5 // -------------------------------------------------------------------------
6 
7 #ifndef CbmMcbm2018PsdPar_H
8 #define CbmMcbm2018PsdPar_H
9 
10 #include "FairParGenericSet.h"
11 
12 #include "TArrayD.h"
13 #include "TArrayI.h"
14 
15 class FairParIo;
16 class FairParamList;
17 
18 
19 class CbmMcbm2018PsdPar : public FairParGenericSet {
20 
21 public:
23  CbmMcbm2018PsdPar(const char* name = "CbmMcbm2018PsdPar",
24  const char* title = "Psd unpacker parameters",
25  const char* context = "Default");
26 
28  virtual ~CbmMcbm2018PsdPar();
29 
31  virtual void clear();
32 
33  void putParams(FairParamList*);
34  Bool_t getParams(FairParamList*);
35 
36  static constexpr UInt_t GetNbByteMessage() { return kuBytesPerMessage; }
37 
38  //static constexpr UInt_t GetNrOfChannelsPerFee() { return kuNbChannelsPerFee; }
39  static constexpr UInt_t GetNrOfFeePerGbtx() { return kuNbFeePerGbtx; }
40  static constexpr UInt_t GetNrOfGbtxPerGdpb() { return kuNbGbtxPerGdpb; }
41  static constexpr UInt_t GetNrOfChannelsPerGbtx() {
42  return kuNbChannelsPerGbtx;
43  }
44  static constexpr UInt_t GetNrOfChannelsPerGdpb() {
45  return kuNbChannelsPerGdpb;
46  }
47  static constexpr UInt_t GetNrOfFeePerGdpb() { return kuNbFeePerGdpb; }
48  inline UInt_t GetNumberOfChannels() {
50  }
51 
52  Int_t FeeChanToGbtChan(UInt_t uChannelInFee);
53 
54  inline Bool_t GetMonitorMode() {
55  return (1 == fiMonitorMode ? kTRUE : kFALSE);
56  }
57  inline Bool_t GetDebugMonitorMode() {
58  return (1 == fiDebugMonitorMode ? kTRUE : kFALSE);
59  }
60 
61  inline Int_t GetNrOfGdpbs() { return fiNrOfGdpb; }
62  inline Int_t GetGdpbId(Int_t i) { return fiGdpbIdArray[i]; }
63  inline Int_t GetNrOfFeesPerGdpb() { return fiNrOfFeesPerGdpb; }
64  inline Int_t GetNrOfChannelsPerFee() { return fiNrOfChannelsPerFee; }
65 
66  inline Int_t GetNrOfGbtx() { return fiNrOfGbtx; }
67  inline Int_t GetNrOfModules() { return fiNrOfModules; }
68  Int_t GetModuleId(UInt_t uGbtx);
69 
70  inline Int_t GetNbMsTot() { return fiNbMsTot; }
71  inline Int_t GetNbMsOverlap() { return fiNbMsOverlap; }
72  inline Double_t GetSizeMsInNs() { return fdSizeMsInNs; }
73 
74  Double_t GetTsDeadtimePeriod(); // { return fdTsDeadtimePeriod;}
75 
76 
77 private:
80  static const uint32_t kuBytesPerMessage = 8;
82  static const uint32_t kuNbChannelsPerFee = 10;
83  static const uint32_t kuNbFeePerGbtx = 1;
84  static const uint32_t kuNbGbtxPerGdpb = 1;
85  static const uint32_t kuNbChannelsPerGbtx =
87  static const uint32_t kuNbChannelsPerGdpb =
89  static const uint32_t kuNbFeePerGdpb = kuNbFeePerGbtx * kuNbGbtxPerGdpb;
92  {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
93 
94  Int_t
95  fiMonitorMode; // Enable histograms in event builder processes and algo, 0 = OFF / 1 = ON
96  Int_t
97  fiDebugMonitorMode; // Enable extra debuging histos in bth event builder and monitor processes and algo, 0 = OFF / 1 = ON
98  Int_t fiNrOfGdpb; // Total number of GDPBs
99  TArrayI fiGdpbIdArray; // Array to hold the unique IDs for all Psd GDPBs
100 
101  Int_t fiNrOfFeesPerGdpb; // Number of FEEs which are connected to one GDPB
102  Int_t fiNrOfChannelsPerFee; // Number of channels per FEE
103 
104  Int_t fiNrOfGbtx; // Total number of Gbtx links
105  Int_t fiNrOfModules; // Total number of Modules
106  TArrayI
107  fiModuleId; // Module Identifier connected to Gbtx link, has to match geometry
108 
109  Int_t fiNbMsTot; // Total number of MS per link in TS
110  Int_t fiNbMsOverlap; // Number of overlap MS per TS
111  Double_t
112  fdSizeMsInNs; // Size of the MS in ns, needed for MS border detection
113 
114  Double_t
115  fdTsDeadtimePeriod; // Period (ns) in the first MS of each TS where events with missing triggers should be built using the overlap MS of previous TS (overlap events)
116 
118 };
119 #endif // CbmMcbm2018PsdPar_H
CbmMcbm2018PsdPar::ClassDef
ClassDef(CbmMcbm2018PsdPar, 1)
CbmMcbm2018PsdPar::kuNbChannelsPerGdpb
static const uint32_t kuNbChannelsPerGdpb
Definition: CbmMcbm2018PsdPar.h:87
CbmMcbm2018PsdPar::fiNrOfGbtx
Int_t fiNrOfGbtx
Definition: CbmMcbm2018PsdPar.h:104
CbmMcbm2018PsdPar::GetNrOfChannelsPerFee
Int_t GetNrOfChannelsPerFee()
Definition: CbmMcbm2018PsdPar.h:64
CbmMcbm2018PsdPar::kuNbFeePerGbtx
static const uint32_t kuNbFeePerGbtx
Definition: CbmMcbm2018PsdPar.h:83
CbmMcbm2018PsdPar::kuBytesPerMessage
static const uint32_t kuBytesPerMessage
Definition: CbmMcbm2018PsdPar.h:80
CbmMcbm2018PsdPar::GetSizeMsInNs
Double_t GetSizeMsInNs()
Definition: CbmMcbm2018PsdPar.h:72
CbmMcbm2018PsdPar::kuNbFeePerGdpb
static const uint32_t kuNbFeePerGdpb
Definition: CbmMcbm2018PsdPar.h:89
CbmMcbm2018PsdPar::GetNbMsOverlap
Int_t GetNbMsOverlap()
Definition: CbmMcbm2018PsdPar.h:71
CbmMcbm2018PsdPar::GetNrOfGbtx
Int_t GetNrOfGbtx()
Definition: CbmMcbm2018PsdPar.h:66
CbmMcbm2018PsdPar::fiNbMsOverlap
Int_t fiNbMsOverlap
Definition: CbmMcbm2018PsdPar.h:110
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMcbm2018PsdPar::kuFeeToGbt
const UInt_t kuFeeToGbt[kuNbChannelsPerFee]
Mapping.
Definition: CbmMcbm2018PsdPar.h:91
CbmMcbm2018PsdPar::GetNbByteMessage
static constexpr UInt_t GetNbByteMessage()
Definition: CbmMcbm2018PsdPar.h:36
CbmMcbm2018PsdPar::GetModuleId
Int_t GetModuleId(UInt_t uGbtx)
CbmMcbm2018PsdPar::GetNumberOfChannels
UInt_t GetNumberOfChannels()
Definition: CbmMcbm2018PsdPar.h:48
CbmMcbm2018PsdPar::fiNrOfModules
Int_t fiNrOfModules
Definition: CbmMcbm2018PsdPar.h:105
CbmMcbm2018PsdPar::~CbmMcbm2018PsdPar
virtual ~CbmMcbm2018PsdPar()
Definition: CbmMcbm2018PsdPar.cxx:40
CbmMcbm2018PsdPar::kuNbChannelsPerFee
static const uint32_t kuNbChannelsPerFee
Readout chain.
Definition: CbmMcbm2018PsdPar.h:82
CbmMcbm2018PsdPar::fdSizeMsInNs
Double_t fdSizeMsInNs
Definition: CbmMcbm2018PsdPar.h:112
CbmMcbm2018PsdPar::clear
virtual void clear()
Definition: CbmMcbm2018PsdPar.cxx:45
CbmMcbm2018PsdPar::fiNrOfGdpb
Int_t fiNrOfGdpb
Definition: CbmMcbm2018PsdPar.h:98
CbmMcbm2018PsdPar::kuNbGbtxPerGdpb
static const uint32_t kuNbGbtxPerGdpb
Definition: CbmMcbm2018PsdPar.h:84
CbmMcbm2018PsdPar::putParams
void putParams(FairParamList *)
Definition: CbmMcbm2018PsdPar.cxx:53
CbmMcbm2018PsdPar::GetNrOfFeePerGdpb
static constexpr UInt_t GetNrOfFeePerGdpb()
Definition: CbmMcbm2018PsdPar.h:47
CbmMcbm2018PsdPar::fiNbMsTot
Int_t fiNbMsTot
Definition: CbmMcbm2018PsdPar.h:109
CbmMcbm2018PsdPar::fiMonitorMode
Int_t fiMonitorMode
Map from Psd channel to Gbt channel.
Definition: CbmMcbm2018PsdPar.h:95
CbmMcbm2018PsdPar
Definition: CbmMcbm2018PsdPar.h:19
CbmMcbm2018PsdPar::fdTsDeadtimePeriod
Double_t fdTsDeadtimePeriod
Definition: CbmMcbm2018PsdPar.h:115
CbmMcbm2018PsdPar::GetNrOfGdpbs
Int_t GetNrOfGdpbs()
Definition: CbmMcbm2018PsdPar.h:61
CbmMcbm2018PsdPar::FeeChanToGbtChan
Int_t FeeChanToGbtChan(UInt_t uChannelInFee)
Definition: CbmMcbm2018PsdPar.cxx:99
CbmMcbm2018PsdPar::GetTsDeadtimePeriod
Double_t GetTsDeadtimePeriod()
CbmMcbm2018PsdPar::fiNrOfChannelsPerFee
Int_t fiNrOfChannelsPerFee
Definition: CbmMcbm2018PsdPar.h:102
CbmMcbm2018PsdPar::GetNrOfFeePerGbtx
static constexpr UInt_t GetNrOfFeePerGbtx()
Definition: CbmMcbm2018PsdPar.h:39
CbmMcbm2018PsdPar::GetNrOfModules
Int_t GetNrOfModules()
Definition: CbmMcbm2018PsdPar.h:67
CbmMcbm2018PsdPar::fiDebugMonitorMode
Int_t fiDebugMonitorMode
Definition: CbmMcbm2018PsdPar.h:97
CbmMcbm2018PsdPar::fiGdpbIdArray
TArrayI fiGdpbIdArray
Definition: CbmMcbm2018PsdPar.h:99
CbmMcbm2018PsdPar::fiModuleId
TArrayI fiModuleId
Definition: CbmMcbm2018PsdPar.h:107
CbmMcbm2018PsdPar::GetDebugMonitorMode
Bool_t GetDebugMonitorMode()
Definition: CbmMcbm2018PsdPar.h:57
CbmMcbm2018PsdPar::GetNrOfFeesPerGdpb
Int_t GetNrOfFeesPerGdpb()
Definition: CbmMcbm2018PsdPar.h:63
CbmMcbm2018PsdPar::GetNrOfChannelsPerGdpb
static constexpr UInt_t GetNrOfChannelsPerGdpb()
Definition: CbmMcbm2018PsdPar.h:44
CbmMcbm2018PsdPar::CbmMcbm2018PsdPar
CbmMcbm2018PsdPar(const char *name="CbmMcbm2018PsdPar", const char *title="Psd unpacker parameters", const char *context="Default")
Definition: CbmMcbm2018PsdPar.cxx:17
CbmMcbm2018PsdPar::GetNrOfGbtxPerGdpb
static constexpr UInt_t GetNrOfGbtxPerGdpb()
Definition: CbmMcbm2018PsdPar.h:40
CbmMcbm2018PsdPar::GetMonitorMode
Bool_t GetMonitorMode()
Definition: CbmMcbm2018PsdPar.h:54
CbmMcbm2018PsdPar::kuNbChannelsPerGbtx
static const uint32_t kuNbChannelsPerGbtx
Definition: CbmMcbm2018PsdPar.h:85
CbmMcbm2018PsdPar::getParams
Bool_t getParams(FairParamList *)
Definition: CbmMcbm2018PsdPar.cxx:70
CbmMcbm2018PsdPar::fiNrOfFeesPerGdpb
Int_t fiNrOfFeesPerGdpb
Definition: CbmMcbm2018PsdPar.h:101
CbmMcbm2018PsdPar::GetNbMsTot
Int_t GetNbMsTot()
Definition: CbmMcbm2018PsdPar.h:70
CbmMcbm2018PsdPar::GetNrOfChannelsPerGbtx
static constexpr UInt_t GetNrOfChannelsPerGbtx()
Definition: CbmMcbm2018PsdPar.h:41
CbmMcbm2018PsdPar::GetGdpbId
Int_t GetGdpbId(Int_t i)
Definition: CbmMcbm2018PsdPar.h:62