Belle II Software  release-08-01-10
Raw2DsModule.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 RAW2DSMODULE_H
10 #define RAW2DSMODULE_H
11 
12 #include <framework/core/Module.h>
13 #include <framework/pcore/RingBuffer.h>
14 
15 #include <string>
16 
17 #include <framework/datastore/StoreObjPtr.h>
18 #include <framework/datastore/StoreArray.h>
19 
20 #include <rawdata/dataobjects/RawFTSW.h>
21 #include <rawdata/dataobjects/RawCDC.h>
22 #include <rawdata/dataobjects/RawSVD.h>
23 #include <rawdata/dataobjects/RawECL.h>
24 #include <rawdata/dataobjects/RawARICH.h>
25 #include <rawdata/dataobjects/RawTOP.h>
26 #include <rawdata/dataobjects/RawKLM.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 
35 namespace Belle2 {
43  class Raw2DsModule : public Module {
44 
45  // Public functions
46  public:
47 
49  Raw2DsModule();
50  virtual ~Raw2DsModule();
51 
53  void initialize() override;
54 
56  void beginRun() override;
57  void event() override;
58  void endRun() override;
59  void terminate() override;
60 
61  void setErrorFlag(unsigned int error_flag, StoreObjPtr<EventMetaData> evtmetadata);
62 
63  private:
65  void registerRawCOPPERs();
66 
67  // Data members
68  private:
69 
71  std::string m_rbufname;
72  RingBuffer* m_rbuf;
73 
75  int m_nevt;
76 
88  };
89 
91 } // end namespace Belle2
92 
93 #endif // MODULEHELLO_H
Base class for Modules.
Definition: Module.h:72
A class definition of an input module for Sequential ROOT I/O.
Definition: Raw2DsModule.h:43
void registerRawCOPPERs()
function to register data buffer in DataStore as RawCOPPERs
int m_nevt
No. of sent events.
Definition: Raw2DsModule.h:75
StoreArray< RawSVD > m_rawSVD
RawSVD.
Definition: Raw2DsModule.h:81
void initialize() override
Module functions to be called from main process.
Definition: Raw2DsModule.cc:66
void event() override
This method is the core of the module.
void endRun() override
This method is called if the current run ends.
StoreArray< RawFTSW > m_rawFTSW
RawFTSW.
Definition: Raw2DsModule.h:87
void terminate() override
This method is called at the end of the event processing.
StoreObjPtr< EventMetaData > m_eventMetaData
EventMetaData.
Definition: Raw2DsModule.h:77
StoreArray< RawCOPPER > m_rawCOPPER
RawCOPPER.
Definition: Raw2DsModule.h:79
StoreArray< RawARICH > m_rawARICH
RawARICH.
Definition: Raw2DsModule.h:84
StoreArray< RawTRG > m_rawTRG
RawTRG.
Definition: Raw2DsModule.h:86
Raw2DsModule()
Constructor / Destructor.
Definition: Raw2DsModule.cc:45
void beginRun() override
Module functions to be called from event process.
Definition: Raw2DsModule.cc:97
StoreArray< RawKLM > m_rawKLM
RawKLM.
Definition: Raw2DsModule.h:85
StoreArray< RawTOP > m_rawTOP
RawTOP.
Definition: Raw2DsModule.h:82
StoreArray< RawDataBlock > m_rawDataBlock
RawDataBlock.
Definition: Raw2DsModule.h:78
StoreArray< RawECL > m_rawECL
RawECL.
Definition: Raw2DsModule.h:83
StoreArray< RawCDC > m_rawCDC
RawCDC.
Definition: Raw2DsModule.h:80
std::string m_rbufname
RingBuffer ID.
Definition: Raw2DsModule.h:71
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:39
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.