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