GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
|
Reimplementation of TCanvas. Adds different actions for mouse clicks:
For TLevelSchemes we also have:
Also adds keyboard controls for 1D histograms:
And for 2D histograms these keyboard controls are added:
Public Member Functions | |
GCanvas (Bool_t build=kTRUE) | |
GCanvas (const char *name, const char *title, Int_t winw, Int_t winh) | |
GCanvas (const char *name, const char *title, Int_t wtopx, Int_t wtopy, Int_t winw, Int_t winh, bool gui=false) | |
GCanvas (const char *name, const char *title="", Int_t form=1) | |
GCanvas (const char *name, Int_t winw, Int_t winh, Int_t winid) | |
GCanvas (const GCanvas &)=delete | |
GCanvas (GCanvas &&) noexcept=delete | |
~GCanvas () | |
void | Draw (Option_t *opt="") override |
Int_t | GetNMarkers () |
bool | HandleArrowKeyPress (Event_t *event, const UInt_t *keysym) |
void | HandleInput (int event, Int_t x, Int_t y) |
bool | HandleKeyboardPress (Event_t *event, const 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) |
bool | HandleWheel (Int_t event, Int_t x, Int_t y) |
GCanvas & | operator= (const GCanvas &)=delete |
GCanvas & | operator= (GCanvas &&) noexcept=delete |
void | SetMarkerMode (bool flag=true) |
bool | StorePosition (Int_t event, Int_t x, Int_t y) |
bool | Zoom (Int_t event, Int_t x, Int_t y) |
Static Public Member Functions | |
static TF1 * | GetLastFit () |
static GCanvas * | MakeDefCanvas () |
Private Member Functions | |
void | AddMarker (int, int, TH1 *hist) |
bool | CycleBackgroundSubtraction () |
void | GCanvasInit () |
void | OrderMarkers () |
bool | Process1DArrowKeyPress (Event_t *event, const UInt_t *keysym) |
bool | Process1DKeyboardPress (Event_t *event, const UInt_t *keysym) |
bool | Process1DMousePress (Int_t event, Int_t x, Int_t y) |
bool | Process2DArrowKeyPress (Event_t *event, const UInt_t *keysym) |
bool | Process2DKeyboardPress (Event_t *event, const UInt_t *keysym) |
bool | Process2DMousePress (Int_t event, Int_t x, Int_t y) |
bool | ProcessNonHistKeyboardPress (Event_t *event, const UInt_t *keysym) |
void | RedrawMarkers () |
void | RemoveMarker (Option_t *opt="") |
bool | SetBackgroundMarkers () |
void | UpdateStatsInfo (int, int) |
Static Private Member Functions | |
static std::vector< TH1 * > | FindAllHists () |
static std::vector< TH1 * > | FindHists (int dim=1) |
Private Attributes | |
std::vector< GMarker * > | fBackgroundMarkers |
EBackgroundSubtraction | fBackgroundMode = EBackgroundSubtraction::kNoBackground |
char * | fCutName {nullptr} |
std::vector< TCutG * > | fCuts |
bool | fGuiEnabled {false} |
bool | fMarkerMode {false} |
std::vector< GMarker * > | fMarkers |
TRootCanvas * | fRootCanvas {nullptr} |
Static Private Attributes | |
static double | fLastX = 0 |
static double | fLastY = 0 |
|
explicit |
Definition at line 86 of file GCanvas.cxx.
References GCanvasInit().
Referenced by HandleMouseShiftPress(), MakeDefCanvas(), and Process2DKeyboardPress().
|
explicit |
Definition at line 91 of file GCanvas.cxx.
References GCanvasInit().
GCanvas::GCanvas | ( | const char * | name, |
const char * | title, | ||
Int_t | winw, | ||
Int_t | winh ) |
Definition at line 96 of file GCanvas.cxx.
References GCanvasInit().
GCanvas::GCanvas | ( | const char * | name, |
Int_t | winw, | ||
Int_t | winh, | ||
Int_t | winid ) |
Definition at line 101 of file GCanvas.cxx.
References fGuiEnabled, and GCanvasInit().
GCanvas::GCanvas | ( | const char * | name, |
const char * | title, | ||
Int_t | wtopx, | ||
Int_t | wtopy, | ||
Int_t | winw, | ||
Int_t | winh, | ||
bool | gui = false ) |
Definition at line 109 of file GCanvas.cxx.
References fGuiEnabled, and GCanvasInit().
|
delete |
|
deletenoexcept |
GCanvas::~GCanvas | ( | ) |
Definition at line 116 of file GCanvas.cxx.
References fCutName.
|
private |
Definition at line 137 of file GCanvas.cxx.
References fMarkers, and hist.
Referenced by HandleMousePress().
|
private |
Definition at line 219 of file GCanvas.cxx.
References fBackgroundMarkers, fBackgroundMode, kMatchedLowerMarker, kNoBackground, kRegionBackground, kSplitTwoMarker, kTotalFraction, and Prompt().
Referenced by Process1DKeyboardPress().
|
override |
Definition at line 312 of file GCanvas.cxx.
Referenced by Process1DKeyboardPress().
|
staticprivate |
Definition at line 336 of file GCanvas.cxx.
Referenced by HandleMousePress().
|
staticprivate |
Definition at line 321 of file GCanvas.cxx.
References hist.
Referenced by HandleMouseShiftPress(), Process1DKeyboardPress(), and Process2DKeyboardPress().
|
private |
Definition at line 122 of file GCanvas.cxx.
References fBackgroundMode, fCutName, fGuiEnabled, fMarkerMode, and kNoBackground.
Referenced by GCanvas(), GCanvas(), GCanvas(), GCanvas(), and GCanvas().
|
static |
Definition at line 549 of file GCanvas.cxx.
References hist.
|
inline |
Definition at line 259 of file GCanvas.h.
References fMarkers.
Referenced by Process1DKeyboardPress(), Process2DKeyboardPress(), and SetBackgroundMarkers().
bool GCanvas::HandleArrowKeyPress | ( | Event_t * | event, |
const UInt_t * | keysym ) |
Definition at line 348 of file GCanvas.cxx.
References Process1DArrowKeyPress(), and Process2DArrowKeyPress().
Referenced by GRootCanvas::HandleContainerKey().
void GCanvas::HandleInput | ( | int | event, |
Int_t | x, | ||
Int_t | y ) |
Definition at line 279 of file GCanvas.cxx.
References HandleMouseControlPress(), HandleMousePress(), HandleMouseShiftPress(), HandleWheel(), StorePosition(), and Zoom().
bool GCanvas::HandleKeyboardPress | ( | Event_t * | event, |
const UInt_t * | keysym ) |
Definition at line 362 of file GCanvas.cxx.
References Process1DKeyboardPress(), Process2DKeyboardPress(), and ProcessNonHistKeyboardPress().
Referenced by GRootCanvas::HandleContainerKey().
bool GCanvas::HandleMouseControlPress | ( | Int_t | event, |
Int_t | x, | ||
Int_t | y ) |
Definition at line 462 of file GCanvas.cxx.
Referenced by HandleInput().
bool GCanvas::HandleMousePress | ( | Int_t | event, |
Int_t | x, | ||
Int_t | y ) |
Definition at line 382 of file GCanvas.cxx.
References AddMarker(), FindAllHists(), fMarkerMode, and hist.
Referenced by HandleInput().
bool GCanvas::HandleMouseShiftPress | ( | Int_t | event, |
Int_t | x, | ||
Int_t | y ) |
Definition at line 422 of file GCanvas.cxx.
References GCanvas(), FindHists(), and hist.
Referenced by HandleInput().
bool GCanvas::HandleWheel | ( | Int_t | event, |
Int_t | x, | ||
Int_t | y ) |
Zoom in (wheel up) and out (wheel down) of level scheme, focused around x, y. Does nothing if the canvas doesn't have the name "LevelScheme".
Definition at line 504 of file GCanvas.cxx.
Referenced by HandleInput().
|
static |
Definition at line 258 of file GCanvas.cxx.
References GCanvas().
|
private |
Definition at line 172 of file GCanvas.cxx.
References fMarkers.
|
private |
Moves displayed 1D histograms by 50% of the visible range left, right, or selects the next (up) or previous (down) GH1D histogram.
Definition at line 568 of file GCanvas.cxx.
References Move1DHistogram(), and RedrawMarkers().
Referenced by HandleArrowKeyPress().
|
private |
Definition at line 602 of file GCanvas.cxx.
References AltPhotoPeakFit(), BLUE, CycleBackgroundSubtraction(), Draw(), GH1D::Draw(), fBackgroundMarkers, fBackgroundMode, FindHists(), fMarkers, GausFit(), GetNMarkers(), GH1D::GetParent(), hist, kNoBackground, PhotoPeakFit(), GH1D::Project(), GH1D::Project_Background(), RemoveMarker(), RemovePeaks(), RESET_COLOR, SetBackgroundMarkers(), SetMarkerMode(), and ShowPeaks().
Referenced by HandleKeyboardPress().
|
private |
Definition at line 992 of file GCanvas.cxx.
|
private |
Moves displayed 2D histograms by 50% of the visible range left, right, up, or down
Definition at line 998 of file GCanvas.cxx.
References Move2DHistogram().
Referenced by HandleArrowKeyPress().
|
private |
Definition at line 1004 of file GCanvas.cxx.
References GCanvas(), fCutName, fCuts, FindHists(), fMarkers, GH2Base::GetNextSummary(), GetNMarkers(), GH2Base::GetProjections(), hist, kXDirection, kYDirection, GH2D::ProjectionX(), GH2D::ProjectionY(), RemoveMarker(), RemovePeaks(), RESET_COLOR, GH2Base::SetSummary(), and GH2Base::SetSummaryDirection().
Referenced by HandleKeyboardPress().
|
private |
Definition at line 1356 of file GCanvas.cxx.
|
private |
Definition at line 576 of file GCanvas.cxx.
Referenced by HandleKeyboardPress().
|
private |
Definition at line 177 of file GCanvas.cxx.
References fBackgroundMarkers, and fMarkers.
Referenced by Process1DArrowKeyPress().
|
private |
Definition at line 150 of file GCanvas.cxx.
References fBackgroundMarkers, and fMarkers.
Referenced by Process1DKeyboardPress(), and Process2DKeyboardPress().
|
private |
Definition at line 191 of file GCanvas.cxx.
References fBackgroundMarkers, fBackgroundMode, fMarkers, GetNMarkers(), and kRegionBackground.
Referenced by Process1DKeyboardPress().
|
inline |
Definition at line 260 of file GCanvas.h.
References fMarkerMode.
Referenced by Process1DKeyboardPress().
bool GCanvas::StorePosition | ( | Int_t | event, |
Int_t | x, | ||
Int_t | y ) |
Store the position the mouse button was pressed at.
Definition at line 475 of file GCanvas.cxx.
References fLastX, and fLastY.
Referenced by HandleInput().
|
private |
bool GCanvas::Zoom | ( | Int_t | event, |
Int_t | x, | ||
Int_t | y ) |
Mouse button was released at this point, set the new range.
Definition at line 486 of file GCanvas.cxx.
References fLastX, and fLastY.
Referenced by HandleInput().
|
private |
Definition at line 276 of file GCanvas.h.
Referenced by CycleBackgroundSubtraction(), Process1DKeyboardPress(), RedrawMarkers(), RemoveMarker(), and SetBackgroundMarkers().
|
private |
Definition at line 277 of file GCanvas.h.
Referenced by CycleBackgroundSubtraction(), GCanvasInit(), Process1DKeyboardPress(), and SetBackgroundMarkers().
|
private |
Definition at line 279 of file GCanvas.h.
Referenced by ~GCanvas(), GCanvasInit(), and Process2DKeyboardPress().
|
private |
Definition at line 278 of file GCanvas.h.
Referenced by Process2DKeyboardPress().
|
private |
Definition at line 272 of file GCanvas.h.
Referenced by GCanvas(), GCanvas(), and GCanvasInit().
|
staticprivate |
Definition at line 269 of file GCanvas.h.
Referenced by StorePosition(), and Zoom().
|
staticprivate |
Definition at line 270 of file GCanvas.h.
Referenced by StorePosition(), and Zoom().
|
private |
Definition at line 274 of file GCanvas.h.
Referenced by GCanvasInit(), HandleMousePress(), and SetMarkerMode().
|
private |
Definition at line 275 of file GCanvas.h.
Referenced by AddMarker(), GetNMarkers(), OrderMarkers(), Process1DKeyboardPress(), Process2DKeyboardPress(), RedrawMarkers(), RemoveMarker(), and SetBackgroundMarkers().