Belle II Software  release-05-02-19
EclFrame Class Reference

Root TGMainFrame that contains multiple widgets that display the ECLSimHit's w.r.t. More...

#include <EclFrame.h>

Inheritance diagram for EclFrame:
Collaboration diagram for EclFrame:

Public Member Functions

 EclFrame (int painter_type, EclData *data, bool auto_display, ECL::ECLChannelMapper *mapper)
 
virtual ~EclFrame ()
 ECLFrame destructor. More...
 
void loadNewData ()
 Update view of the data.
 
void updateCanvas ()
 Redraw m_ecanvas.
 
void handleMenu (int id)
 Apply action from menu.
 
void updateEventRange ()
 Change event range and pass information to m_ecl_data.
 
void showPrevEvents ()
 Show previous range of events.
 
void showNextEvents ()
 Show next range of events.
 
void excludeChannel ()
 Exclude channel specified in the GUI.
 
void doDraw ()
 Get view parameters from GUI and call updateCanvas().
 
void doDrawAll ()
 Draw all events on m_ecanvas.
 
void updateInfo (int event, int px, int py, TObject *)
 Update information on the cursor position in the histogram.
 
void changeRange (TGListTreeItem *entry, int btn)
 Opens shapers of specific crate/channels of specific shaper.
 
void changeType (int type, bool redraw=true)
 Change EclPainter type when selected in drop-down menu. More...
 

Private Types

enum  EclFrameCommandIdentifiers {
  M_FILE_OPEN,
  M_FILE_SAVE,
  M_FILE_EXPORT_TREE,
  M_FILE_EXIT,
  M_VIEW_EVENTS,
  M_VIEW_ENERGY,
  M_VIEW_DET_FULL,
  M_VIEW_DET_FORW,
  M_VIEW_DET_BACK,
  M_VIEW_DET_BARR
}
 Enum for menu commands. More...
 

Private Member Functions

void initGUI (int w, int h)
 Initialize GUI.
 
void initData ()
 Initialize data.
 

Private Attributes

TGVerticalFrame * m_settings
 Main frame for settings; its subframes contain settings for different categories.
 
MultilineWidgetm_frame1
 Information subframe.
 
TGGroupFrame * m_frame2
 Event range subframe.
 
TGGroupFrame * m_frame3
 Optional subframe, crate/shaper select.
 
TGListTree * m_list_tree
 Tree GUI of crates/shapers.
 
TGGroupFrame * m_frame4
 Channel exclusion subframe.
 
TGGroupFrame * m_frame5
 Energy threshold subframe.
 
TGTextButton * m_draw
 Button that initiates drawing of the data for selected events.
 
TGTextButton * m_draw_all
 Button that initiates drawing of the data for all events.
 
TRootEmbeddedCanvas * m_ecanvas
 Embedded canvas.
 
EclPainterType m_painter_type
 Current painter type. More...
 
EclDatam_ecl_data
 EclData, class containing data to display.
 
TGDoubleHSlider * m_time_slider
 Slider to set the time range.
 
TGDoubleHSlider * m_ev_slider
 Slider for choosing events range.
 
TGNumberEntry * m_events_min
 Min value for range of displayed events.
 
TGNumberEntry * m_events_max
 Max value for range of displayed events.
 
TGNumberEntry * m_channel_id
 Number field for channel exclusion.
 
EclData::EclSubsystem m_subsys
 Current subsystem displayed.
 
TGNumberEntry * m_min_en_threshold
 Min value for energy threshold.
 
TGNumberEntry * m_max_en_threshold
 Max value for energy threshold.
 
TGCheckButton * m_threshold_switch
 Check button to turn energy threshold on/off.
 
EclPainterm_ecl_painter
 Current EclPainter.
 
ECL::ECLChannelMapperm_mapper
 ECLChannelMapper, class for conversion from CellID to (crate, shaper, chn_id).
 
bool m_auto_display
 This flag controls whether to display newly loaded events automatically.
 
int m_last_event
 If m_auto_display is set, this is the evtn of last displayed event.
 
bool m_open
 Default is true, m_open is set to false when EclFrame closes.
 

Static Private Attributes

static const char * filetypes []
 Possible export filetypes for histograms. More...
 

Detailed Description

Root TGMainFrame that contains multiple widgets that display the ECLSimHit's w.r.t.

structure of ECL geometry and its data acquisition subsystem.

Definition at line 43 of file EclFrame.h.

Member Enumeration Documentation

◆ EclFrameCommandIdentifiers

Enum for menu commands.

Enumerator
M_FILE_EXPORT_TREE 

Export EclDisplay data into simple TTree.

M_VIEW_EVENTS 

Display histograms for events.

M_VIEW_ENERGY 

Display histograms for energy.

M_VIEW_DET_FULL 

Use data from all ECL subsystems.

M_VIEW_DET_FORW 

Use data from forward endcap only.

M_VIEW_DET_BACK 

Use data from backward endcap only.

M_VIEW_DET_BARR 

Use data from barrel only.

Definition at line 113 of file EclFrame.h.

113  {
114  M_FILE_OPEN,
115  M_FILE_SAVE,
117  M_FILE_EXIT,
118 
119  M_VIEW_EVENTS,
120  M_VIEW_ENERGY,
125  };

Constructor & Destructor Documentation

◆ EclFrame()

EclFrame ( int  painter_type,
EclData data,
bool  auto_display,
ECL::ECLChannelMapper mapper 
)
Parameters
auto_loadDisplay new events as soon as they are loaded.

Definition at line 56 of file EclFrame.cc.

57 {
58  m_open = true;
59  m_subsys = EclData::ALL;
60  m_ecl_data = data;
61  m_mapper = mapper;
62  m_painter_type = (EclPainterType)painter_type;
65  m_last_event = -1;
66 
67  for (int i = 1; i <= data->getCrystalCount(); i++) {
68  int phi_id = data->getPhiId(i);//GetPhiId(i);
69  int theta_id = data->getThetaId(i);//GetThetaId(i);
70 
71  if (phi_id == -1 || theta_id == -1)
72  data->excludeChannel(i);
73  }
74 
75  initGUI(1000, 700);
76 
77  m_auto_display = auto_display;
78 
79  gStyle->SetOptStat(0);
80 
81  doDraw();
82 }

◆ ~EclFrame()

~EclFrame ( )
virtual

ECLFrame destructor.

Calls parent class Cleanup() method.

Definition at line 84 of file EclFrame.cc.

Member Function Documentation

◆ changeType()

void changeType ( int  type,
bool  redraw = true 
)

Change EclPainter type when selected in drop-down menu.

See EclPainterFactory.h, EclPainterType.

Definition at line 547 of file EclFrame.cc.

Member Data Documentation

◆ filetypes

const char * filetypes
staticprivate
Initial value:
= {
"PDF", "*.pdf",
"PostScript", "*.ps",
"Encapsulated PostScript", "*.eps",
"SVG", "*.svg",
"TeX", "*.tex",
"GIF", "*.gif",
"ROOT macros", "*.C",
"ROOT files", "*.root",
"XML", "*.xml",
"PNG", "*.png",
"XPM", "*.xpm",
"JPEG", "*.jpg",
"TIFF", "*.tiff",
"XCF", "*.xcf",
0, 0
}

Possible export filetypes for histograms.

Definition at line 127 of file EclFrame.h.

◆ m_painter_type

EclPainterType m_painter_type
private

Current painter type.

See EclPainterFactory for the list of all types.

Definition at line 72 of file EclFrame.h.


The documentation for this class was generated from the following files:
Belle2::EclFrame::M_VIEW_DET_BACK
@ M_VIEW_DET_BACK
Use data from backward endcap only.
Definition: EclFrame.h:123
Belle2::EclPainterType
EclPainterType
Enum for type of EclPainter to create.
Definition: EclPainterFactory.h:39
Belle2::EclFrame::M_FILE_EXPORT_TREE
@ M_FILE_EXPORT_TREE
Export EclDisplay data into simple TTree.
Definition: EclFrame.h:116
Belle2::EclFrame::m_ecl_painter
EclPainter * m_ecl_painter
Current EclPainter.
Definition: EclFrame.h:101
Belle2::EclFrame::M_VIEW_DET_BARR
@ M_VIEW_DET_BARR
Use data from barrel only.
Definition: EclFrame.h:124
Belle2::EclFrame::M_VIEW_EVENTS
@ M_VIEW_EVENTS
Display histograms for events.
Definition: EclFrame.h:119
Belle2::EclFrame::m_last_event
int m_last_event
If m_auto_display is set, this is the evtn of last displayed event.
Definition: EclFrame.h:108
Belle2::EclPainterFactory::createPainter
static EclPainter * createPainter(EclPainterType type, EclData *data, ECL::ECLChannelMapper *mapper, EclData::EclSubsystem subsys=EclData::ALL)
Creates EclPainter of the specified type.
Definition: EclPainterFactory.cc:39
Belle2::EclFrame::M_VIEW_DET_FORW
@ M_VIEW_DET_FORW
Use data from forward endcap only.
Definition: EclFrame.h:122
Belle2::EclFrame::m_painter_type
EclPainterType m_painter_type
Current painter type.
Definition: EclFrame.h:72
Belle2::EclFrame::m_subsys
EclData::EclSubsystem m_subsys
Current subsystem displayed.
Definition: EclFrame.h:90
Belle2::EclFrame::M_VIEW_ENERGY
@ M_VIEW_ENERGY
Display histograms for energy.
Definition: EclFrame.h:120
Belle2::EclFrame::m_auto_display
bool m_auto_display
This flag controls whether to display newly loaded events automatically.
Definition: EclFrame.h:106
Belle2::EclFrame::m_open
bool m_open
Default is true, m_open is set to false when EclFrame closes.
Definition: EclFrame.h:110
Belle2::EclFrame::m_mapper
ECL::ECLChannelMapper * m_mapper
ECLChannelMapper, class for conversion from CellID to (crate, shaper, chn_id).
Definition: EclFrame.h:103
Belle2::EclFrame::doDraw
void doDraw()
Get view parameters from GUI and call updateCanvas().
Definition: EclFrame.cc:473
Belle2::EclFrame::initGUI
void initGUI(int w, int h)
Initialize GUI.
Definition: EclFrame.cc:90
Belle2::EclFrame::m_ecl_data
EclData * m_ecl_data
EclData, class containing data to display.
Definition: EclFrame.h:75
Belle2::EclFrame::M_VIEW_DET_FULL
@ M_VIEW_DET_FULL
Use data from all ECL subsystems.
Definition: EclFrame.h:121