Project
Loading...
Searching...
No Matches
HmpidEquipment.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
18
19#ifndef COMMON_HMPIDEQUIPMENT_H_
20#define COMMON_HMPIDEQUIPMENT_H_
21
22#include <cstdio>
23#include <cstdint>
24#include <iostream>
25
26#include "HMPIDBase/Geo.h"
27
28namespace o2
29{
30namespace hmpid
31{
32
33const int MAXERRORS = 13;
34const int MAXHMPIDERRORS = 5;
35
36const int ERR_NOTKNOWN = 0;
37const int ERR_ROWMARKEMPTY = 1;
38const int ERR_DUPLICATEPAD = 2;
39const int ERR_ROWMARKWRONG = 3;
40const int ERR_ROWMARKLOST = 4;
41const int ERR_ROWMARKERROR = 5;
42const int ERR_LOSTEOEMARK = 6;
43const int ERR_DOUBLEEOEMARK = 7;
44const int ERR_WRONGSIZEINEOE = 8;
45const int ERR_DOUBLEMARKWORD = 9;
47const int ERR_LOSTEOSMARK = 11;
48const int ERR_HMPID = 12;
49
50// ---- HMPID TRY errors def -------
51const int TH_FILENOTEXISTS = 9;
52const int TH_OPENFILE = 8;
53const int TH_CREATEFILE = 7;
54const int TH_READFILE = 6;
55const int TH_WRITEFILE = 5;
56const int TH_WRONGEQUIPINDEX = 19;
57const int TH_WRONGHEADER = 15;
58const int TH_WRONGFILELEN = 14;
59const int TH_NULLBUFFERPOINTER = 13;
60const int TH_BUFFEREMPTY = 12;
61const int TH_WRONGBUFFERDIM = 11;
62const int TH_BUFFERPOINTERTOEND = 16;
63
64const uint64_t OUTRANGEEVENTNUMBER = 0x1FFFFFFFFFFF;
65
67{
68
69 private:
70 uint32_t mEquipmentId;
71 uint32_t mCruId;
72 uint32_t mLinkId;
73
74 public:
78
80
91
94
95 uint64_t mEventNumber;
99
102
110
111 public:
112 HmpidEquipment(int Equipment, int Cru, int Link);
114
116 {
117 return (mEquipmentId);
118 };
119 int getEquipmentId(int cru, int link);
121 {
122 return (mCruId);
123 };
125 {
126 return (mLinkId);
127 };
128
129 void init();
130 void resetPadMap();
131 void resetErrors();
132 void setError(int ErrType);
133 void setPad(int col, int dil, int cha, uint16_t charge);
134};
135
136} // namespace hmpid
137} // namespace o2
138
139#endif /* COMMON_HMPIDEQUIPMENT_H_ */
int16_t charge
Definition RawEventData.h:5
uint32_t col
Definition RawData.h:4
static constexpr int N_COLUMNS
Definition Geo.h:82
static constexpr int N_DILOGICS
Definition Geo.h:83
static constexpr int N_CHANNELS
Definition Geo.h:84
void setPad(int col, int dil, int cha, uint16_t charge)
double mPadSum[Geo::N_COLUMNS][Geo::N_DILOGICS][Geo::N_CHANNELS]
uint32_t mPadSamples[Geo::N_COLUMNS][Geo::N_DILOGICS][Geo::N_CHANNELS]
void init()
Inits the members for the decoding.
double mPadSquares[Geo::N_COLUMNS][Geo::N_DILOGICS][Geo::N_CHANNELS]
~HmpidEquipment()
Destructor : do nothing.
void resetPadMap()
Resets the matrix that contains the results of the decoding.
void resetErrors()
Resets the decoding errors statistics.
const int ERR_DOUBLEEOEMARK
const int TH_WRONGEQUIPINDEX
const int ERR_DOUBLEMARKWORD
const int TH_BUFFEREMPTY
const int ERR_NOTKNOWN
const int ERR_DUPLICATEPAD
const int ERR_LOSTEOEMARK
const int TH_WRONGHEADER
const int ERR_WRONGSIZESEGMENTMARK
const int TH_FILENOTEXISTS
const int TH_NULLBUFFERPOINTER
const int ERR_ROWMARKEMPTY
const int ERR_HMPID
const int TH_BUFFERPOINTERTOEND
const uint64_t OUTRANGEEVENTNUMBER
const int TH_CREATEFILE
const int ERR_LOSTEOSMARK
const int TH_READFILE
const int ERR_ROWMARKWRONG
const int TH_WRITEFILE
const int ERR_ROWMARKERROR
const int ERR_ROWMARKLOST
const int MAXHMPIDERRORS
const int TH_WRONGBUFFERDIM
const int TH_WRONGFILELEN
const int TH_OPENFILE
const int ERR_WRONGSIZEINEOE
const int MAXERRORS
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...