Belle II Software  release-06-00-14
DQMHistDeltaHisto.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 : DQMHistDeltaHisto.h
10 // Description :
11 //-
12 
13 #pragma once
14 
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <framework/dataobjects/EventMetaData.h>
17 #include <dqm/analysis/modules/DQMHistAnalysis.h>
18 #include <TH1.h>
19 #include <TCanvas.h>
20 #include <time.h>
21 #include <map>
22 #include <queue>
23 #include <vector>
24 
25 namespace Belle2 {
33 
37  typedef struct {
39  TH1* histo;
41  TH1* diff_histo;
43  time_t time_modified;
44  } SSNODE;
45 
46  // Public functions
47  public:
48 
51  virtual ~DQMHistDeltaHistoModule();
52 
54  virtual void initialize() override;
55 
57  virtual void beginRun() override;
58  virtual void event() override;
59  virtual void endRun() override;
60  virtual void terminate() override;
65  void clear_node(SSNODE* n);
66 
67  // Data members
68  private:
70  std::vector<std::string> m_monitored_histos;
72  std::map<std::string, std::queue<SSNODE*> > m_histos_queues;
77 
78  };
80 } // end namespace Belle2
81 
The base class for the histogram analysis module.
Class for generating snapshots for histograms.
virtual void initialize() override
Module functions to be called from main process.
std::map< std::string, std::queue< SSNODE * > > m_histos_queues
Map of histogram names to queues of monitoring objects.
virtual void event() override
This method is the core of the module.
StoreObjPtr< EventMetaData > m_evtMetaDataPtr
The metadata for each event.
virtual void endRun() override
This method is called if the current run ends.
virtual void terminate() override
This method is called at the end of the event processing.
std::vector< std::string > m_monitored_histos
Names of the histograms that should be monitored.
virtual void beginRun() override
Module functions to be called from event process.
void clear_node(SSNODE *n)
Clear content of SSNODE.
int m_interval
Interval between checks in second.
DQMHistDeltaHistoModule()
Constructor / Destructor.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:95
Abstract base class for different kinds of events.
The struct for the snapshots.
TH1 * diff_histo
The histogram for snapshot.
TH1 * histo
The histogram for snapshot.
time_t time_modified
Whether the histogram is not updated for a long time.