37 fHasDisabledClasses =
false;
38 fDisabledClasses =
"";
193 const Int_t kTMAX = 256;
194 static char atext[kTMAX];
207 snprintf(atext, kTMAX,
"%c", (
char) px);
209 snprintf(atext, kTMAX,
"%d,%d", px, py);
256 pad =
Pick(px, py, prevSelObj);
288 if (distX >= 0.5)
return;
298 if (distY >= 0.5)
return;
300 if ((distX <=
size) && (distY <=
size))
return;
309 if ((
X0 - dX > 0) && (X1 - dX < NbinsX)) {
313 if ((
Y0 - dY > 0) && (Y1 - dY < NbinsY)) {
351 pad =
Pick(px, py, prevSelObj);
452 pad =
Pick(px, py, prevSelObj);
495 while ((tc = (
TCanvas*)next()))
520 newXlast =
Xlast0 - dXbins;
526 if (newXfirst !=
Xf1) {
539 newYlast =
Ylast0 - dYbins;
545 if (newYfirst !=
Yf1) {
574 pad =
Pick(px, py, prevSelObj);
616 pad =
Pick(px, py, prevSelObj);
631 pad =
Pick(px, py, prevSelObj);
634 sign = (
event ==
kWheelUp ? 1 : -1);
662 if (!TheHisto)
return;
705 if (X0tmp >= X1tmp) X0tmp = X1tmp - 1;
706 if (
Sign > 0) dX = (
Int_t)(X0tmp + (X1tmp - X0tmp) * 0.5 - ax->
FindBin(px));
707 if ((X0tmp - dX) < 0) ax->
SetRange(0, X1tmp - X0tmp);
709 else ax->
SetRange(X0tmp - dX, X1tmp - dX);
748 if (X0tmp >= X1tmp) X0tmp = X1tmp - 1;
749 if (
Sign > 0) dX = (
Int_t)(X0tmp + (X1tmp - X0tmp) * 0.5 - ax->
FindBin(ppx));
750 if ((X0tmp - dX) < 0) ax->
SetRange(0, X1tmp - X0tmp);
752 else ax->
SetRange(X0tmp - dX, X1tmp - dX);
762 if (Y0tmp >= Y1tmp) Y0tmp = Y1tmp - 1;
763 if (
Sign > 0) dY = (
Int_t)(Y0tmp + (Y1tmp - Y0tmp) * 0.5 - ax->
FindBin(ppy));
764 if ((Y0tmp - dY) < 0) ax->
SetRange(0, Y1tmp - Y0tmp);
766 else ax->
SetRange(Y0tmp - dY, Y1tmp - dY);
888 while ((obj = next())) {
890 ((
TPad*)obj)->SetGrid(0, 0);
896 while ((obj = next())) {
898 ((
TPad*)obj)->SetGrid();
1028 while ((obj = it())) {
1029 ((
TF1*)obj)->SetNpx(((
TF1*)obj)->GetNpx() + 50);
1050 while ((obj = it()))((
TF1*)obj)->SetNpx(((
TF1*)obj)->GetNpx() - 50);
1082 if ((last + 2 < nBins) && (sign > 0)) {
1087 if ((
first - 2 >= 0) && (sign < 0)) {
1109 std::cout << std::endl << std::endl;
1112 while ((info = (
TNamed*)it())) {
1115 std::cout << std::endl;
1137 AddShortcutsInfo(
"<ctrl> d",
"undraw the object under cursor (object not deleted)");
1144 AddShortcutsInfo(
"<ctrl> l",
"set/unset log scale on Y axis (TH1) or Z axis (TH2)");
1170 hh->
ProfileX(
"_pfx", 1, -1,
"i,d,same");
1207 file.ReplaceAll(
"/",
"");
1209 Form(
"File name '%s' already exists, OK to owerwrite it?",
file.Data()),
1212 if (ret_val &
kMBOk) {
1218 const char* SaveAsTypes[] = {
1220 "PostScript",
"*.ps",
1221 "Encapsulated PostScript",
"*.eps",
1225 "ROOT macros",
"*.C",
1226 "ROOT files",
"*.root",
1239 static Int_t typeidx = 0;
1265 while ((hh = (
TObject*)it())) {
1282 while ((obj = it())) {
1306 while (
gROOT->FindObject(pname.
Data())) {
1323 for (
int i = 0; i < px->
GetNbinsX(); i++) {
1347 while (
gROOT->FindObject(pname.
Data())) {
1364 for (
int i = 0; i < py->
GetNbinsX(); i++) {
KVHistoManipulator * gHistoManipulator
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
size_t size(const MatrixT &matrix)
char * Form(const char *fmt,...)
char * StrDup(const char *str)
R__EXTERN TSystem * gSystem
TCanvas with mouse-controlled dynamic zoom and pan & scan.
void ShowShortcutsInfos()
void ProjectionY(TH2 *hh)
Int_t Xlast0
number of bins on x-axis, initial displayed bins
void AddShortcutsInfo(const char *cut, const char *desc)
void MoveAxis(TAxis *ax, Int_t sign)
Bool_t ExpandFunctionRange()
void DisableObject(TObject *obj)
void HandleInput(EEventType event, Int_t px, Int_t py)
Int_t X0
! variables for pan & scan
void DisableClass(const char *className)
Int_t NdisYbins
number of displayed bins on X & Y
Bool_t fHasDisabledClasses
void ResetDisabledObject()
TAxis * theYaxis
the axes of the histogram
void RunAutoExec()
Execute the list of TExecs in the current pad.
Int_t Ylast0
number of bins on y-axis, initial displayed bins
void SetEnabledShortcuts(Int_t value=1)
void DrawEventStatus(Int_t event, Int_t px, Int_t py, TObject *selected)
void ZoomSelected(TH2 *TheHisto)
void DynamicZoomTH1(Int_t Sign, Int_t px, Int_t py)
Zoom in or out of histogram with mouse wheel.
void SetVenerMode(Int_t value=1)
Double_t YbinPixel
size of bins in pixels
virtual Bool_t HandleKey(Int_t, Int_t py)
virtual Bool_t HandleKey(Event_t* /*event*/){return kTRUE;}
void DynamicZoom(Int_t Sign, Int_t px, Int_t py)
void ResetDisabledClass()
Int_t Y0
coordinates of initial click in pad pixels
Int_t Yl1
last modification to axis limits
Bool_t fHasDisabledObject
void ProjectionX(TH2 *hh)
TH2 * PermuteAxis(TH2 *hh)
TGraphErrors * MakeGraphFrom(TProfile *pf, Bool_t Error=kTRUE)
Utility class to redirect keyboard events to KVCanvas.
virtual void SetLineColor(Color_t lcolor)
virtual void SetMarkerColor(Color_t mcolor=1)
virtual void SetMarkerStyle(Style_t mstyle=1)
virtual Int_t FindBin(const char *label)
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
virtual void SetRange(Int_t first=0, Int_t last=0)
virtual void ShowEditor(Bool_t show=kTRUE)
virtual void SetStatusText(const char *text=0, Int_t partidx=0)
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Int_t GetEventY() const override
TCanvasImp * GetCanvasImp() const override
virtual TPad * Pick(Int_t px, Int_t py, TObject *prevSelObj)
virtual void ProcessedEvent(Int_t event, Int_t x, Int_t y, TObject *selected)
Int_t GetEventX() const override
TVirtualPad * cd(Int_t subpadnumber=0) override
TContextMenu * fContextMenu
void FeedbackMode(Bool_t set)
TVirtualPad * GetSelectedPad() const override
Bool_t Contains(const char *name) const
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
virtual void SetName(const char *name="")
virtual void SetTitle(const char *title="")
virtual void Draw(Option_t *chopt="")
virtual Double_t GetBinCenter(Int_t bin) const
TList * GetListOfFunctions() const
virtual Int_t GetNbinsX() const
virtual Int_t GetMaximumBin() const
virtual Double_t GetBinContent(Int_t bin) const
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
TProfile * ProfileX(const char *name="_pfx", Int_t firstybin=1, Int_t lastybin=-1, Option_t *option="") const
TProfile * ProfileY(const char *name="_pfy", Int_t firstxbin=1, Int_t lastxbin=-1, Option_t *option="") const
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
TObject * Remove(const TObjLinkPtr_t &lnk)
virtual void AddLast(TObject *obj)
virtual void Clear(Option_t *option="")
virtual const char * GetName() const
virtual const char * GetTitle() const
virtual const char * GetName() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual TObject * Clone(const char *newname="") const
virtual const char * ClassName() const
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
virtual void Delete(Option_t *option="")
virtual Bool_t InheritsFrom(const char *classname) const
virtual const char * GetTitle() const
virtual void Draw(Option_t *option="")
const char * GetTitle() const override
Double_t AbsPixeltoY(Int_t py) override
Double_t GetUymax() const override
void SetGrid(Int_t valuex=1, Int_t valuey=1) override
Double_t GetUxmax() const override
Bool_t GetGridx() const override
void SetLogz(Int_t value=1) override
Double_t GetUymin() const override
Double_t AbsPixeltoX(Int_t px) override
void Modified(Bool_t flag=1) override
void SetLogy(Int_t value=1) override
Double_t GetUxmin() const override
Bool_t GetGridy() const override
Int_t YtoAbsPixel(Double_t y) const override
const char * GetName() const override
void SaveAs(const char *filename="", Option_t *option="") const override
TObject * FindObject(const char *name) const override
TVirtualPad * cd(Int_t subpadnumber=0) override
void SetLogx(Int_t value=1) override
Int_t XtoAbsPixel(Double_t x) const override
TList * GetListOfPrimitives() const override
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual const char * DirName(const char *pathname)
virtual Bool_t ChangeDirectory(const char *path)
virtual const char * WorkingDirectory()
Double_t Min(Double_t a, Double_t b)
Double_t Sign(Double_t a, Double_t b)
Double_t Max(Double_t a, Double_t b)