Belle II Software development
DqmHistoManagerModule.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#ifndef DQM_HISTO_MANAGER_H
9#define DQM_HISTO_MANAGER_H
10
11#include <framework/core/Module.h>
12#include <daq/dataflow/EvtSocket.h>
13
14#include <framework/pcore/MsgHandler.h>
15
16#include "TH1.h"
17#include "TDirectory.h"
18
19#include <string>
20#include <time.h>
21
22#define DQM_SOCKET 9899
23
24namespace Belle2 {
32 public:
33
36 virtual ~DqmHistoManagerModule();
37
39 void initialize() override;
40 void beginRun() override;
41 void endRun() override;
42 void event() override;
43 void terminate() override;
44
45 private:
46 int StreamHistograms(TDirectory*, MsgHandler*);
47
48 private:
49 std::string m_workdir;
50 std::string m_histfile;
51 std::string m_hostname;
52 int m_port;
53 int m_interval;
54 int m_dumpinterval;
55
57 bool m_initialized;
58 int m_nevent;
59 time_t m_ptime;
60 time_t m_dtime;
61 time_t m_pstep;
62 time_t m_dstep;
63
64
65 // Socket interface
66 EvtSocketSend* m_sock;
67 MsgHandler* m_msg;
68 int m_nobjs;
69
70
71
72 };
74} // Namaspace Belle2
75
76#endif /* HISTO_MANAGER_H */
Class definition of DqmHistoManager module.
std::string m_histfile
Name of histogram output file.
void initialize() override
module functions
void event() override
This method is the core of the module.
void endRun() override
This method is called if the current run ends.
void terminate() override
This method is called at the end of the event processing.
std::string m_workdir
Name of working directory.
void beginRun() override
Called when entering a new run.
bool m_initmain
True if initialize() was called.
std::string m_hostname
Host name to send histograms.
DqmHistoManagerModule()
Constructor and Destructor.
Base class for Modules.
Definition: Module.h:72
A class to encode/decode an EvtMessage.
Definition: MsgHandler.h:103
Abstract base class for different kinds of events.