Belle II Software development
SndHdrTemp.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 SNDHDRTEMP_H
10#define SNDHDRTEMP_H
11
12#include <TObject.h>
13
14#include "rawdata/dataobjects/RawHeader_latest.h"
15
16namespace Belle2 {
22 class SndHdrTemp : public TObject {
23 // class SndHdrTemp {
24 public:
25
27 SndHdrTemp();
28
30 SndHdrTemp(int*);
33
35 int* GetBuffer(void);
36
38 void SetBuffer(int* hdr);
39
40 void Initialize();
41
42 void SetNwords(int total_data_nwords);
43
44 void SetNumEventsinPacket(int num_events);
45 void SetNumNodesinPacket(int num_nodes);
46 void SetEventNumber(int eve_num);
47 void SetNodeID(int node_id);
48
49 void SetExpRunWord(unsigned int exp_run);
50
51
52 void SetRunNum(int run_num);
53 void SetSubRunNum(int subrun_num);
54 void SetExpNum(int exp_num);
55
56 int GetTotalNwords();
57 int GetHdrNwords();
59 int GetNumNodesinPacket();
60 int GetEventNumber();
61 int GetNodeID();
62
63 int GetRunNum();
64 int GetSubRunNum();
65 int GetExpNum();
66 int GetRunNumSubRunNum();
67
68 RawHeader_latest tmp_header;
69
70 /* Data Format : Node info */
71 enum {
72 SENDHDR_NWORDS = 6
73 };
74
75 private:
76
77 /* Data Format : Fixed length part*/
78 enum {
79 POS_NWORDS = 0,
80 POS_HDR_NWORDS = 1,
81 POS_NUM_EVE_NUM_NODES = 2,
82 POS_EXP_RUN_NUM = 3,
83 POS_EVE_NUM = 4,
84 POS_NODE_ID = 5
85 };
86
87
88
89 int m_buffer[ SENDHDR_NWORDS ];
90
91 ClassDef(SndHdrTemp, 1);
92 };
93
94
95
96
98}
99
100#endif
The Raw Header class ver.1 ( the latest version since May, 2014 ) This class defines the format of th...
~SndHdrTemp()
Destructor.
Definition: SndHdrTemp.cc:27
void SetBuffer(int *hdr)
set buffer
Definition: SndHdrTemp.cc:36
void SetNumEventsinPacket(int num_events)
set contents of Header
Definition: SndHdrTemp.cc:60
int GetHdrNwords()
get contents of Header
Definition: SndHdrTemp.cc:123
void SetNwords(int total_data_nwords)
initialize Header
Definition: SndHdrTemp.cc:50
int GetNumEventsinPacket()
get contents of Header
Definition: SndHdrTemp.cc:124
int * GetBuffer(void)
Get Header contents.
Definition: SndHdrTemp.cc:31
SndHdrTemp()
Default constructor.
Definition: SndHdrTemp.cc:15
Abstract base class for different kinds of events.