Belle II Software development
DeSerializerPrePC.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 DESERIALIZERPREPC_H
10#define DESERIALIZERPREPC_H
11
12#include <string>
13#include <vector>
14#include <stdlib.h>
15
16#include <framework/datastore/StoreArray.h>
17
18#include <daq/rawdata/modules/DeSerializer.h>
19#include <daq/dataflow/EvtSocket.h>
20
21#include <rawdata/dataobjects/RawCOPPER.h>
22#include <rawdata/dataobjects/PreRawCOPPERFormat_latest.h>
23
24#include <rawdata/dataobjects/RawFTSW.h>
25
26namespace Belle2 {
35
36 // Public functions
37 public:
38
42
44 void initialize() override;
45
47 void event() override;
48
49
50 protected :
52 virtual int Connect();
53
55 virtual int recvFD(int fd, char* buf, int data_size_byte, int flag);
56
57
59 virtual int* recvData(int* delete_flag, int* total_m_size_word, int* num_events_in_sendblock, int* num_nodes_in_sendblock);
60
62 virtual void setRecvdBuffer(RawDataBlock* raw_datablk, int* delete_flag);
63
65 virtual void checkData(RawDataBlock* raw_datablk, unsigned int* eve_copper_0);
66
69
71 std::vector<EvtSocketRecv*> m_recv;
72
74 std::vector<int> m_socket;
75
77 std::vector<std::string> m_hostname_from;
78
80 std::vector<int> m_port_from;
81
82 StoreArray<RawFTSW> raw_ftswarray;
83
84 StoreArray<RawCOPPER> rawcprarray;
85
86 // StoreArray<ReducedRawCOPPER> rawcprarray;
88 PreRawCOPPERFormat_latest m_pre_rawcpr;
89
90 int event_diff;
91
92 unsigned int m_prev_copper_ctr;
93
94 unsigned int m_prev_evenum;
95
96 };
97
99} // end namespace Belle2
100
101#endif // MODULEHELLO_H
A class definition of an input module for Sequential ROOT I/O.
Definition: DeSerializer.h:36
A class definition of an input module for Sequential ROOT I/O.
std::vector< int > m_socket
Reciever Socket.
virtual int * recvData(int *delete_flag, int *total_m_size_word, int *num_events_in_sendblock, int *num_nodes_in_sendblock)
receive data
void initialize() override
Module functions to be called from main process.
void event() override
Module functions to be called from event process.
std::vector< EvtSocketRecv * > m_recv
Reciever basf2 Socket.
virtual void checkData(RawDataBlock *raw_datablk, unsigned int *eve_copper_0)
check data contents
std::vector< int > m_port_from
port # to connect data sources
virtual int Connect()
Accept connection.
virtual int recvFD(int fd, char *buf, int data_size_byte, int flag)
receive data
DeSerializerPrePCModule()
Constructor / Destructor.
virtual void setRecvdBuffer(RawDataBlock *raw_datablk, int *delete_flag)
attach buffer to RawDataBlock
std::vector< std::string > m_hostname_from
hostname of upstream Data Sources
The Raw COPPER class ver.1 ( the latest version since May, 2014 ) This class stores data received by ...
The RawDataBlock class Base class for rawdata handling.
Definition: RawDataBlock.h:27
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.