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
12namespace Belle2 {
19
20 SVDModeByte::operator std::string() const
21 {
22 std::stringstream os;
23 switch (m_id.parts.runType) {
24 case SVDRunType::raw:
25 os << "raw";
26 break;
28 os << "transpt";
29 break;
31 os << "0-suppr";
32 break;
34 os << "0-suppr+tfit";
35 break;
36 }
37 os << "/";
38 switch (m_id.parts.eventType) {
40 os << "global";
41 break;
43 os << "local";
44 break;
45 }
46 os << "/";
47 switch (m_id.parts.daqMode) {
49 os << "1 sample";
50 break;
52 os << "3 samples";
53 break;
55 os << "6 samples";
56 break;
57 default:
58 os << "unknown";
59 }
60 os << "/";
61 if (m_id.parts.triggerBin <= MaxGoodTriggerBin) {
62 os << static_cast<int>(m_id.parts.triggerBin);
63 } else {
64 os << "???";
65 }
66 return os.str();
67 }
68
69 std::ostream& operator<<(std::ostream& out, const SVDModeByte& id)
70 {
71 out << ((std::string)id);
72 return out;
73 }
74
76}
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.