Belle II Software development
PXDReadRawONSEN.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/pcore/MsgHandler.h>
13#include <framework/datastore/StoreObjPtr.h>
14
15#include <string>
16#include <stdlib.h>
17
18
19namespace Belle2 {
24 class EventMetaData;
25 class RawPXD;
26
27 namespace PXD {
28
30
31
33 enum {MAXEVTSIZE = 4 * 1024 * 1024};
34
35 // Public functions
36 public:
37
42
43
44 private:
45
47 void initialize() override final;
48
50 void event() override final;
51
53 void terminate() override final;
54
55
56 // Data members
57
60
64 std::string m_filename;
65
68
71
74
77
79 FILE* fh;
80
81 int readOneEvent(void);
82 int read_data(char* data, size_t len);
83 bool getTrigNr(RawPXD& px);
84 bool unpack_dhc_frame(void* data);
85 };
86
87 } // end namespace PXD
89} // end namespace Belle2
90
Store event, run, and experiment numbers.
Module()
Constructor.
Definition Module.cc:30
A class to encode/decode an EvtMessage.
Definition MsgHandler.h:103
void initialize() override final
Initialize.
bool getTrigNr(RawPXD &px)
get the trigger number
int read_data(char *data, size_t len)
Read amount of data (len bytes) from file to ptr data.
PXDReadRawONSENModule()
Constructor / Destructor.
bool m_setEvtMeta
Set Event Meta Info.
void terminate() override final
Terminate.
void event() override final
Event.
MsgHandler * m_msghandler
Message handler.
bool unpack_dhc_frame(void *data)
unpack the dhc frame
int m_compressionLevel
Compression Level.
int readOneEvent(void)
Read data of one Event from File.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Event Meta Data.
The Raw PXD class.
Definition RawPXD.h:27
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.