Belle II Software development
DQMHistAnalysisInput2.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// File : DQMHistAnalysisInput.h
10// Description : Input module for DQM Histogram analysis
11//-
12
13#pragma once
14
15#include <framework/dataobjects/EventMetaData.h>
16#include <framework/datastore/StoreObjPtr.h>
17
18#include <dqm/core/DQMHistAnalysis.h>
19
20#include <TCanvas.h>
21#include <TKey.h>
22
23#include <string>
24#include <map>
25#include <vector>
26#include <filesystem>
27
28namespace Belle2 {
38
39 public:
40
45
49 void initialize() override final;
50
54 void beginRun() override final;
55
59 void event() override final;
60
64 void endRun() override final;
65
69 void terminate() override final;
70
71 // Data members
72 private:
74 std::string m_mempath;
83 TCanvas* m_c_info{nullptr};
84
86 int m_nevent = 0;
87
89 std::string m_lastChange;
90
93
95 unsigned int m_expno = 0;
97 unsigned int m_runno = 0;
99 unsigned int m_count = 0;
100
102 std::string m_statname;
104 void write_state(void);
106 time_t m_last_event{};
114 std::filesystem::file_time_type m_lasttime;
116 bool m_forceChanged{false};
117 };
119} // end namespace Belle2
120
Class to read histograms from a root file for online analysis modules.
std::string m_lastChange
last change date/time of shm input file
bool m_remove_empty
Whether to remove empty histograms.
void initialize() override final
Initialize the module.
std::string m_statname
The file name of the analysis for stats.
std::filesystem::file_time_type m_lasttime
Last time input file changes.
bool m_enable_run_info
Whether to enable the run info to be displayed.
void terminate() override final
This method is called at the end of the event processing.
time_t m_last_event
last time event loop entered
void event() override final
This method is called for each event.
bool m_forceChanged
enforce a content change on next event
std::string m_mempath
The name of the shared memory for the histograms.
time_t m_last_file_update
last time input file update detected
time_t m_last_content_update
last time input file content has changed
void endRun() override final
This method is called if the current run ends.
int m_interval
The name of the memory file (HLT or ExpressReco).
void beginRun() override final
Called when entering a new run.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
The metadata for each event.
TCanvas * m_c_info
The canvas hold the basic DQM info.
int m_nevent
DAQ number of processed events.
time_t m_last_beginrun
last time begin run entered
void write_state(void)
Write stats of analysis.
The base class for the histogram analysis module.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.