Belle II Software  release-08-01-10
PXDReadRawBonnDAQ.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 #pragma once
10 
11 #include <framework/core/Module.h>
12 #include <framework/datastore/StoreObjPtr.h>
13 #include <framework/datastore/StoreArray.h>
14 
15 #include <framework/dataobjects/EventMetaData.h>
16 #include <rawdata/dataobjects/RawPXD.h>
17 
18 #include <pxd/unpacking/PXDLocalDAQFile.h>
19 
20 #include <string>
21 #include <stdlib.h>
22 
23 
24 namespace Belle2 {
30  namespace PXD {
33  class PXDReadRawBonnDAQModule final : public Module {
34  enum {MAXEVTSIZE = 4 * 1024 * 1024 + 256 * 4 + 16};
35 
36  public:
39 
40  private:
42  ~PXDReadRawBonnDAQModule() override final;
43 
45  void initialize() override final;
46 
48  void event() override final;
49 
51  void terminate() override final;
52 
53  // Data members
54 
57 
60 
62  std::string m_filename;
63 
65  int* m_buffer;
66 
69 
70  unsigned int m_expNr;
71  unsigned int m_runNr;
72  unsigned int m_subRunNr;
73 
74  int readOneEvent(void);
75 
76  };
77 
78  } // end namespace PXD
80 } // end namespace Belle2
81 
Base class for Modules.
Definition: Module.h:72
A class to manage I/O for a chain of blocked files.
Module to Load Raw PXD Data from DHH network-dump file and store it as RawPXD in Data Store This is m...
void initialize() override final
Initialize.
unsigned int m_subRunNr
set by Param
void terminate() override final
Terminate.
void event() override final
Event.
~PXDReadRawBonnDAQModule() override final
Destructor.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Event Meta Data.
PXDLocalDAQFile * fh
File handle.
StoreArray< RawPXD > m_rawPXD
DHH Data.
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.