Belle II Software  release-05-02-19
EclDisplayModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Milkail Remnev, Dmitry Matvienko *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 //STL
14 #include <string>
15 
16 //Framework
17 #include <framework/core/Module.h>
18 #include <framework/datastore/StoreArray.h>
19 
20 //ECL
21 #include <ecl/utility/ECLChannelMapper.h>
22 
23 class TApplication;
24 class TFile;
25 
26 namespace Belle2 {
32  class ECLCalDigit;
33  class EclFrame;
34  class EclData;
35 
43  class EclDisplayModule : public Module {
44 
45  public:
46 
49 
54  virtual ~EclDisplayModule();
55 
59  virtual void initialize() override;
60 
64  virtual void beginRun() override;
65 
70  virtual void event() override;
71 
75  virtual void endRun() override;
76 
80  virtual void terminate() override;
81 
82  private:
86  void initFrame();
87 
91  bool m_keepOpen;
94  // TODO: List possible display mode IDs from EclPainterFactory.
98  bool m_autoDisplay{true};
101 
103  bool m_frame_closed{false};
105  int m_evtNum{ -1};
107  EclFrame* m_frame{nullptr};
109  TApplication* m_app{nullptr};
112  EclData* m_data{nullptr};
118  TFile* m_tempfile{nullptr};
120  TString m_tempname;
121 
122  public:
123  /* SLOTS */
127  void handleClosedFrame();
128 
129  ClassDefNV(EclDisplayModule, 0)
130  };
132 }
Belle2::EclDisplayModule::m_tempfile
TFile * m_tempfile
Temporary file to store TTree.
Definition: EclDisplayModule.h:118
Belle2::EclDisplayModule::m_eclMapperInitFileName
std::string m_eclMapperInitFileName
filename to initialize ECLChannelMapper.
Definition: EclDisplayModule.h:100
Belle2::EclDisplayModule::m_eclarray
StoreArray< ECLCalDigit > m_eclarray
Displayed ECL events.
Definition: EclDisplayModule.h:114
Belle2::EclDisplayModule::m_showDisplay
bool m_showDisplay
Show GUI.
Definition: EclDisplayModule.h:89
Belle2::EclDisplayModule::m_displayMode
int m_displayMode
Default display mode.
Definition: EclDisplayModule.h:96
Belle2::EclDisplayModule::m_frame_closed
bool m_frame_closed
Flag to check if EclFrame is closed;.
Definition: EclDisplayModule.h:103
Belle2::EclDisplayModule::m_keepOpen
bool m_keepOpen
Keep window open after all events have been processed.
Definition: EclDisplayModule.h:91
Belle2::EclDisplayModule::m_tempname
TString m_tempname
Name of temporary file.
Definition: EclDisplayModule.h:120
Belle2::EclDisplayModule::m_displayEnergy
bool m_displayEnergy
If true, energy distribution in ECL is displayed.
Definition: EclDisplayModule.h:93
Belle2::EclDisplayModule
Displays energy distribution in ECL.
Definition: EclDisplayModule.h:43
Belle2::EclDisplayModule::handleClosedFrame
void handleClosedFrame()
This method is called when EclFrame is closed.
Definition: EclDisplayModule.cc:107
Belle2::EclDisplayModule::initialize
virtual void initialize() override
Initialize EclChannelMapper.
Definition: EclDisplayModule.cc:66
Belle2::EclDisplayModule::terminate
virtual void terminate() override
Wait till EclFrame is closed then free allocated resources.
Definition: EclDisplayModule.cc:151
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::EclDisplayModule::initFrame
void initFrame()
Initialize EclFrame.
Definition: EclDisplayModule.cc:85
Belle2::ECL::ECLChannelMapper
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
Definition: ECLChannelMapper.h:36
Belle2::EclFrame
Root TGMainFrame that contains multiple widgets that display the ECLSimHit's w.r.t.
Definition: EclFrame.h:43
Belle2::EclDisplayModule::m_app
TApplication * m_app
Application to contain EclFrame.
Definition: EclDisplayModule.h:109
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::EclDisplayModule::m_frame
EclFrame * m_frame
Root GUI to display ECL data.
Definition: EclDisplayModule.h:107
Belle2::EclDisplayModule::m_data
EclData * m_data
Class that provides interface for quick and comprehensive analysis of large number of events.
Definition: EclDisplayModule.h:112
Belle2::EclDisplayModule::~EclDisplayModule
virtual ~EclDisplayModule()
Module destructor.
Definition: EclDisplayModule.cc:62
Belle2::EclData
This class contains data for ECLSimHit's and provides several relevant conversion functions for bette...
Definition: EclData.h:41
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::EclDisplayModule::m_mapper
ECL::ECLChannelMapper m_mapper
Channel mapper to show channel <-> (crate, shaper) distributions.
Definition: EclDisplayModule.h:116
Belle2::EclDisplayModule::beginRun
virtual void beginRun() override
Empty method.
Definition: EclDisplayModule.cc:112
Belle2::EclDisplayModule::m_evtNum
int m_evtNum
Counter of added events.
Definition: EclDisplayModule.h:105
Belle2::EclDisplayModule::m_autoDisplay
bool m_autoDisplay
If true, events are displayed as soon as they are loaded.
Definition: EclDisplayModule.h:98
Belle2::EclDisplayModule::endRun
virtual void endRun() override
Empty method.
Definition: EclDisplayModule.cc:147
Belle2::EclDisplayModule::event
virtual void event() override
Handle event.
Definition: EclDisplayModule.cc:121