GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
GCanvas Class Reference

Definition at line 120 of file GCanvas.h.

Public Member Functions

 GCanvas (Bool_t build=kTRUE)
 
 GCanvas (const char *name, const char *title="", Int_t form=1)
 
 GCanvas (const char *name, const char *title, Int_t ww, Int_t wh)
 
 GCanvas (const char *name, Int_t ww, Int_t wh, Int_t winid)
 
 GCanvas (const char *name, const char *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh, bool gui=false)
 
 ~GCanvas () override
 
void Draw (Option_t *opt="") override
 
TF1 * GetLastFit ()
 
Int_t GetNMarkers ()
 
bool HandleArrowKeyPress (Event_t *event, UInt_t *keysym)
 
void HandleInput (int event, Int_t x, Int_t y)
 
bool HandleKeyboardPress (Event_t *event, UInt_t *keysym)
 
bool HandleMouseControlPress (Int_t event, Int_t x, Int_t y)
 
bool HandleMousePress (Int_t event, Int_t x, Int_t y)
 
bool HandleMouseShiftPress (Int_t event, Int_t x, Int_t y)
 
void SetMarkerMode (bool flag=true)
 

Static Public Member Functions

static GCanvasMakeDefCanvas ()
 

Private Member Functions

void AddMarker (int, int, TH1 *hist)
 
 ClassDefOverride (GCanvas, 2)
 
bool CycleBackgroundSubtraction ()
 
std::vector< TH1 * > FindAllHists ()
 
std::vector< TH1 * > FindHists (int dim=1)
 
void GCanvasInit ()
 
void OrderMarkers ()
 
bool Process1DArrowKeyPress (Event_t *event, UInt_t *keysym)
 
bool Process1DKeyboardPress (Event_t *event, UInt_t *keysym)
 
bool Process1DMousePress (Int_t event, Int_t x, Int_t y)
 
bool Process2DArrowKeyPress (Event_t *event, UInt_t *keysym)
 
bool Process2DKeyboardPress (Event_t *event, UInt_t *keysym)
 
bool Process2DMousePress (Int_t event, Int_t x, Int_t y)
 
bool ProcessNonHistKeyboardPress (Event_t *event, UInt_t *keysym)
 
void RedrawMarkers ()
 
void RemoveMarker (Option_t *opt="")
 
bool SetBackgroundMarkers ()
 
void UpdateStatsInfo (int, int)
 

Private Attributes

std::vector< GMarker * > fBackgroundMarkers
 
EBackgroundSubtraction fBackgroundMode
 
char * fCutName
 
std::vector< TCutG * > fCuts
 
bool fGuiEnabled {false}
 
bool fMarkerMode {false}
 
std::vector< GMarker * > fMarkers
 
TRootCanvas * fRootCanvas {nullptr}
 

Static Private Attributes

static int lastx = 0
 
static int lasty = 0
 

#include <GCanvas.h>

+ Inheritance diagram for GCanvas:
+ Collaboration diagram for GCanvas:

Constructor & Destructor Documentation

◆ GCanvas() [1/5]

GCanvas::GCanvas ( Bool_t  build = kTRUE)

Definition at line 88 of file GCanvas.cxx.

References GCanvasInit().

Referenced by HandleMouseShiftPress(), MakeDefCanvas(), and Process2DKeyboardPress().

◆ GCanvas() [2/5]

GCanvas::GCanvas ( const char *  name,
const char *  title = "",
Int_t  form = 1 
)

Definition at line 93 of file GCanvas.cxx.

References GCanvasInit().

◆ GCanvas() [3/5]

GCanvas::GCanvas ( const char *  name,
const char *  title,
Int_t  ww,
Int_t  wh 
)

Definition at line 98 of file GCanvas.cxx.

References GCanvasInit().

◆ GCanvas() [4/5]

GCanvas::GCanvas ( const char *  name,
Int_t  ww,
Int_t  wh,
Int_t  winid 
)

Definition at line 103 of file GCanvas.cxx.

References fGuiEnabled, and GCanvasInit().

◆ GCanvas() [5/5]

GCanvas::GCanvas ( const char *  name,
const char *  title,
Int_t  wtopx,
Int_t  wtopy,
Int_t  ww,
Int_t  wh,
bool  gui = false 
)

Definition at line 111 of file GCanvas.cxx.

References fGuiEnabled, and GCanvasInit().

◆ ~GCanvas()

GCanvas::~GCanvas ( )
override

Definition at line 118 of file GCanvas.cxx.

References fCutName.

Member Function Documentation

◆ AddMarker()

void GCanvas::AddMarker ( int  x,
int  y,
TH1 *  hist 
)
private

Definition at line 139 of file GCanvas.cxx.

References fMarkers, and hist.

Referenced by HandleMousePress().

◆ ClassDefOverride()

GCanvas::ClassDefOverride ( GCanvas  ,
 
)
private

◆ CycleBackgroundSubtraction()

bool GCanvas::CycleBackgroundSubtraction ( )
private

◆ Draw()

void GCanvas::Draw ( Option_t *  opt = "")
override

Definition at line 305 of file GCanvas.cxx.

◆ FindAllHists()

std::vector< TH1 * > GCanvas::FindAllHists ( )
private

Definition at line 329 of file GCanvas.cxx.

Referenced by HandleMousePress().

◆ FindHists()

std::vector< TH1 * > GCanvas::FindHists ( int  dim = 1)
private

◆ GCanvasInit()

void GCanvas::GCanvasInit ( )
private

Definition at line 124 of file GCanvas.cxx.

References fBackgroundMode, fCutName, fGuiEnabled, fMarkerMode, and kNoBackground.

Referenced by GCanvas().

◆ GetLastFit()

TF1 * GCanvas::GetLastFit ( )

Definition at line 469 of file GCanvas.cxx.

References hist.

◆ GetNMarkers()

Int_t GCanvas::GetNMarkers ( )
inline

Definition at line 137 of file GCanvas.h.

References fMarkers.

Referenced by Process1DKeyboardPress(), Process2DKeyboardPress(), and SetBackgroundMarkers().

◆ HandleArrowKeyPress()

bool GCanvas::HandleArrowKeyPress ( Event_t *  event,
UInt_t *  keysym 
)

Definition at line 341 of file GCanvas.cxx.

References Process1DArrowKeyPress(), and Process2DArrowKeyPress().

Referenced by GRootCanvas::HandleContainerKey().

◆ HandleInput()

void GCanvas::HandleInput ( int  event,
Int_t  x,
Int_t  y 
)

◆ HandleKeyboardPress()

bool GCanvas::HandleKeyboardPress ( Event_t *  event,
UInt_t *  keysym 
)

◆ HandleMouseControlPress()

bool GCanvas::HandleMouseControlPress ( Int_t  event,
Int_t  x,
Int_t  y 
)

Definition at line 456 of file GCanvas.cxx.

Referenced by HandleInput().

◆ HandleMousePress()

bool GCanvas::HandleMousePress ( Int_t  event,
Int_t  x,
Int_t  y 
)

Definition at line 376 of file GCanvas.cxx.

References AddMarker(), FindAllHists(), fMarkerMode, and hist.

Referenced by HandleInput().

◆ HandleMouseShiftPress()

bool GCanvas::HandleMouseShiftPress ( Int_t  event,
Int_t  x,
Int_t  y 
)

Definition at line 416 of file GCanvas.cxx.

References FindHists(), GCanvas(), and hist.

Referenced by HandleInput().

◆ MakeDefCanvas()

GCanvas * GCanvas::MakeDefCanvas ( )
static

Definition at line 261 of file GCanvas.cxx.

References GCanvas().

◆ OrderMarkers()

void GCanvas::OrderMarkers ( )
private

Definition at line 175 of file GCanvas.cxx.

References fMarkers.

◆ Process1DArrowKeyPress()

bool GCanvas::Process1DArrowKeyPress ( Event_t *  event,
UInt_t *  keysym 
)
private

◆ Process1DKeyboardPress()

◆ Process1DMousePress()

bool GCanvas::Process1DMousePress ( Int_t  event,
Int_t  x,
Int_t  y 
)
private

Definition at line 994 of file GCanvas.cxx.

◆ Process2DArrowKeyPress()

bool GCanvas::Process2DArrowKeyPress ( Event_t *  event,
UInt_t *  keysym 
)
private

Moves displayed 2D histograms by 50% of the visible range left, right, up, or down

Definition at line 1000 of file GCanvas.cxx.

References FindHists(), hist, kMyArrowDown, kMyArrowLeft, kMyArrowRight, and kMyArrowUp.

Referenced by HandleArrowKeyPress().

◆ Process2DKeyboardPress()

◆ Process2DMousePress()

bool GCanvas::Process2DMousePress ( Int_t  event,
Int_t  x,
Int_t  y 
)
private

Definition at line 1457 of file GCanvas.cxx.

◆ ProcessNonHistKeyboardPress()

bool GCanvas::ProcessNonHistKeyboardPress ( Event_t *  event,
UInt_t *  keysym 
)
private

Definition at line 588 of file GCanvas.cxx.

Referenced by HandleKeyboardPress().

◆ RedrawMarkers()

void GCanvas::RedrawMarkers ( )
private

Definition at line 180 of file GCanvas.cxx.

References fBackgroundMarkers, and fMarkers.

Referenced by Process1DArrowKeyPress().

◆ RemoveMarker()

void GCanvas::RemoveMarker ( Option_t *  opt = "")
private

Definition at line 153 of file GCanvas.cxx.

References fBackgroundMarkers, and fMarkers.

Referenced by Process1DKeyboardPress(), and Process2DKeyboardPress().

◆ SetBackgroundMarkers()

bool GCanvas::SetBackgroundMarkers ( )
private

◆ SetMarkerMode()

void GCanvas::SetMarkerMode ( bool  flag = true)
inline

Definition at line 138 of file GCanvas.h.

References fMarkerMode.

Referenced by Process1DKeyboardPress().

◆ UpdateStatsInfo()

void GCanvas::UpdateStatsInfo ( int  ,
int   
)
private

Member Data Documentation

◆ fBackgroundMarkers

std::vector<GMarker*> GCanvas::fBackgroundMarkers
private

◆ fBackgroundMode

EBackgroundSubtraction GCanvas::fBackgroundMode
private

◆ fCutName

char* GCanvas::fCutName
private

Definition at line 157 of file GCanvas.h.

Referenced by GCanvasInit(), Process2DKeyboardPress(), and ~GCanvas().

◆ fCuts

std::vector<TCutG*> GCanvas::fCuts
private

Definition at line 156 of file GCanvas.h.

Referenced by Process2DKeyboardPress().

◆ fGuiEnabled

bool GCanvas::fGuiEnabled {false}
private

Definition at line 150 of file GCanvas.h.

Referenced by GCanvas(), and GCanvasInit().

◆ fMarkerMode

bool GCanvas::fMarkerMode {false}
private

Definition at line 152 of file GCanvas.h.

Referenced by GCanvasInit(), HandleMousePress(), and SetMarkerMode().

◆ fMarkers

std::vector<GMarker*> GCanvas::fMarkers
private

◆ fRootCanvas

TRootCanvas* GCanvas::fRootCanvas {nullptr}
private

Definition at line 186 of file GCanvas.h.

◆ lastx

int GCanvas::lastx = 0
staticprivate

Definition at line 147 of file GCanvas.h.

◆ lasty

int GCanvas::lasty = 0
staticprivate

Definition at line 148 of file GCanvas.h.