Belle II Software development
DummyDataSource.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 DUMMYDATAPACKER_H
10#define DUMMYDATAPACKER_H
11
12#include <string>
13#include <stdlib.h>
14#include <sys/time.h>
15
16#include <framework/core/Module.h>
17#include <framework/datastore/StoreObjPtr.h>
18#include <framework/datastore/StoreArray.h>
19#include <framework/dataobjects/EventMetaData.h>
20
21#include <rawdata/dataobjects/RawCOPPER.h>
22
23#define USE_RAWDATABLOCK
24
25namespace Belle2 {
34
35 // Public functions
36 public:
37
40 virtual ~DummyDataSourceModule();
41
43 void initialize() override;
44
46 void event() override;
47
48
49 protected :
51 // virtual void checkData(RawDataBlock* raw_datablk, unsigned int* eve_copper_0);
52
53 // StoreArray<RawFTSW> raw_ftswarray;
54
57
60
62 unsigned int n_basf2evt;
63
64 /* //! Compression Level */
65 /* int m_compressionLevel; */
66
69
72
73#ifdef USE_RAWDATABLOCK
76#endif
77
78 double m_totbytes;
80 std::string m_nodename;
81
84
87
88 double m_start_time;
89 double m_prev_time;
90 int prev_event;
91 double m_prev_totbytes;
92 int m_prev_nevt;
93
95 double getTimeSec()
96 {
97 struct timeval t;
98 gettimeofday(&t, NULL);
99 return (t.tv_sec + t.tv_usec * 1.e-6);
100 }
101
102
103 };
104
106} // end namespace Belle2
107
108#endif // MODULEHELLO_H
A class definition of an input module for Sequential ROOT I/O.
StoreArray< RawCOPPER > rawcprarray
RawCOPPER array.
DummyDataSourceModule()
Constructor / Destructor.
void initialize() override
Module functions to be called from main process.
unsigned int n_basf2evt
Number of events.
std::string m_nodename
Node name.
void event() override
Module functions to be called from event process.
StoreArray< RawDataBlock > raw_datablkarray
RawDataBlock array.
int m_shmflag
Use shared memory.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Event Meta Data.
int max_nevt
check data contents
double getTimeSec()
store time info.
Base class for Modules.
Definition: Module.h:72
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.