Belle II Software development
SVDModeByte.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 <svd/dataobjects/SVDModeByte.h>
10#include <sstream>
11
12using namespace std;
13
14namespace Belle2 {
21
22 SVDModeByte::operator string() const
23 {
24 stringstream os;
25 switch (m_id.parts.runType) {
26 case SVDRunType::raw:
27 os << "raw";
28 break;
30 os << "transpt";
31 break;
33 os << "0-suppr";
34 break;
36 os << "0-suppr+tfit";
37 break;
38 }
39 os << "/";
40 switch (m_id.parts.eventType) {
42 os << "global";
43 break;
45 os << "local";
46 break;
47 }
48 os << "/";
49 switch (m_id.parts.daqMode) {
51 os << "1 sample";
52 break;
54 os << "3 samples";
55 break;
57 os << "6 samples";
58 break;
59 default:
60 os << "unknown";
61 }
62 os << "/";
63 if (m_id.parts.triggerBin <= MaxGoodTriggerBin) {
64 os << static_cast<int>(m_id.parts.triggerBin);
65 } else {
66 os << "???";
67 }
68 return os.str();
69 }
70
71 std::ostream& operator<<(std::ostream& out, const SVDModeByte& id)
72 {
73 out << ((string)id);
74 return out;
75 }
76
78}
Class to store SVD mode information.
Definition: SVDModeByte.h:69
uint8_t baseType
The base integer type for SVDModeByte.
Definition: SVDModeByte.h:72
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
static const baseType c_DefaultID
Default / non-informative id 10010111 = 151 Run type: zero-suppressed, 2 Event type: global run,...
Definition: SVDModeByte.h:106
constexpr uint8_t daq_3samples
three samples per strip
Definition: SVDModeByte.h:59
constexpr uint8_t daq_1sample
one sample per strip
Definition: SVDModeByte.h:58
constexpr uint8_t daq_6samples
six samples per strip
Definition: SVDModeByte.h:60
constexpr uint8_t global_run
global run
Definition: SVDModeByte.h:47
constexpr uint8_t local_run
local run - should never happen
Definition: SVDModeByte.h:48
constexpr uint8_t zero_suppressed
Definition: SVDModeByte.h:36
constexpr uint8_t raw
00.
Definition: SVDModeByte.h:34
constexpr uint8_t zero_suppressed_timefit
Definition: SVDModeByte.h:37
constexpr uint8_t transparent
01.
Definition: SVDModeByte.h:35
Abstract base class for different kinds of events.
STL namespace.