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 {
62
63
66 };
67
68
85 SVDDAQDiagnostic(uint8_t triggerNumber, uint8_t triggerType, uint8_t pipelineAddress, uint8_t cmc1, uint8_t cmc2, uint8_t apvError,
86 uint8_t ftbError, bool fadcMatch, bool apvMatch, bool badHeader, bool missedHeader, bool missedTrailer, uint8_t fadcNo = uint8_t(0),
87 uint8_t apvNo = uint8_t(0))
88
89 {
90 m_triggerNumber = triggerNumber;
91 m_triggerType = triggerType;
92 m_pipelineAddress = pipelineAddress;
93 m_cmc1 = cmc1;
94 m_cmc2 = cmc2;
95 m_apvError = apvError;
96 m_ftbError = ftbError;
97 m_fadcMatch = fadcMatch;
98 m_apvMatch = apvMatch;
99 m_badHeader = badHeader;
100 m_missedHeader = missedHeader;
101 m_missedTrailer = missedTrailer;
102
103 m_ftbFlags = 0;
105 m_apvErrorOR = 0;
106 m_fadcNo = fadcNo;
107 m_apvNo = apvNo;
108 m_upsetApv = 0;
109 m_badMapping = 0;
110 m_badTrailer = 0;
111 }
112
114 SVDDAQDiagnostic(): SVDDAQDiagnostic(0, 0, 0, 0, 0, 0, 0, 0, 0, false, 0, 0) {}
115
117 uint16_t getTriggerNumber() const { return static_cast<uint16_t>(m_triggerNumber); }
119 uint16_t getTriggerType() const { return static_cast<uint16_t>(m_triggerType); }
121 uint16_t getPipelineAddress() const { return static_cast<uint16_t>(m_pipelineAddress); }
123 uint16_t getCMC1() const { return static_cast<uint16_t>(m_cmc1); }
125 uint16_t getCMC2() const { return static_cast<uint16_t>(m_cmc2); }
127 uint16_t getAPVError() const { return static_cast<uint16_t>(m_apvError); }
129 uint16_t getFTBError() const { return static_cast<uint16_t>(m_ftbError); }
131 uint16_t getFTBFlags() const { return m_ftbFlags; }
133 uint16_t getEmuPipelineAddress() const { return static_cast<uint16_t>(m_emuPipelineAddress); }
135 uint16_t getAPVErrorOR() const { return static_cast<uint16_t>(m_apvErrorOR); }
137 bool getAPVMatch() const {return m_apvMatch; }
139 bool getFADCMatch() const {return m_fadcMatch; }
141 bool getUpsetAPV() const {return m_upsetApv; }
143 bool getBadMapping() const {return m_badMapping; }
145 bool getBadTrailer() const {return m_badTrailer; }
147 bool getBadHeader() const {return m_badHeader; }
149 bool getMissedHeader() const {return m_missedHeader; }
151 bool getMissedTrailer() const {return m_missedTrailer; }
152
154 unsigned short getFADCNumber() const { return m_fadcNo; }
156 unsigned short getAPVNumber() const { return m_apvNo; }
157
158
159
162 void setFTBFlags(uint16_t ftbFlags) { m_ftbFlags = ftbFlags; }
165 void setEmuPipelineAddress(uint8_t emuPipelineAddress) { m_emuPipelineAddress = emuPipelineAddress; }
168 void setApvErrorOR(uint8_t apvErrorOR) { m_apvErrorOR = apvErrorOR; }
171 void setAPVMatch(bool APVMatch) { m_apvMatch = APVMatch; }
174 void setFADCMatch(bool FADCMatch) { m_fadcMatch = FADCMatch; }
177 void setUpsetAPV(bool UpsetAPV) { m_upsetApv = UpsetAPV; }
180 void setBadMapping(bool BadMapping) { m_badMapping = BadMapping; }
183 void setBadTrailer(bool BadTrailer) { m_badTrailer = BadTrailer; }
186 void setMissedTrailer(bool MissedTrailer) { m_missedTrailer = MissedTrailer; }
189 void setMissedHeader(bool MissedHeader) { m_missedHeader = MissedHeader; }
190
191 private:
199 uint8_t m_cmc1;
201 uint8_t m_cmc2;
203 uint8_t m_apvError;
205 uint8_t m_ftbError;
207 uint16_t m_ftbFlags;
228
230 uint8_t m_fadcNo;
232 uint8_t m_apvNo;
233
235
236 }; // class SVDDAQDiagnostic
238} // namespace Belle2
239
240#endif //SVDDAQDIAGNOSTICS_H
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Class to store SVD DAQ diagnostic information.
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.
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
@ 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 adress.
@ 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.
@ TriggerNumberBits
Number of bits available to represent a trigger number.
@ TriggerTypeBits
Number of bits available to represent a trigger type.
uint16_t getCMC2() const
Get the Common Mode Correction performed after masking particle signals.
uint8_t m_triggerType
Trigger type.
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
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
Abstract base class for different kinds of events.