Belle II Software development
DQMHistSnapshots.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#pragma once
10
11// EPICS
12#ifdef _BELLE2_EPICS
13#include "cadef.h"
14// #include "dbDefs.h"
15// #include "epicsString.h"
16// #include "cantProceed.h"
17#endif
18
19#include <dqm/core/DQMHistAnalysis.h>
20#include <TH1.h>
21#include <TCanvas.h>
22#include <time.h>
23
24namespace Belle2 {
32
36 typedef struct {
38 TH1* histo;
40 TCanvas* canvas;
42 int stale;
43 } SSNODE;
44
45 // Public functions
46 public:
47
52
57
61 void initialize() override final;
62
66 void beginRun() override final;
67
71 void event() override final;
72
76 void endRun() override final;
77
81 void terminate() override final;
82
88 SSNODE* find_snapshot(TString a);
89
90 // Data members
91 private:
93 std::vector<SSNODE*> m_ssnode;
97 time_t m_last_check = 0;
98
99 };
101} // end namespace Belle2
102
The base class for the histogram analysis module.
Class for generating snapshots for histograms.
void initialize() override final
Initializer.
int m_check_interval
Interval between checks in second.
std::vector< SSNODE * > m_ssnode
List of snapshots.
void terminate() override final
This method is called at the end of the event processing.
void event() override final
This method is called for each event.
void endRun() override final
This method is called if the current run ends.
time_t m_last_check
The time for the last check.
void beginRun() override final
Called when entering a new run.
SSNODE * find_snapshot(TString a)
Find a snapshot by the histogram's name.
Abstract base class for different kinds of events.
STL namespace.
The struct for the snapshots.
TH1 * histo
The histogram for snapshot.
TCanvas * canvas
The canvas for the histogram to be showed.
int stale
Whether the histogram is not updated for a long time.