Belle II Software  release-05-01-25
SndHdrTemp.h
1 //+
2 // File : SndHdrTemp.h
3 // Description : Module to handle SndHdrTemp attached by COPPER DAQ
4 //
5 // Author : Satoru Yamada, IPNS, KEK
6 // Date : 2 - Aug - 2013
7 //-
8 
9 #ifndef SNDHDRTEMP_H
10 #define SNDHDRTEMP_H
11 
12 #include <TObject.h>
13 
14 #include "rawdata/dataobjects/RawHeader_latest.h"
15 
16 namespace Belle2 {
22  class SndHdrTemp : public TObject {
23  // class SndHdrTemp {
24  public:
25 
27  SndHdrTemp();
28 
30  SndHdrTemp(int*);
32  ~SndHdrTemp();
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
Belle2::SndHdrTemp::SetNumEventsinPacket
void SetNumEventsinPacket(int num_events)
set contents of Header
Definition: SndHdrTemp.cc:61
Belle2::RawHeader_latest
The Raw Header class ver.1 ( the latest version since May, 2014 ) This class defines the format of th...
Definition: RawHeader_latest.h:32
Belle2::SndHdrTemp::GetNumEventsinPacket
int GetNumEventsinPacket()
get contents of Header
Definition: SndHdrTemp.cc:125
Belle2::SndHdrTemp::~SndHdrTemp
~SndHdrTemp()
Destructor.
Definition: SndHdrTemp.cc:28
Belle2::SndHdrTemp
Definition: SndHdrTemp.h:22
Belle2::SndHdrTemp::GetBuffer
int * GetBuffer(void)
Get Header contents.
Definition: SndHdrTemp.cc:32
Belle2::SndHdrTemp::GetHdrNwords
int GetHdrNwords()
get contents of Header
Definition: SndHdrTemp.cc:124
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SndHdrTemp::SetBuffer
void SetBuffer(int *hdr)
set buffer
Definition: SndHdrTemp.cc:37
Belle2::SndHdrTemp::SetNwords
void SetNwords(int total_data_nwords)
initialize Header
Definition: SndHdrTemp.cc:51
Belle2::SndHdrTemp::SndHdrTemp
SndHdrTemp()
Default constructor.
Definition: SndHdrTemp.cc:16