GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LoupeOnPad Class Reference

LoupOnPad, a class to Loupe on a Pad in a Canvas with many pads in it. More...

#include <LoupeOnPad.h>

Inherits TObject.

Public Member Functions

void ChangeCurrentPad (Int_t padnumber=1)
 Change current pad number under loupe. More...
 
TCanvas * CheckLoupeIsThere ()
 To be sure the Canvas to display loupe is there. More...
 
void Clear (Option_t *="")
 Remove any sign of Loupe on the pad. More...
 
void HandleMovement (Int_t, Int_t, Int_t, TObject *select)
 Handle mouse/keyboad catchings. More...
 
 LoupeOnPad (TCanvas *c=0x0)
 
void SetLoupeActive (Bool_t b=true)
 Enable/Disable the Loupe on the pad. More...
 
virtual ~LoupeOnPad ()
 

Protected Member Functions

Int_t GetPadNumber (Int_t add_x, Int_t add_y)
 return pad number depending of increntation on x,y from the current position i.e the current pad More...
 

Detailed Description

LoupOnPad, a class to Loupe on a Pad in a Canvas with many pads in it.

It uses keyboard keys to play play with the Loupe. To activate a Loupe on the current Canvas:

or alternatively, if the pointer on the canvas is known

{
//create a canvas and divide it in 20 x 20 pads
Int_t nb_x = 20, nb_y = 20;
TCanvas *c1 = new TCanvas("c1","c1",10,10,800,800);
c1->Divide(nb_x,nb_y,0,0);
Int_t ipad = 0;
for (Int_t i=0;i<nb_x;i++) {
for (Int_t j=0;j<nb_y;j++) {
ipad++;
c1->cd(ipad);
TH1F *h = new TH1F(Form("h%d_%d",i,j),"test",100,-3,3);
h->FillRandom("gaus",(ipad+1)*3);
h->Draw();
TH1F *h2 = new TH1F(Form("hh%d_%d",i,j),"test",100,-3,3);
h2->SetFillColor(kRed);
h2->FillRandom("gaus",(ipad+1)*3);
h2->Draw("same");
}
}
loupe = new LoupeOnPad(c1);
}

Definition at line 76 of file LoupeOnPad.h.


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