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 {
40
42
43 public:
44
49
50 private:
54 void initialize() override final;
55
59 void beginRun() override final;
60
64 void event() override final;
65
69 void endRun() override final;
70
74 void terminate() override final;
75
79 static void addToHistList(std::vector<TH1*>& inputHistList, const std::string& dirname, TKey* key);
80
84 void write_state(void);
85
86 // Data members
88 std::string m_inputFileName;
94 TCanvas* m_c_info{nullptr};
95
97 int m_nevent = 0;
98
100 std::string m_lastChange;
101
104
106 int m_expno = 0;
108 int m_runno = 0;
110 unsigned int m_count = 0;
111
113 std::string m_statname;
115 time_t m_last_event{};
123 std::filesystem::file_time_type m_lasttime;
124
126 int m_lastRun{-1};
128 int m_lastExp{-1};
129 };
130
131} // end namespace Belle2
132
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 the run info canvas should be created.
std::string m_inputFileName
The input root-file name for the histograms.
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.
static void addToHistList(std::vector< TH1 * > &inputHistList, const std::string &dirname, TKey *key)
Read histogram from key and add to list vector.
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.
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 state of analysis to a file.
DQMHistAnalysisModule()
Constructor / Destructor.
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Abstract base class for different kinds of events.