Belle II Software development
rawinputModule.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 RAW_INPUT_H
10#define RAW_INPUT_H
11
12#include <framework/core/Module.h>
13
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/datastore/StoreArray.h>
16
17#include <string>
18
19#include <daq/rawdata/modules/DAQConsts.h>
20#include <rawdata/dataobjects/RawCDC.h>
21#include <rawdata/dataobjects/RawSVD.h>
22#include <rawdata/dataobjects/RawECL.h>
23#include <rawdata/dataobjects/RawARICH.h>
24#include <rawdata/dataobjects/RawTOP.h>
25#include <rawdata/dataobjects/RawKLM.h>
26#include <rawdata/dataobjects/RawFTSW.h>
27#include <rawdata/dataobjects/RawTRG.h>
28#include <rawdata/dataobjects/RawCOPPER.h>
29
30#include <framework/dataobjects/EventMetaData.h>
31
32#define RBUFSIZE 100000000
33#define MAXEVTSIZE 10000000
34
35namespace Belle2 {
42 class RawInputModule : public Module {
43
44 // Public functions
45 public:
46
49 virtual ~RawInputModule();
50
52 void initialize() override;
53
55 void beginRun() override;
56 void event() override;
57 void endRun() override;
58 void terminate() override;
59
60 private:
62 void registerRawCOPPERs();
63
64 // Data members
65 private:
67 std::string m_inputFileName;
68
70 int m_fd;
71
73 int m_nevt;
74
86 };
88} // end namespace Belle2
89
90#endif
Base class for Modules.
Definition: Module.h:72
A class definition of an input module for Sequential ROOT I/O.
void registerRawCOPPERs()
function to read raw data
int m_nevt
Total nr. of events in the file.
StoreArray< RawSVD > m_rawSVD
RawSVD.
void initialize() override
Module functions to be called from main process.
void event() override
This method is the core of the module.
RawInputModule()
Constructor / Destructor.
void endRun() override
This method is called if the current run ends.
StoreArray< RawFTSW > m_rawFTSW
RawFTSW.
void terminate() override
This method is called at the end of the event processing.
std::string m_inputFileName
File name.
StoreObjPtr< EventMetaData > m_eventMetaData
EventMetaData.
StoreArray< RawCOPPER > m_rawCOPPER
RawCOPPER.
StoreArray< RawARICH > m_rawARICH
RawARICH.
StoreArray< RawTRG > m_rawTRG
RawTRG.
void beginRun() override
Module functions to be called from event process.
StoreArray< RawKLM > m_rawKLM
RawKLM.
StoreArray< RawTOP > m_rawTOP
RawTOP.
StoreArray< RawDataBlock > m_rawDataBlock
RawDataBlock.
StoreArray< RawECL > m_rawECL
RawECL.
StoreArray< RawCDC > m_rawCDC
RawCDC.
int m_fd
File handle.
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.