Belle II Software development
PXDReadRawBonnDAQMatched.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 <string>
16#include <map>
17#include <stdlib.h>
18
19
20namespace Belle2 {
25 class EventMetaData;
26 class RawPXD;
27
28 namespace PXD {
29
35 enum {MAXEVTSIZE = 4 * 1024 * 1024 + 256 * 4 + 16};
36 // Public functions
37 public:
38
41
42 private:
43
44 ~PXDReadRawBonnDAQMatchedModule() override final;
45
47 void initialize() override final;
48
50 void event() override final;
51
53 void terminate() override final;
54
55 // Data members
56
57 // Parallel processing parameters
58
61
64
66 std::string m_filename;
67
68 std::string m_RawPXDsName;
69
72
74 FILE* fh;
75
76 int readOneEvent(unsigned int& tnr);
77 int read_data(char* data, size_t len);
78
79 std::map <unsigned int, off_t> m_event_offset;
80 off_t m_last_offset{0};
81 };
82
83 } // end namespace PXD
85} // end namespace Belle2
Store event, run, and experiment numbers.
Module()
Constructor.
Definition Module.cc:30
std::map< unsigned int, off_t > m_event_offset
map event nr to offsets
int read_data(char *data, size_t len)
Read amount of data (len bytes) from file to ptr data.
std::string m_RawPXDsName
The name of the StoreArray RawPXDs to create.
int readOneEvent(unsigned int &tnr)
Read event and store it in datastore if trigger nr matches.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Event Meta Data.
The Raw PXD class.
Definition RawPXD.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
Namespace to encapsulate code needed for simulation and reconstrucion of the PXD.
Abstract base class for different kinds of events.