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
46 private:
50 void initialize() override final;
51
55 void beginRun() override final;
56
60 void event() override final;
61
65 void endRun() override final;
66
70 void terminate() override final;
71
75 void addToHistList(std::vector<TH1*>& inputHistList, std::string dirname, TKey* key);
76
77 // Data members
79 std::string m_mempath;
86 TCanvas* m_c_info{nullptr};
87
89 int m_nevent = 0;
90
92 std::string m_lastChange;
93
96
98 int m_expno = 0;
100 int m_runno = 0;
102 unsigned int m_count = 0;
103
105 std::string m_statname;
107 void write_state(void);
109 time_t m_last_event{};
117 std::filesystem::file_time_type m_lasttime;
118
120 int m_lastRun{-1};
122 int m_lastExp{-1};
123 };
125} // end namespace Belle2
126
Class to read histograms from a root file for online analysis modules.
std::string m_lastChange
last change date/time of shm input file
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.
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.
void addToHistList(std::vector< TH1 * > &inputHistList, std::string dirname, TKey *key)
Read histogram from key and add to list vector.
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:95
Abstract base class for different kinds of events.