Changeset 1916
- Timestamp:
- 04/07/03 18:30:43 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1915 r1916 42 42 - changed naming style of variables 43 43 - changes array access 44 45 * mhist/MHFadcCam.[h,cc]: 46 - added HasHi 47 - added Exists 48 49 * mmain/MDataCheck.cc: 50 - removed unimplemented buttons 51 52 * mdatacheck/MGDisplayAdc.[h,cc]: 53 - tried to implement some unimplemented buttons 54 - don't display non existing (empty) histograms in list 44 55 45 56 -
trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc
r1654 r1916 26 26 #include "MGDisplayAdc.h" 27 27 28 #include <stdlib.h> // mkstemp 28 29 #include <iostream.h> // cout for debugging 29 30 31 #include <TSystem.h> // gSystem 32 #include <TCanvas.h> // TCanvas.h 33 #include <TGSlider.h> // TGVSlider 30 34 #include <TGButton.h> // TGTextButton 31 #include <TCanvas.h> // TCanvas.h32 35 #include <TGMsgBox.h> // TGMsgBox 33 36 #include <TGListBox.h> // TGListBox 34 #include <TGSlider.h> // TGVSlider35 37 #include <TGButtonGroup.h> // TGVButtonGroup 36 38 #include <TRootEmbeddedCanvas.h> // TRootEmbeddedCanvas … … 302 304 303 305 for (Int_t i=0; i<nhi; i++) 304 fHistoList->AddEntry(fHists->GetHistHi(i)->GetName(), i+1); 306 if (fHists->Exists(i)) 307 fHistoList->AddEntry(fHists->GetHistHi(i)->GetName(), i+1); 305 308 306 309 fHistoList->MapSubwindows(); … … 323 326 324 327 fCanvas->Clear(); 328 329 if (!fHists->Exists(selected-1)) 330 return; 325 331 326 332 const Int_t type = fHists->HasLo(selected-1) ? fHistoType : M_RADIO_HI; … … 372 378 { 373 379 case M_BUTTON_SAVE: 374 cout << "Sorry, not yet implemented!" << endl; 380 fCanvas->SaveAs(); 381 cout << "Sorry, no well implemented!" << endl; 375 382 return kTRUE; 376 383 377 384 case M_BUTTON_PRINT: 378 cout << "Sorry, not yet implemented!" << endl; 385 { 386 char *txt = (char*)"canvasXXXXXX"; 387 mkstemp(txt); 388 TString name = txt; 389 name += ".ps"; 390 fCanvas->SaveAs(name); 391 cout << "Calling 'lpr " << name << ".ps'" << endl; 392 gSystem->Exec(TString("lpr ")+name+".ps"); 393 gSystem->Exec(TString("rm ")+name+".ps"); 394 } 395 cout << "Sorry, not well implemented!" << endl; 379 396 return kTRUE; 380 397 … … 426 443 return kTRUE; 427 444 428 // Check for the slider movement and s icronise with TGListBox445 // Check for the slider movement and synchronise with TGListBox 429 446 if (parm2<1 || parm2>577) 430 447 return kTRUE; -
trunk/MagicSoft/Mars/mhist/MHFadcCam.cc
r1652 r1916 130 130 { 131 131 for (Int_t i=0; i<577; i++) 132 { 133 GetHistHi(i)->Reset(); 134 GetHistLo(i)->Reset(); 135 } 132 Reset(i); 136 133 } 134 135 void MHFadcCam::Reset(Int_t i) 136 { 137 GetHistHi(i)->Reset(); 138 GetHistLo(i)->Reset(); 139 } -
trunk/MagicSoft/Mars/mhist/MHFadcCam.h
r1655 r1916 49 49 50 50 void ResetHistograms(); 51 void Reset(Int_t i); 51 52 52 53 // … … 57 58 58 59 Bool_t HasLo(UInt_t i) const { return GetHistLo(i)->GetEntries()>0; } 60 Bool_t HasHi(UInt_t i) const { return GetHistHi(i)->GetEntries()>0; } 61 62 Bool_t Exists(UInt_t i) const { return HasLo(i) && HasHi(i); } 59 63 60 64 void DrawPix(UInt_t i) { (*this)[i].Draw(); } -
trunk/MagicSoft/Mars/mmain/MDataCheck.cc
r1668 r1916 58 58 : MBrowser(/*main,*/ p, w, h) 59 59 { 60 TGTextButton *pedadc = new TGTextButton(fTop1, "ADC Spectra of Pedestals", kButPedAdc);60 //TGTextButton *pedadc = new TGTextButton(fTop1, "ADC Spectra of Pedestals", kButPedAdc); 61 61 TGTextButton *cradc = new TGTextButton(fTop1, "ADC Spectra of Cosmics", kButEvtAdc); 62 TGTextButton *pedtdc = new TGTextButton(fTop3, "Run Spectra of Pedestals", kButPedTdc);63 TGTextButton *crtdc = new TGTextButton(fTop3, "Run Spectra of Cosmics", kButEvtTdc);64 65 pedadc->Associate(this);62 //TGTextButton *pedtdc = new TGTextButton(fTop3, "Run Spectra of Pedestals", kButPedTdc); 63 //TGTextButton *crtdc = new TGTextButton(fTop3, "Run Spectra of Cosmics", kButEvtTdc); 64 65 //pedadc->Associate(this); 66 66 cradc ->Associate(this); 67 pedtdc->Associate(this);68 crtdc ->Associate(this);69 70 fList->Add(pedadc);67 //pedtdc->Associate(this); 68 //crtdc ->Associate(this); 69 70 //fList->Add(pedadc); 71 71 fList->Add(cradc); 72 fList->Add(pedtdc);73 fList->Add(crtdc);72 //fList->Add(pedtdc); 73 //fList->Add(crtdc); 74 74 75 75 TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5); 76 76 fList->Add(laybut); 77 77 78 fTop1->AddFrame(pedadc, laybut);78 //fTop1->AddFrame(pedadc, laybut); 79 79 fTop1->AddFrame(cradc, laybut); 80 80 81 fTop3->AddFrame(pedtdc, laybut);82 fTop3->AddFrame(crtdc, laybut);81 //fTop3->AddFrame(pedtdc, laybut); 82 //fTop3->AddFrame(crtdc, laybut); 83 83 84 84 MapSubwindows();
Note:
See TracChangeset
for help on using the changeset viewer.