Belle II Software
development
SendTrailer.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 "daq/dataobjects/SendTrailer.h"
10
11
#include <cstring>
12
13
using namespace
std
;
14
using namespace
Belle2
;
15
16
//ClassImp(SendTrailer);
17
18
SendTrailer::SendTrailer
()
19
{
20
Initialize
();
21
// cout << "SendTrailer NULL constructor" << endl;
22
}
23
24
SendTrailer::SendTrailer
(
int
* buffer)
25
{
26
memcpy(m_buffer, buffer, SENDTRL_NWORDS *
sizeof
(
int
));
27
}
28
29
SendTrailer::~SendTrailer
()
30
{
31
}
32
33
int
* SendTrailer::GetBuffer()
34
{
35
return
m_buffer;
36
}
37
38
void
SendTrailer::SetBuffer
(
int
* bufin)
39
{
40
memcpy(m_buffer, bufin, SENDTRL_NWORDS *
sizeof
(
int
));
41
}
42
43
void
SendTrailer::Initialize
()
44
{
45
memset(m_buffer, 0, SENDTRL_NWORDS *
sizeof
(
int
));
46
SetMagicWord
();
47
}
48
49
50
void
SendTrailer::SetChksum
(
int
chksum)
51
{
52
m_buffer[ POS_CHKSUM ] = chksum;
53
}
54
55
void
SendTrailer::SetMagicWord
()
56
{
57
m_buffer[ POS_TERM_WORD ] = MAGIC_WORD_SEND_TRAILER;
58
}
59
60
int
SendTrailer::GetMagicWord()
61
{
62
return
m_buffer[ POS_TERM_WORD ];
63
}
64
65
int
SendTrailer::GetTrlNwords()
66
{
67
return
SENDTRL_NWORDS;
68
}
Belle2::SendTrailer::SendTrailer
SendTrailer()
Default constructor.
Definition
SendTrailer.cc:18
Belle2::SendTrailer::~SendTrailer
~SendTrailer()
Destructor.
Definition
SendTrailer.cc:29
Belle2::SendTrailer::SetMagicWord
void SetMagicWord()
initialize header
Definition
SendTrailer.cc:55
Belle2::SendTrailer::SetBuffer
void SetBuffer(int *bufin)
return buffer
Definition
SendTrailer.cc:38
Belle2::SendTrailer::SetChksum
void SetChksum(int chksum)
initialize header
Definition
SendTrailer.cc:50
Belle2::SendTrailer::Initialize
void Initialize()
set buffer
Definition
SendTrailer.cc:43
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
std
STL namespace.
daq
dataobjects
src
SendTrailer.cc
Generated on Mon Sep 1 2025 02:48:34 for Belle II Software by
1.13.2