Belle II Software development
EclDisplayModule.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#pragma once
10
11/* ECL headers. */
12#include <ecl/mapper/ECLChannelMapper.h>
13
14/* Basf2 headers. */
15#include <framework/core/Module.h>
16#include <framework/datastore/StoreArray.h>
17
18/* C++ headers. */
19#include <string>
20
21class TApplication;
22class TFile;
23
24namespace Belle2 {
30 class ECLCalDigit;
31 class EclFrame;
32 class EclData;
33
41 class EclDisplayModule : public Module {
42
43 public:
44
47
52 virtual ~EclDisplayModule();
53
57 virtual void initialize() override;
58
62 virtual void beginRun() override;
63
68 virtual void event() override;
69
73 virtual void endRun() override;
74
78 virtual void terminate() override;
79
80 private:
84 void initFrame();
85
92 // TODO: List possible display mode IDs from EclPainterFactory.
96 bool m_autoDisplay{true};
99
101 bool m_frame_closed{false};
103 int m_evtNum{ -1};
105 EclFrame* m_frame{nullptr};
107 TApplication* m_app{nullptr};
110 EclData* m_data{nullptr};
116 TFile* m_tempfile{nullptr};
118 TString m_tempname;
119
120 public:
121 /* SLOTS */
125 void handleClosedFrame();
126 };
128}
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
This class contains data for ECLSimHit's and provides several relevant conversion functions for bette...
Definition: EclData.h:31
Displays energy distribution in ECL.
bool m_frame_closed
Flag to check if EclFrame is closed;.
int m_evtNum
Counter of added events.
bool m_autoDisplay
If true, events are displayed as soon as they are loaded.
ECL::ECLChannelMapper m_mapper
Channel mapper to show channel <-> (crate, shaper) distributions.
bool m_keepOpen
Keep window open after all events have been processed.
virtual void initialize() override
Initialize EclChannelMapper.
TFile * m_tempfile
Temporary file to store TTree.
virtual void event() override
Handle event.
void initFrame()
Initialize EclFrame.
virtual void endRun() override
Empty method.
virtual void terminate() override
Wait till EclFrame is closed then free allocated resources.
std::string m_eclMapperInitFileName
filename to initialize ECLChannelMapper.
EclFrame * m_frame
Root GUI to display ECL data.
virtual void beginRun() override
Empty method.
bool m_displayEnergy
If true, energy distribution in ECL is displayed.
int m_displayMode
Default display mode.
TApplication * m_app
Application to contain EclFrame.
StoreArray< ECLCalDigit > m_eclarray
Displayed ECL events.
TString m_tempname
Name of temporary file.
virtual ~EclDisplayModule()
Module destructor.
void handleClosedFrame()
This method is called when EclFrame is closed.
EclData * m_data
Class that provides interface for quick and comprehensive analysis of large number of events.
Root TGMainFrame that contains multiple widgets that display the ECLSimHit's w.r.t.
Definition: EclFrame.h:41
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.