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 {
29
30 class ECLCalDigit;
31 class EclFrame;
32 class EclData;
33
41 class EclDisplayModule : public Module {
42
43 public:
44
46 EclDisplayModule();
47
52 virtual ~EclDisplayModule() override;
53
57 virtual void initialize() override;
58
62 virtual void beginRun() override;
63
68 virtual void event() override;
69
73 virtual void terminate() override;
74
75 private:
79 void initFrame();
80
87 // TODO: List possible display mode IDs from EclPainterFactory.
91 bool m_autoDisplay{true};
94
96 bool m_frame_closed{false};
98 int m_evtNum{ -1};
100 EclFrame* m_frame{nullptr};
102 TApplication* m_app{nullptr};
105 EclData* m_data{nullptr};
111 TFile* m_tempfile{nullptr};
113 TString m_tempname;
114
115 public:
116 /* SLOTS */
120 void handleClosedFrame();
121 };
122
123}
Class to store calibrated ECLDigits: ECLCalDigits.
Definition ECLCalDigit.h:23
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
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.
virtual ~EclDisplayModule() override
Module destructor.
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 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.
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
Module()
Constructor.
Definition Module.cc:30
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Abstract base class for different kinds of events.