Belle II Software  release-08-01-10
TOPInterimFEInfo.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 #pragma once
10 
11 #include <framework/datastore/RelationsObject.h>
12 
13 namespace Belle2 {
24  public:
25 
29  enum ErrorFlags {c_InvalidFEHeader = 0x0001,
31  c_InvalidMagicWord = 0x0004,
33  c_DifferentAsics = 0x0010,
35  c_DifferentWindows = 0x0040,
37  c_InvalidScrodID = 0x0100
38  };
39 
44  {}
45 
51  TOPInterimFEInfo(unsigned short scrodID, int dataSize):
52  m_scrodID(scrodID), m_dataSize(dataSize)
53  {}
54 
59 
64 
69 
74  void setErrorFlag(ErrorFlags flag) {m_errorFlags |= flag;}
75 
80  unsigned getScrodID() const {return m_scrodID;}
81 
86  int getDataSize() const {return m_dataSize;}
87 
92  unsigned getFEHeadersCount() const {return m_FEHeaders;}
93 
98  unsigned getEmptyFEHeadersCount() const {return m_emptyFEHeaders;}
99 
104  unsigned getWaveformsCount() const {return m_waveforms;}
105 
110  unsigned getErrorFlags() const {return m_errorFlags;}
111 
117  bool isErrorBitSet(ErrorFlags flag) const {return (m_errorFlags & flag) == flag;}
118 
119  private:
120 
121  unsigned short m_scrodID = 0;
122  int m_dataSize = 0;
123  unsigned m_FEHeaders = 0;
124  unsigned m_emptyFEHeaders = 0;
125  unsigned m_waveforms = 0;
126  unsigned m_errorFlags = 0;
131  };
132 
134 }
Defines interface for accessing relations of objects in StoreArray.
Class to store debug info of raw data in Interim FE format.
int getDataSize() const
Returns data buffer size.
unsigned short m_scrodID
SCROD ID.
TOPInterimFEInfo(unsigned short scrodID, int dataSize)
Full constructor.
unsigned getErrorFlags() const
Returns error flags.
unsigned getWaveformsCount() const
Returns the number of waveforms found in data buffer.
unsigned m_errorFlags
error flags, see enum
void incrementEmptyFEHeadersCount()
Increments empty FE headers counter.
void incrementWaveformsCount()
Increments waveforms counter.
unsigned m_FEHeaders
number of FE headers in data buffer
unsigned getEmptyFEHeadersCount() const
Returns the number of empty FE headers found in data buffer.
void incrementFEHeadersCount()
Increments FE headers counter.
void setErrorFlag(ErrorFlags flag)
Sets error flag.
int m_dataSize
data buffer size [32-bit words]
unsigned m_emptyFEHeaders
number of empty FE headers in data buffer
unsigned getScrodID() const
Returns SCROD ID.
@ c_DifferentChannels
in FE and WF header
@ c_DifferentScrodIDs
in HLSB and FE header
@ c_InvalidMagicWord
at the end of FE header
@ c_InvalidScrodID
no front-end map available
@ c_DifferentCarriers
in FE and WF header
@ c_DifferentWindows
in FE and WF header
@ c_InsufficientWFData
too few words for waveform data
@ c_InvalidFEHeader
invalid FE header word
@ c_DifferentAsics
in FE and WF header
ClassDef(TOPInterimFEInfo, 1)
ClassDef.
TOPInterimFEInfo()
Default constructor.
bool isErrorBitSet(ErrorFlags flag) const
Returns true if particular error flag is set.
unsigned m_waveforms
number of waveforms in data buffer
unsigned getFEHeadersCount() const
Returns the number of FE headers found in data buffer.
Abstract base class for different kinds of events.