6#include "TRootCanvas.h"
37 void Draw(Option_t* opt =
"")
override
46 void Print(Option_t* option =
"")
const override
48 TObject::Print(option);
49 std::cout <<
"fLineX = " <<
fLineX <<
", fLineY = " <<
fLineY << std::endl;
52 if(opt.Contains(
"a")) {
61 fLineX->SetLineColor(color);
64 fLineY->SetLineColor(color);
71 fLineX->SetLineStyle(style);
74 fLineY->SetLineStyle(style);
77 void Update(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax)
89 void SetLineX(
double x1,
double x2,
double y1,
double y2)
92 fLineX =
new TLine(x1, y1, x2, y2);
101 void SetLineY(
double x1,
double x2,
double y1,
double y2)
104 fLineY =
new TLine(x1, y1, x2, y2);
127 void SetBinX(
const int& val) {
SetLineX(
fHist->GetXaxis()->GetBinLowEdge(val), gPad->GetUymin(),
fHist->GetXaxis()->GetBinLowEdge(val), gPad->GetUymax()); }
128 void SetBinY(
const int& val) {
SetLineX(gPad->GetUxmin(),
fHist->GetYaxis()->GetBinLowEdge(val), gPad->GetUxmax(),
fHist->GetYaxis()->GetBinLowEdge(val)); }
132 if(
fLineX ==
nullptr) {
return 0.; }
137 if(
fLineY ==
nullptr) {
return 0.; }
142 if(
fLineX ==
nullptr) {
return -1; }
143 return fHist->GetXaxis()->FindBin(
fLineX->GetX1());
147 if(
fLineY ==
nullptr) {
return -1; }
148 return fHist->GetYaxis()->FindBin(
fLineY->GetY1());
159 void Copy(TObject&
object)
const override;
240 explicit GCanvas(Bool_t build = kTRUE);
241 explicit GCanvas(
const char* name,
const char* title =
"", Int_t form = 1);
242 GCanvas(
const char* name,
const char* title, Int_t winw, Int_t winh);
243 GCanvas(
const char* name, Int_t winw, Int_t winh, Int_t winid);
244 GCanvas(
const char* name,
const char* title, Int_t wtopx, Int_t wtopy, Int_t winw, Int_t winh,
bool gui =
false);
251#pragma GCC diagnostic push
252#pragma GCC diagnostic ignored "-Woverloaded-virtual"
254#pragma GCC diagnostic pop
255 void Draw(Option_t* opt =
"")
override;
287 static std::vector<TH1*>
FindHists(
int dim = 1);
298 bool Zoom(Int_t event, Int_t x, Int_t y);
static GCanvas * MakeDefCanvas()
GCanvas(Bool_t build=kTRUE)
EBackgroundSubtraction fBackgroundMode
bool Process2DMousePress(Int_t event, Int_t x, Int_t y)
bool HandleMouseControlPress(Int_t event, Int_t x, Int_t y)
bool HandleArrowKeyPress(Event_t *event, const UInt_t *keysym)
GCanvas(const GCanvas &)=delete
bool HandleMousePress(Int_t event, Int_t x, Int_t y)
std::vector< TCutG * > fCuts
bool StorePosition(Int_t event, Int_t x, Int_t y)
void SetMarkerMode(bool flag=true)
bool SetBackgroundMarkers()
static TF1 * GetLastFit()
bool Process1DKeyboardPress(Event_t *event, const UInt_t *keysym)
bool CycleBackgroundSubtraction()
bool Process1DArrowKeyPress(Event_t *event, const UInt_t *keysym)
bool Process2DKeyboardPress(Event_t *event, const UInt_t *keysym)
GCanvas(GCanvas &&) noexcept=delete
bool Process2DArrowKeyPress(Event_t *event, const UInt_t *keysym)
bool Zoom(Int_t event, Int_t x, Int_t y)
void UpdateStatsInfo(int, int)
static std::vector< TH1 * > FindAllHists()
void HandleInput(int event, Int_t x, Int_t y)
std::vector< GMarker * > fBackgroundMarkers
void Draw(Option_t *opt="") override
bool HandleKeyboardPress(Event_t *event, const UInt_t *keysym)
bool HandleWheel(Int_t event, Int_t x, Int_t y)
void AddMarker(int, int, TH1 *hist)
TRootCanvas * fRootCanvas
bool HandleMouseShiftPress(Int_t event, Int_t x, Int_t y)
std::vector< GMarker * > fMarkers
void RemoveMarker(Option_t *opt="")
bool ProcessNonHistKeyboardPress(Event_t *event, const UInt_t *keysym)
bool Process1DMousePress(Int_t event, Int_t x, Int_t y)
static std::vector< TH1 * > FindHists(int dim=1)
GMarker(GMarker &&) noexcept=default
void SetLocalX(const double &val)
void Draw(Option_t *opt="") override
void SetLocalY(const double &val)
void SetStyle(Style_t style)
void Update(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax)
void SetLineY(double x1, double x2, double y1, double y2)
void SetBinY(const int &val)
void Copy(TObject &object) const override
GMarker(const GMarker &marker)
void SetBinX(const int &val)
void SetHist(const TH1 *val)
bool operator<(const GMarker &rhs) const
void Print(Option_t *option="") const override
void SetLineX(double x1, double x2, double y1, double y2)
void SetColor(Color_t color)