Changeset 11086 for trunk/FACT++
- Timestamp:
- 06/21/11 10:17:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11085 r11086 187 187 gStyle->SetPalette(fPalette.size(), fPalette.data()); 188 188 189 190 189 const double r = double(gPad->GetWw())/gPad->GetWh(); 191 190 const double max = 20.5; // 20.5 rings in x and y … … 196 195 gPad->Range(-max, -max/r, max, max/r); 197 196 197 Double_t x1, x2, y1, y2; 198 gPad->GetRange(x1, x2, y1, y2); 199 198 200 double dmin = fData[0]; 199 201 double dmax = fData[0]; … … 212 214 const double min = dmin; 213 215 const double scale = dmax==dmin ? 1 : dmax-dmin; 214 215 // const double min = fData.min();216 // const double scale = fData.max()==fData.min() ? 1 : fData.max()-fData.min();217 216 218 217 TAttFill fill(0, 1001); … … 314 313 static string str; 315 314 316 const float x = gPad-> PadtoX(gPad->AbsPixeltoX(px));317 const float y = gPad-> PadtoY(gPad->AbsPixeltoY(py));315 const float x = gPad->AbsPixeltoX(px); 316 const float y = gPad->AbsPixeltoY(py); 318 317 319 318 const int idx = GetIdx(x, y); … … 331 330 Int_t DistancetoPrimitive(Int_t px, Int_t py) 332 331 { 333 const float x = gPad-> PadtoX(gPad->AbsPixeltoX(px));334 const float y = gPad-> PadtoY(gPad->AbsPixeltoY(py));332 const float x = gPad->AbsPixeltoX(px); 333 const float y = gPad->AbsPixeltoY(py); 335 334 336 335 return GetIdx(x, y)>=0 ? 0 : 99999; … … 1860 1859 1861 1860 #ifdef HAVE_ROOT 1862 void slot_RootEventProcessed(TObject *obj, unsigned int evt, TCanvas * )1861 void slot_RootEventProcessed(TObject *obj, unsigned int evt, TCanvas *canv) 1863 1862 { 1864 1863 // kMousePressEvent // TCanvas processed QEvent mousePressEvent … … 1878 1877 if (dynamic_cast<Camera*>(obj)) 1879 1878 { 1880 const float xx = gPad->PadtoX(gPad->AbsPixeltoX(tipped->GetEventX()));1881 const float yy = gPad->PadtoY(gPad->AbsPixeltoY(tipped->GetEventY()));1879 const float xx = canv->AbsPixeltoX(tipped->GetEventX()); 1880 const float yy = canv->AbsPixeltoY(tipped->GetEventY()); 1882 1881 1883 1882 Camera *cam = static_cast<Camera*>(obj); … … 1894 1893 if (dynamic_cast<Camera*>(obj)) 1895 1894 { 1896 const float xx = gPad->PadtoX(gPad->AbsPixeltoX(tipped->GetEventX()));1897 const float yy = gPad->PadtoY(gPad->AbsPixeltoY(tipped->GetEventY()));1895 const float xx = canv->AbsPixeltoX(tipped->GetEventX()); 1896 const float yy = canv->AbsPixeltoY(tipped->GetEventY()); 1898 1897 1899 1898 Camera *cam = static_cast<Camera*>(obj); … … 1920 1919 // our own GetObjectInfo which make everything a bit more 1921 1920 // complicated. 1921 canv->cd(); 1922 1922 #if ROOT_VERSION_CODE > ROOT_VERSION(5,22,00) 1923 1923 const char *objectInfo = … … 1937 1937 if (dynamic_cast<Camera*>(obj)) 1938 1938 { 1939 const float xx = gPad->PadtoX(gPad->AbsPixeltoX(tipped->GetEventX()));1940 const float yy = gPad->PadtoY(gPad->AbsPixeltoY(tipped->GetEventY()));1939 const float xx = canv->AbsPixeltoX(tipped->GetEventX()); 1940 const float yy = canv->AbsPixeltoY(tipped->GetEventY()); 1941 1941 1942 1942 Camera *cam = static_cast<Camera*>(obj); … … 2221 2221 } 2222 2222 2223 if (l!=160) 2224 cerr << "WARNING - Problems reading Trigger-Patches.txt" << endl; 2225 2223 2226 // -------------------------------------------------------------------------- 2224 2227 … … 2249 2252 } 2250 2253 2254 if (l!=1440) 2255 cerr << "WARNING - Problems reading MasterList-v3.txt" << endl; 2256 2251 2257 // -------------------------------------------------------------------------- 2252 2258 … … 2275 2281 l++; 2276 2282 } 2283 2284 if (l!=160) 2285 cerr << "WARNING - Problems reading PatchList.txt" << endl; 2277 2286 2278 2287 // --------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.