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 <framework/dataobjects/EventMetaData.h>
16#include <rawdata/dataobjects/RawPXD.h>
17
18#include <string>
19#include <stdlib.h>
20
21
22namespace Belle2 {
28 namespace PXD {
29
34 enum {MAXEVTSIZE = 4 * 1024 * 1024};
35
36 // Public functions
37 public:
38
43
44
45 private:
46
48 void initialize() override final;
49
51 void event() override final;
52
54 void terminate() override final;
55
56
57 // Data members
58
61
65 std::string m_filename;
66
69
72
75
78
80 FILE* fh;
81
82 int readOneEvent(void);
83 int read_data(char* data, size_t len);
84 bool getTrigNr(RawPXD& px);
85 bool unpack_dhc_frame(void* data);
86 };
87
88 } // end namespace PXD
90} // end namespace Belle2
91
Base class for Modules.
Definition: Module.h:72
A class to encode/decode an EvtMessage.
Definition: MsgHandler.h:103
A class definition of an input module for Sequential ROOT I/O.
void initialize() override final
Initialize.
bool getTrigNr(RawPXD &px)
get the trigger number
int m_nread
No. of sent events.
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
std::string m_filename
File Name.
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
Abstract base class for different kinds of events.