Belle II Software  release-08-01-10
DeSerializerCOPPER.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 DESERIALIZERCOPPER_H
10 #define DESERIALIZERCOPPER_H
11 
12 #include <fcntl.h>
13 #include <errno.h>
14 
15 #include <framework/datastore/StoreArray.h>
16 
17 #include <daq/rawdata/modules/DeSerializer.h>
18 
19 #include <rawdata/dataobjects/PreRawCOPPERFormat_latest.h>
20 
21 namespace Belle2 {
32 
33  // Public functions
34  public:
35 
38  virtual ~DeSerializerCOPPERModule();
39 
41  void initialize() override;
42 
44  void event() override;
45 
46  /* #ifndef REDUCED_RAWCOPPER */
47  /* //! Fill RawHeader */
48  /* virtual void fillNewRawCOPPERHeader(RawCOPPER* raw_copper); */
49  /* #endif */
50 
51 
52 
53 #ifdef NONSTOP
55  void resumeRun() override;
56 
58  void waitResume() override;
59 #endif
60 
61  protected:
64 
65  private:
66 
67 
68  StoreArray<RawDataBlock> raw_dblkarray;
69 
70  virtual int* readOneEventFromCOPPERFIFO(const int entry, int* delete_flag, int* m_size_word);
71  virtual void openCOPPER();
73  virtual int readFD(int fd, char* buf, int data_size_byte, int delete_flag);
74 
76  virtual void initializeCOPPER();
77 
78  // Parallel processing parameters
79 
81  int m_cpr_fd;
82 
85 
88 
89 
90 
92  unsigned int m_prev_ftsweve32;
93 
95  int m_exp;
96 
98  int m_run;
99 
100 
101  };
102 
104 } // end namespace Belle2
105 
106 #endif
A class definition of an input module for Sequential ROOT I/O.
int m_finesse_bit_flag
bit flag for available FINESSE slot
unsigned int m_prev_ftsweve32
Event # from data.
void initialize() override
Module functions to be called from main process.
virtual int readFD(int fd, char *buf, int data_size_byte, int delete_flag)
receive data
void event() override
Module functions to be called from event process.
int m_use_slot
bit flag for available FINESSE slot
const PreRawCOPPERFormat_latest m_pre_rawcpr
Handle to data from HSLBs.
DeSerializerCOPPERModule()
Constructor / Destructor.
int m_cpr_fd
COPPER file descripter.
virtual void initializeCOPPER()
Module functions to be called from main process.
A class definition of an input module for Sequential ROOT I/O.
Definition: DeSerializer.h:36
The Raw COPPER class ver.1 ( the latest version since May, 2014 ) This class stores data received by ...
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.