Belle II Software  release-08-01-10
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_ev_slider
 Slider to set the time range. More...
 
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 41 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 111 of file EclFrame.h.

111  {
112  M_FILE_OPEN,
113  M_FILE_SAVE,
115  M_FILE_EXIT,
116 
117  M_VIEW_EVENTS,
118  M_VIEW_ENERGY,
123  };
@ M_VIEW_DET_BACK
Use data from backward endcap only.
Definition: EclFrame.h:121
@ M_VIEW_ENERGY
Display histograms for energy.
Definition: EclFrame.h:118
@ M_VIEW_DET_BARR
Use data from barrel only.
Definition: EclFrame.h:122
@ M_VIEW_DET_FULL
Use data from all ECL subsystems.
Definition: EclFrame.h:119
@ M_VIEW_DET_FORW
Use data from forward endcap only.
Definition: EclFrame.h:120
@ M_FILE_EXPORT_TREE
Export EclDisplay data into simple TTree.
Definition: EclFrame.h:114
@ M_VIEW_EVENTS
Display histograms for events.
Definition: EclFrame.h:117

Constructor & Destructor Documentation

◆ EclFrame()

EclFrame ( int  painter_type,
EclData data,
bool  auto_display,
ECL::ECLChannelMapper mapper 
)
Parameters
painter_typepainter type
dataECL data
auto_displayDisplay new events as soon as they are loaded.
mapperECL channel mapper

Definition at line 55 of file EclFrame.cc.

56 {
57  m_open = true;
58  m_subsys = EclData::ALL;
59  m_ecl_data = data;
60  m_mapper = mapper;
61  m_painter_type = (EclPainterType)painter_type;
64  m_last_event = -1;
65 
66  for (int i = 1; i <= data->getCrystalCount(); i++) {
67  int phi_id = data->getPhiId(i);//GetPhiId(i);
68  int theta_id = data->getThetaId(i);//GetThetaId(i);
69 
70  if (phi_id == -1 || theta_id == -1)
71  data->excludeChannel(i);
72  }
73 
74  initGUI(1000, 700);
75 
76  m_auto_display = auto_display;
77 
78  gStyle->SetOptStat(0);
79 
80  doDraw();
81 }
ECL::ECLChannelMapper * m_mapper
ECLChannelMapper, class for conversion from CellID to (crate, shaper, chn_id).
Definition: EclFrame.h:101
bool m_open
Default is true, m_open is set to false when EclFrame closes.
Definition: EclFrame.h:108
int m_last_event
If m_auto_display is set, this is the evtn of last displayed event.
Definition: EclFrame.h:106
EclPainterType m_painter_type
Current painter type.
Definition: EclFrame.h:70
EclData::EclSubsystem m_subsys
Current subsystem displayed.
Definition: EclFrame.h:88
bool m_auto_display
This flag controls whether to display newly loaded events automatically.
Definition: EclFrame.h:104
void initGUI(int w, int h)
Initialize GUI.
Definition: EclFrame.cc:89
void doDraw()
Get view parameters from GUI and call updateCanvas().
Definition: EclFrame.cc:472
EclData * m_ecl_data
EclData, class containing data to display.
Definition: EclFrame.h:73
EclPainter * m_ecl_painter
Current EclPainter.
Definition: EclFrame.h:99
static EclPainter * createPainter(EclPainterType type, EclData *data, ECL::ECLChannelMapper *mapper, EclData::EclSubsystem subsys=EclData::ALL)
Creates EclPainter of the specified type.
EclPainterType
Enum for type of EclPainter to create.

◆ ~EclFrame()

~EclFrame ( )
virtual

ECLFrame destructor.

Calls parent class Cleanup() method.

Definition at line 83 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 546 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 125 of file EclFrame.h.

◆ m_ev_slider

TGDoubleHSlider* m_ev_slider
private

Slider to set the time range.

Slider for choosing events range.

Definition at line 78 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 70 of file EclFrame.h.


The documentation for this class was generated from the following files: