Belle II Software development
PXDErrorFlags.cc
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#include "pxd/dataobjects/PXDErrorFlags.h"
10
12const Belle2::PXD::PXDError::PXDErrorFlags Belle2::PXD::PXDError::getVerboseMask(void) { return Belle2::PXD::PXDError::PXDErrorFlags();};
14const Belle2::PXD::PXDError::PXDErrorFlags Belle2::PXD::PXDError::getSilenceMask(void) { return ~getVerboseMask();};
15
16const std::string& Belle2::PXD::PXDError::getPXDBitErrorName(int bit)
17{
18 static const std::string undefined("undefined");
20 static const std::string error_name[ONSEN_MAX_TYPE_ERR] = {
21 // 0-3
22 "Event structure problem", "Frame TrigNr vs ONSEN Trigger Frame mismatch", "Frame TrigNr vs EvtMeta mismatch", "ONSEN Trigger is not first frame",
23 // 4-7
24 "DHC_END missing/wrong placed", "NR of Frames too small", "ROI packet invalid size", "DATA outside of DHE",
25 // 8-11
26 "DHC_START is not second frame", "DHE IDs have wrong order in DHC", "Fixed size frame wrong size", "DHE CRC Error:",
27 // 12-15
28 "Unknown DHC type", "Header Type invalid for Frame Type", "Event Header Full Packet Size Error", "Event Header Magic Error",
29 // 16-19
30 "Event Header Frame Count Error", "Event header Frame Size Error", "HLTROI Magic Error", "Merger HLT/DATCON TrigNr Mismatch",
31 // 20-23
32 "DHP Size too small", "DHP-DHE DHEID mismatch", "DHP-DHE Port mismatch", "DHP Pix w/o row",
33 // 24-27
34 "DHE START/END ID mismatch", "DHE ID mismatch of START and this frame", "DHE_START w/o prev END", "Nr PXD data ==0",
35 // 28-31
36 "Missing Datcon", "NO DHC data for Trigger", "DHE active mismatch", "DHP active mismatch",
37 // 32-35
38 "SendUnfiltered but Filtered Frame Type", "!SendUnfiltered but Unfiltered Frame Type", "DHP has double header", "Error bit in frame header set",
39 // 36-39
40 "Error bit in GHOST frame header not set", "Suspicious Padding/Checksum in DHP ZSP", "DHC Words in Event mismatch", "DHE Words in Event mismatch",
41 // 40-43
42 "Row Overflow/out of bounds >=768", "DHP Frames not continuesly", "DHP Frame numbers of different frames differ>1", "DHP Frame differ from DHE Frame by >1",
43 // 44-47
44 "DHE ID is invalid", "DHC ID Start/End Mismatch", "DHE End w/o Start", "double DHC End",
45 // 48-51
46 "DHC vs EvtMeta mismatch for TriggerNr", "DHE vs EvtMeta mismatch for TriggerNr", "DHP COL overflow (unconnected drain lines)", "Unexpected (=unsupported) Frame Type",
47 // 52-55
48 "DHC vs EvtMeta mismatch for Exp/Run/Subrun", "DHC vs EvtMeta mismatch for TimeTag", "ONS_TRG: HLT vs EvtMeta mismatch", "ONS_TRG: DATCON vs EvtMeta mismatch",
49 // 56-59
50 "TriggerGate differ for DHEs in event", "Trigger FrameNr differ for DHEs in event", "DHP row w/o Pix", "DHE_START is not third frame",
51 // 60-63
52 "Fake and NoFake frames for DHH", "Unusable Data in Module", "DHE or DHC END error bits set", "DHH OT FW Misc Error"
53 };
54 if (bit < 0 || bit >= ONSEN_MAX_TYPE_ERR) return undefined;
55 return error_name[bit];
56}