Belle II Software development
DeSerializerPC.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 DESERIALIZERPC_H
10#define DESERIALIZERPC_H
11
12#include <string>
13#include <vector>
14
15#include <framework/datastore/StoreObjPtr.h>
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
23#include <rawdata/dataobjects/RawFTSW.h>
24#include <framework/dataobjects/EventMetaData.h>
25
26namespace Belle2 {
35
36 // Public functions
37 public:
38
41 virtual ~DeSerializerPCModule();
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 virtual void checkData(RawDataBlock* raw_datablk, unsigned int* exp_copper_0,
67 unsigned int* run_copper_0, unsigned int* subrun_copper_0,
68 unsigned int* eve_copper_0, unsigned int* error_bit_flag);
69
70 void setErrorFlag(unsigned int error_flag, StoreObjPtr<EventMetaData> evtmetadata);
71
72#ifdef NONSTOP
74 void waitResume() override;
75#endif
76
77
80
82 std::vector<EvtSocketRecv*> m_recv;
83
85 std::vector<int> m_socket;
86
88 std::vector<std::string> m_hostname_from;
89
91 std::vector<int> m_port_from;
92
93 StoreArray<RawFTSW> raw_ftswarray;
94
95 StoreArray<RawCOPPER> rawcprarray;
96
97
98 // StoreArray<ReducedRawCOPPER> rawcprarray;
100 PreRawCOPPERFormat_latest m_pre_rawcpr;
101
102 int event_diff;
103
104 unsigned int m_prev_copper_ctr;
105
106 unsigned int m_prev_evenum;
107
108 };
109
111} // end namespace Belle2
112
113#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.
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
virtual void setRecvdBuffer(RawDataBlock *raw_datablk, int *delete_flag)
attach buffer to RawDataBlock
DeSerializerPCModule()
Constructor / Destructor.
virtual void checkData(RawDataBlock *raw_datablk, unsigned int *exp_copper_0, unsigned int *run_copper_0, unsigned int *subrun_copper_0, unsigned int *eve_copper_0, unsigned int *error_bit_flag)
check data contents
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
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.