Belle II Software  release-08-01-10
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/core/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;
55  std::map<std::string, TCanvas*> m_cs;
56 
60  virtual void beginRun() override;
61 
65  virtual void event() override;
66 
70  virtual void endRun() override;
71 
75  virtual void terminate() override;
76 
77  // Data members
78  private:
80  DqmMemFile* m_memory = nullptr;
82  std::string m_mempath;
84  std::string m_memname;
86  std::string m_username;
88  int m_shm_id{-1};
90  int m_sem_id{-1};
92 // int m_memsize; // this is not used in code!!! it is hard coded in DqmMemFile to 4*128MB
100  TCanvas* m_c_info = nullptr;
101 
104 
106  unsigned int m_expno = 0;
108  unsigned int m_runno = 0;
110  unsigned int m_count = 0;
111  };
113 } // end namespace Belle2
114 
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.
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_interval
The size of the shared memory.
std::string m_username
The owner of the memory file (HLT or ExpressReco).
DqmMemFile * m_memory
Memory file to hold histograms.
std::map< std::string, TCanvas * > m_cs
The map of histogram names to canvas pointers for output.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
The metadata for each event.
TCanvas * m_c_info
The canvas hold the basic DQM info.
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:96
Abstract base class for different kinds of events.