Belle II Software
development
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
Enumerator
c
d
f
p
t
v
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Symbols
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
RawTrailer_v2.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 RAWTRAILER_V2_H
10
#define RAWTRAILER_V2_H
11
12
#include <stdio.h>
13
14
#include <rawdata/switch_basf2_standalone.h>
15
16
//#define TRAILER_SIZE 16
17
/* #define POS_CHKSUM 0 */
18
/* #define POS_TERM_WORD 1 */
19
/* #define RAWCOPPER_TRAILER_SIZE 2 */
20
/* #define MAGIC_WORD_TERM_TRAILER 0x7fff0006 */
21
22
namespace
Belle2
{
27
33
// class RawTrailer_v2 : public TObject {
34
class
RawTrailer_v2
{
35
public
:
37
RawTrailer_v2
();
38
40
~RawTrailer_v2
();
41
43
void
CheckBuffer
();
44
45
int
*
GetBuffer
();
46
47
void
SetBuffer
(
int
* bufin);
48
49
void
Initialize
();
50
51
void
SetChksum
(
int
chksum);
52
53
void
SetMagicWord
();
54
55
int
GetTrlNwords
();
56
57
unsigned
int
GetChksum
();
58
59
int
GetMagicWord
();
60
61
enum
{
62
RAWTRAILER_NWORDS = 2
63
};
64
65
enum
{
66
MAGIC_WORD_TERM_TRAILER = 0x7fff0006
67
};
68
69
enum
{
70
POS_CHKSUM = 0,
71
POS_TERM_WORD = 1
72
};
73
74
private
:
76
int
*
m_buffer
;
77
79
// ver.2 Do not record m_buffer pointer. (Dec.19, 2014)
80
// ClassDef(RawTrailer_v2, 1);
81
};
34
class
RawTrailer_v2
{
…
};
82
83
84
inline
void
RawTrailer_v2::CheckBuffer
()
85
{
86
if
(
m_buffer
== NULL) {
87
B2FATAL(
"m_buffer is NULL. Exiting..."
);
88
}
89
}
84
inline
void
RawTrailer_v2::CheckBuffer
() {
…
}
90
91
inline
int
*
RawTrailer_v2::GetBuffer
()
92
{
93
return
m_buffer
;
94
}
91
inline
int
*
RawTrailer_v2::GetBuffer
() {
…
}
95
96
inline
void
RawTrailer_v2::SetBuffer
(
int
* bufin)
97
{
98
m_buffer
= bufin;
99
}
96
inline
void
RawTrailer_v2::SetBuffer
(
int
* bufin) {
…
}
100
101
inline
void
RawTrailer_v2::Initialize
()
102
{
103
SetMagicWord
();
104
}
101
inline
void
RawTrailer_v2::Initialize
() {
…
}
105
106
inline
void
RawTrailer_v2::SetChksum
(
int
chksum)
107
{
108
CheckBuffer
();
109
m_buffer
[ POS_CHKSUM ] = chksum;
110
}
106
inline
void
RawTrailer_v2::SetChksum
(
int
chksum) {
…
}
111
112
inline
void
RawTrailer_v2::SetMagicWord
()
113
{
114
CheckBuffer
();
115
m_buffer
[ POS_TERM_WORD ] = MAGIC_WORD_TERM_TRAILER;
116
}
112
inline
void
RawTrailer_v2::SetMagicWord
() {
…
}
117
118
inline
int
RawTrailer_v2::GetMagicWord
()
119
{
120
CheckBuffer
();
121
return
m_buffer
[ POS_TERM_WORD ];
122
}
118
inline
int
RawTrailer_v2::GetMagicWord
() {
…
}
123
124
inline
unsigned
int
RawTrailer_v2::GetChksum
()
125
{
126
CheckBuffer
();
127
return
(
unsigned
int
)(
m_buffer
[ POS_CHKSUM ]);
128
}
124
inline
unsigned
int
RawTrailer_v2::GetChksum
() {
…
}
129
130
inline
int
RawTrailer_v2::GetTrlNwords
()
131
{
132
return
RAWTRAILER_NWORDS;
133
}
130
inline
int
RawTrailer_v2::GetTrlNwords
() {
…
}
134
135
136
137
139
}
140
141
#endif
Belle2::RawTrailer_v2::RawTrailer_v2
RawTrailer_v2()
Default constructor.
Definition
RawTrailer_v2.cc:15
Belle2::RawTrailer_v2::m_buffer
int * m_buffer
do not record buffer ( RawCOPPER includes buffer of RawHeader and RawTrailer_v2 )
Definition
RawTrailer_v2.h:76
Belle2::RawTrailer_v2::~RawTrailer_v2
~RawTrailer_v2()
Destructor.
Definition
RawTrailer_v2.cc:20
Belle2::RawTrailer_v2::CheckBuffer
void CheckBuffer()
set buffer
Definition
RawTrailer_v2.h:84
Belle2::RawTrailer_v2::GetTrlNwords
int GetTrlNwords()
Set magic word.
Definition
RawTrailer_v2.h:130
Belle2::RawTrailer_v2::GetMagicWord
int GetMagicWord()
initialize header
Definition
RawTrailer_v2.h:118
Belle2::RawTrailer_v2::GetChksum
unsigned int GetChksum()
Set # of trailer words.
Definition
RawTrailer_v2.h:124
Belle2::RawTrailer_v2::SetMagicWord
void SetMagicWord()
initialize header
Definition
RawTrailer_v2.h:112
Belle2::RawTrailer_v2::SetBuffer
void SetBuffer(int *bufin)
return buffer
Definition
RawTrailer_v2.h:96
Belle2::RawTrailer_v2::SetChksum
void SetChksum(int chksum)
set buffer
Definition
RawTrailer_v2.h:106
Belle2::RawTrailer_v2::Initialize
void Initialize()
set buffer
Definition
RawTrailer_v2.h:101
Belle2::RawTrailer_v2::GetBuffer
int * GetBuffer()
set buffer
Definition
RawTrailer_v2.h:91
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
rawdata
dataobjects
include
RawTrailer_v2.h
Generated on Thu May 22 2025 02:55:20 for Belle II Software by
1.13.2