Belle II Software  release-08-01-10
PrintData.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 PRINTDATA_H
10 #define PRINTDATA_H
11 
12 #include <framework/core/Module.h>
13 #include <framework/pcore/EvtMessage.h>
14 
15 #include <framework/datastore/DataStore.h>
16 #include <framework/datastore/StoreObjPtr.h>
17 #include <framework/datastore/StoreArray.h>
18 #include <framework/dataobjects/EventMetaData.h>
19 
20 #include <rawdata/dataobjects/RawDataBlock.h>
21 #include <rawdata/dataobjects/RawFTSW.h>
22 #include <rawdata/dataobjects/RawCOPPER.h>
23 #include <rawdata/dataobjects/RawSVD.h>
24 #include <rawdata/dataobjects/RawCDC.h>
25 #include <rawdata/dataobjects/RawTOP.h>
26 #include <rawdata/dataobjects/RawARICH.h>
27 #include <rawdata/dataobjects/RawECL.h>
28 #include <rawdata/dataobjects/RawKLM.h>
29 #include <rawdata/dataobjects/RawPXD.h>
30 
31 #include "TFile.h"
32 #include "TH1.h"
33 
34 
35 namespace Belle2 {
43  class PrintDataModule : public Module {
44 
45  // Public functions
46  public:
47 
50  virtual ~PrintDataModule();
51 
53  virtual void initialize() override;
54 
56  virtual void event() override;
57 
59  virtual void printCOPPEREvent(RawCOPPER* raw_array, int i, int array_index);
60 
62  virtual void printFTSWEvent(RawDataBlock* raw_array, int i);
63 
65  virtual void printBuffer(int* buf, int nwords);
66 
68  virtual void printPXDEvent(RawPXD* raw_pxd);
69 
71  virtual void endRun() override;
72 
73  protected :
76 
79 
81  int m_nftsw;
82 
84  int m_ncpr;
85 
88 
90  TH1F* hist[10];
91 
93  unsigned int m_start_utime;
94 
96  timeval prev_tv[1000];
97 
99  unsigned int prev_tv_eve[1000];
100 
103 
105  int tv_flag[1000];
106 
107  };
108 
110 } // end namespace Belle2
111 
112 #endif // MODULEHELLO_H
Base class for Modules.
Definition: Module.h:72
Read RawCOPPER objects and shows their hex dump.
Definition: PrintData.h:43
unsigned int m_start_utime
Unix time of the run start.
Definition: PrintData.h:93
int tv_flag[1000]
flag of timevalue
Definition: PrintData.h:105
virtual void initialize() override
initialization
Definition: PrintData.cc:59
virtual void printFTSWEvent(RawDataBlock *raw_array, int i)
print the contents of a RawFTSW event
Definition: PrintData.cc:168
virtual void printBuffer(int *buf, int nwords)
print the hex dump of an input
Definition: PrintData.cc:151
virtual void event() override
Module functions to be called from event process.
Definition: PrintData.cc:322
virtual void endRun() override
Called if the current run ends.
Definition: PrintData.cc:129
PrintDataModule()
Constructor / Destructor.
Definition: PrintData.cc:35
int n_basf2evt
No. of sent events.
Definition: PrintData.h:78
unsigned int prev_tv_eve[1000]
Integer time of the previous event.
Definition: PrintData.h:99
timeval prev_tv[1000]
Time of the previous event.
Definition: PrintData.h:96
int m_compressionLevel
Compression parameter.
Definition: PrintData.h:75
int prev_tv_pos
previous timevalue
Definition: PrintData.h:102
int m_print_cnt
counter
Definition: PrintData.h:87
virtual void printPXDEvent(RawPXD *raw_pxd)
print a PXD event
Definition: PrintData.cc:314
TH1F * hist[10]
histogram array
Definition: PrintData.h:90
virtual void printCOPPEREvent(RawCOPPER *raw_array, int i, int array_index)
print the contents of a RawCOPPER event
Definition: PrintData.cc:201
The Raw COPPER class This class stores data received by COPPER via belle2linkt Data from all detector...
Definition: RawCOPPER.h:52
The RawDataBlock class Base class for rawdata handling.
Definition: RawDataBlock.h:27
The Raw PXD class.
Definition: RawPXD.h:27
Abstract base class for different kinds of events.