Belle II Software development
SVDDAQDiagnostic.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#ifndef SVDDAQDIAGNOSTICS_H
10#define SVDDAQDIAGNOSTICS_H
11
12#include <cstdint>
13#include <framework/datastore/RelationsObject.h>
14
15namespace Belle2 {
24 public:
25 enum {
64
65
68 };
69
70
87 SVDDAQDiagnostic(uint8_t triggerNumber, uint8_t triggerType, uint8_t pipelineAddress, uint8_t cmc1, uint8_t cmc2, uint8_t apvError,
88 uint8_t ftbError, bool fadcMatch, bool apvMatch, bool badHeader, bool missedHeader, bool missedTrailer, uint8_t fadcNo = uint8_t(0),
89 uint8_t apvNo = uint8_t(0))
90
91 {
92 m_triggerNumber = triggerNumber;
93 m_triggerType = triggerType;
94 m_pipelineAddress = pipelineAddress;
95 m_cmc1 = cmc1;
96 m_cmc2 = cmc2;
97 m_apvError = apvError;
98 m_ftbError = ftbError;
99 m_fadcMatch = fadcMatch;
100 m_apvMatch = apvMatch;
101 m_badHeader = badHeader;
102 m_missedHeader = missedHeader;
103 m_missedTrailer = missedTrailer;
104
105 m_ftbFlags = 0;
107 m_apvErrorOR = 0;
108 m_fadcNo = fadcNo;
109 m_apvNo = apvNo;
110 m_upsetApv = 0;
111 m_seuRecoData = 0;
112 m_badMapping = 0;
113 m_badTrailer = 0;
114 }
115
117 SVDDAQDiagnostic(): SVDDAQDiagnostic(0, 0, 0, 0, 0, 0, 0, 0, 0, false, 0, 0) {}
118
120 uint16_t getTriggerNumber() const { return static_cast<uint16_t>(m_triggerNumber); }
122 uint16_t getTriggerType() const { return static_cast<uint16_t>(m_triggerType); }
124 uint16_t getPipelineAddress() const { return static_cast<uint16_t>(m_pipelineAddress); }
126 uint16_t getCMC1() const { return static_cast<uint16_t>(m_cmc1); }
128 uint16_t getCMC2() const { return static_cast<uint16_t>(m_cmc2); }
130 uint16_t getAPVError() const { return static_cast<uint16_t>(m_apvError); }
132 uint16_t getFTBError() const { return static_cast<uint16_t>(m_ftbError); }
134 uint16_t getFTBFlags() const { return m_ftbFlags; }
136 uint16_t getEmuPipelineAddress() const { return static_cast<uint16_t>(m_emuPipelineAddress); }
138 uint16_t getAPVErrorOR() const { return static_cast<uint16_t>(m_apvErrorOR); }
140 bool getAPVMatch() const {return m_apvMatch; }
142 bool getFADCMatch() const {return m_fadcMatch; }
144 bool getUpsetAPV() const {return m_upsetApv; }
146 bool getSEURecoData() const {return m_seuRecoData; }
148 bool getBadMapping() const {return m_badMapping; }
150 bool getBadTrailer() const {return m_badTrailer; }
152 bool getBadHeader() const {return m_badHeader; }
154 bool getMissedHeader() const {return m_missedHeader; }
156 bool getMissedTrailer() const {return m_missedTrailer; }
157
159 unsigned short getFADCNumber() const { return m_fadcNo; }
161 unsigned short getAPVNumber() const { return m_apvNo; }
162
163
164
167 void setFTBFlags(uint16_t ftbFlags) { m_ftbFlags = ftbFlags; }
170 void setEmuPipelineAddress(uint8_t emuPipelineAddress) { m_emuPipelineAddress = emuPipelineAddress; }
173 void setApvErrorOR(uint8_t apvErrorOR) { m_apvErrorOR = apvErrorOR; }
176 void setAPVMatch(bool APVMatch) { m_apvMatch = APVMatch; }
179 void setFADCMatch(bool FADCMatch) { m_fadcMatch = FADCMatch; }
182 void setUpsetAPV(bool UpsetAPV) { m_upsetApv = UpsetAPV; }
185 void setSEURecoData(bool SEURecoData) { m_seuRecoData = SEURecoData; }
188 void setBadMapping(bool BadMapping) { m_badMapping = BadMapping; }
191 void setBadTrailer(bool BadTrailer) { m_badTrailer = BadTrailer; }
194 void setMissedTrailer(bool MissedTrailer) { m_missedTrailer = MissedTrailer; }
197 void setMissedHeader(bool MissedHeader) { m_missedHeader = MissedHeader; }
198
199 private:
207 uint8_t m_cmc1;
209 uint8_t m_cmc2;
211 uint8_t m_apvError;
213 uint8_t m_ftbError;
215 uint16_t m_ftbFlags;
238
240 uint8_t m_fadcNo;
242 uint8_t m_apvNo;
243
245
246 }; // class SVDDAQDiagnostic
247
248} // namespace Belle2
249
250#endif //SVDDAQDIAGNOSTICS_H
void setMissedHeader(bool MissedHeader)
functions for setting values for
SVDDAQDiagnostic()
Default constructor.
void setApvErrorOR(uint8_t apvErrorOR)
functions for setting values unpacked from FADC trailer
uint8_t m_apvError
APV error code.
uint8_t m_apvErrorOR
APV error code in FADC trailer.
bool getMissedHeader() const
Get the missed Header.
bool m_badTrailer
Bad fadc Trailer.
bool getBadMapping() const
Get the Bad Mapping code.
void setFADCMatch(bool FADCMatch)
functions for setting values of
bool getBadTrailer() const
Get the Bad Trailer code.
uint8_t m_triggerNumber
Trigger number.
uint16_t getFTBError() const
Get the FTB errors field.
bool m_seuRecoData
SEU Special Data.
uint16_t getFTBFlags() const
Get the FTB Flags field.
bool getFADCMatch() const
Get the FADCmatch code.
uint8_t m_ftbError
FTB error code.
bool m_missedHeader
missed Header
uint8_t m_pipelineAddress
Pipeline address.
bool getUpsetAPV() const
Get the UpsetAPV code.
uint16_t getCMC1() const
Get the Common Mode Correction w/o masking out particle signals.
bool getMissedTrailer() const
Get the missed Trailer.
void setAPVMatch(bool APVMatch)
functions for setting values of
uint8_t m_emuPipelineAddress
emulated pipeline Address
void setSEURecoData(bool SEURecoData)
functions for setting values for
uint16_t getCMC2() const
Get the Common Mode Correction performed after masking particle signals.
uint8_t m_triggerType
Trigger type.
bool getSEURecoData() const
Get the SEURecoData code.
uint16_t getAPVError() const
Get the APV error code.
void setMissedTrailer(bool MissedTrailer)
functions for setting values for
bool m_badHeader
Bad fadc Header.
uint16_t getTriggerType() const
Get the trigger type.
void setUpsetAPV(bool UpsetAPV)
functions for setting values for
void setEmuPipelineAddress(uint8_t emuPipelineAddress)
functions for setting values unpacked from FADC trailer
@ UpsetAPVBits
Number of bits available to represent an upset APV code.
@ FADCMatchBits
Number of bits available to represent an FADC match code.
@ APVErrorBits
Number of bits available to represent an APV error code.
@ EMUPipelineAddressBits
Number of bits available to represent an Emulated pipeline address.
@ PipelineAddressBits
Number of bits available to represent a pipeline address.
@ MissedHeaderBits
Number of Bits available to represent missed header.
@ APVErrorORBits
Number of bits available to represent an APV error OR code.
@ MissedTrailerBits
Number of Bits available to represent missed trailer.
@ FTBErrorBits
Number of bits available to represent a FTB error code.
@ BadHeaderBits
Number of Bits available to represent bad header.
@ CMC2Bits
Number of bits available to represent Common Mode Correction performed after masking particle signals...
@ Bits
Total bit size of the SVDDAQDiagnostic.
@ BadTrailerBits
Number of Bits available to represent bad trailer code.
@ APVMatchBits
Number of bits available to represent an APV match code.
@ FTBFlagsBits
Number of bits available to represent a FTB Flags Field.
@ CMC1Bits
Number of bits available to represent Common Mode Correction w/o masking out particle signals.
@ BadMappingBits
Number of bits available to represent bad mapping.
@ SEURecoDataBits
Number of bits available to represent an SEU Recovery Data code.
@ TriggerNumberBits
Number of bits available to represent a trigger number.
@ TriggerTypeBits
Number of bits available to represent a trigger type.
SVDDAQDiagnostic(uint8_t triggerNumber, uint8_t triggerType, uint8_t pipelineAddress, uint8_t cmc1, uint8_t cmc2, uint8_t apvError, uint8_t ftbError, bool fadcMatch, bool apvMatch, bool badHeader, bool missedHeader, bool missedTrailer, uint8_t fadcNo=uint8_t(0), uint8_t apvNo=uint8_t(0))
Constructor.
bool m_missedTrailer
missed Trailer
bool getAPVMatch() const
Get the APVmatch code.
uint16_t getPipelineAddress() const
Get the pipeline address.
bool m_badMapping
Bad mapping.
bool m_fadcMatch
if # of FADC boards match # of RawData objects
uint16_t getEmuPipelineAddress() const
Get the emulated pipeline address.
uint16_t getAPVErrorOR() const
Get the APV error OR code.
void setFTBFlags(uint16_t ftbFlags)
functions for setting values unpacked from FADC trailer
void setBadTrailer(bool BadTrailer)
functions for setting values for
unsigned short getFADCNumber() const
Get FADC number.
void setBadMapping(bool BadMapping)
functions for setting values for
uint16_t m_ftbFlags
FTB Flags Field.
unsigned short getAPVNumber() const
Get APV number.
uint16_t getTriggerNumber() const
Get the trigger number.
bool getBadHeader() const
Get the Bad Header code.
bool m_apvMatch
if # of APV headers match # of APVs for given FADC
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Abstract base class for different kinds of events.