Belle II Software  release-06-01-15
DQMHistAnalysisInput.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 <daq/dqm/DqmMemFile.h>
19 #include <dqm/analysis/modules/DQMHistAnalysis.h>
20 
21 #include <TCanvas.h>
22 #include <TKey.h>
23 
24 #include <string>
25 #include <map>
26 #include <vector>
27 
28 namespace Belle2 {
36 
37  // Public functions
38  public:
39 
44 
49 
53  virtual void initialize() override;
54 
58  virtual void beginRun() override;
59 
63  virtual void event() override;
64 
68  virtual void endRun() override;
69 
73  virtual void terminate() override;
74 
75  // Data members
76  private:
78  DqmMemFile* m_memory = nullptr;
80  std::string m_mempath;
82  std::string m_memname;
84  int m_shm_id;
86  int m_sem_id;
88  int m_memsize;
98  std::vector<std::string> m_acfolders;
100  std::vector<std::string> m_exclfolders;
102  TCanvas* m_c_info = nullptr;
103 
107  std::map<std::string, TCanvas*> m_cs;
108 
110  unsigned int m_expno = 0;
112  unsigned int m_runno = 0;
114  unsigned int m_count = 0;
115  };
117 } // end namespace Belle2
118 
Class definition for the output module of Sequential ROOT I/O.
std::string m_memname
The name of the memory file (HLT or ExpressReco).
bool m_remove_empty
Whether to remove empty histograms.
virtual void initialize() override
Initializer.
bool m_autocanvas
Whether automatically generate canvases for histograms.
virtual void event() override
This method is called for each event.
virtual ~DQMHistAnalysisInputModule()
Destructor.
bool m_enable_run_info
Whether to enable the run info to be displayed.
int m_shm_id
The shmid for the shared memory.
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::string m_mempath
The name of the shared memory for the histograms.
virtual void beginRun() override
Called when entering a new run.
int m_memsize
The size of the shared memory.
DqmMemFile * m_memory
Memory file to hold histograms.
std::map< std::string, TCanvas * > m_cs
The list of canvases for output.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
The metadata for each event.
TCanvas * m_c_info
The canvas hold the basic DQM info.
std::vector< std::string > m_acfolders
The list of folders for which automatically generate canvases.
std::vector< std::string > m_exclfolders
The list of folders which are excluded from automatically generate canvases.
int m_sem_id
The semid for the shared memory.
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.