11#ifndef ALICEO2_PHOS_ALTRODECODER_H
12#define ALICEO2_PHOS_ALTRODECODER_H
59 const
char*
what() const noexcept
override {
return mErrorMessage.data(); }
67 std::string mErrorMessage;
104 std::vector<o2::phos::Cell>& cellContainer,
105 std::vector<o2::phos::Cell>& truContainer);
108 const std::vector<o2::phos::RawReaderError>&
hwerrors() {
return mOutputHWErrors; }
110 const std::vector<short>&
chi2list() {
return mOutputFitChi; }
118 std::vector<o2::phos::Cell>& cellContainer,
119 std::vector<o2::phos::Cell>& truContainer);
123 mCombineGHLG =
false;
141 static constexpr int kGeneralSRUErr = 15;
142 static constexpr int kGeneralTRUErr = 16;
146 void readTRUDigits(
short absId,
int payloadSize);
148 void readTRUFlags(
short hwAddress,
int payloadSize);
150 bool matchTruDigits(
const Cell& cTruFlag,
float& sumAmp);
152 bool mCombineGHLG =
true;
153 bool mPedestalRun =
false;
154 bool mKeepTruNoise =
false;
156 short mPreSamples = 0;
157 std::vector<uint16_t> mBunchwords;
158 std::vector<o2::phos::RawReaderError> mOutputHWErrors;
159 std::vector<short> mOutputFitChi;
160 std::vector<Cell> mTRUFlags;
161 std::array<int32_t, 224> mTRUDigits;
162 std::bitset<128> mFlag4x4Bitset;
163 std::bitset<128> mFlag2x2Bitset;
164 RCUTrailer mRCUTrailer;
Error handling of the ALTRO Decoder.
const char * what() const noexcept override
Access to error message cnnected to the error.
AltroDecoderError(ErrorType_t errtype, const char *message)
Constructor.
~AltroDecoderError() noexcept override=default
Destructor.
@ RCU_VERSION_ERROR
RCU trailer version not matching with the version in the raw header.
@ RCU_TRAILER_ERROR
RCU trailer cannot be decoded or invalid.
@ ALTRO_BUNCH_LENGTH_ERROR
ALTRO bunch has incorrect length.
@ ALTRO_MAPPING_ERROR
Incorrect ALTRO channel mapping.
@ ALTRO_PAYLOAD_ERROR
ALTRO payload cannot be decoded.
@ RCU_TRAILER_SIZE_ERROR
RCU trailer size length.
@ ALTRO_BUNCH_HEADER_ERROR
ALTRO bunch header cannot be decoded or is invalid.
@ CHANNEL_ERROR
Channels not initialized.
ErrorType_t getErrorType() const noexcept
Access to the error type connected to the error.
Decoder of the ALTRO data in the raw page.
AltroDecoderError::ErrorType_t decode(RawReaderMemory &rawreader, CaloRawFitter *rawFitter, std::vector< o2::phos::Cell > &cellContainer, std::vector< o2::phos::Cell > &truContainer)
Decode the ALTRO stream.
void setPresamples(int ps)
const std::vector< short > & chi2list()
void setCombineHGLG(bool a)
const RCUTrailer & getRCUTrailer() const
Get reference to the RCU trailer object.
const std::vector< o2::phos::RawReaderError > & hwerrors()
Get list of hw errors found in decoding.
~AltroDecoder()=default
Destructor.
void setKeepTruNoise(bool a)
AltroDecoder()=default
Constructor.
void readChannels(const std::vector< uint32_t > &payloadwords, CaloRawFitter *rawFitter, std::vector< o2::phos::Cell > &cellContainer, std::vector< o2::phos::Cell > &truContainer)
Read channels for the current event in the raw buffer.
Information stored in the RCU trailer.
Reader for raw data produced by the Readout application in in-memory format.
GLuint GLsizei const GLchar * message
GLboolean GLboolean GLboolean GLboolean a
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...