From 3a5df41971eb1074dbca19b61f967f95f849baa3 Mon Sep 17 00:00:00 2001 From: nemu Date: Fri, 27 Mar 2009 14:56:41 +0000 Subject: [PATCH] some more work towards musrt0 --- src/classes/PMusrT0.cpp | 17 ++++++++++++++++- src/include/PMusrT0.h | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/classes/PMusrT0.cpp b/src/classes/PMusrT0.cpp index 4d5372cc..38a19cc4 100644 --- a/src/classes/PMusrT0.cpp +++ b/src/classes/PMusrT0.cpp @@ -131,6 +131,8 @@ PMusrT0::PMusrT0(PRawRunData *rawRunData, int runNo, int histoNo, int detectorTa fBar->Layout(); fPopupMain->Connect("TGPopupMenu", "Activated(Int_t)", "PMusrT0", this, "HandleMenuPopup(Int_t)"); + + fMainCanvas->SetCrosshair(2); fMainCanvas->Show(); fMainCanvas->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)", "PMusrT0", @@ -220,7 +222,7 @@ void PMusrT0::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected) } else if (x == 'u') { // unzoom to the original range UnZoom(); } else if (x == 't') { // set t0 channel - cout << endl << "will set t0 channel ..." << endl; + SetT0Channel(); } else if (x == 'b') { // set first background channel cout << endl << "will set first background channel ..." << endl; } else if (x == 'B') { // set last background channel @@ -243,6 +245,7 @@ void PMusrT0::HandleMenuPopup(Int_t id) { switch (id) { case P_MENU_ID_T0: + SetT0Channel(); break; case P_MENU_ID_FIRST_BKG_CHANNEL: break; @@ -420,6 +423,18 @@ void PMusrT0::InitDataAndBkg() fMainCanvas->Update(); } +//-------------------------------------------------------------------------- +// SetT0Channel +//-------------------------------------------------------------------------- +/** + *

+ * + */ +void PMusrT0::SetT0Channel() +{ + cout << endl << "Set T0 Channel"; +} + //-------------------------------------------------------------------------- // UnZoom //-------------------------------------------------------------------------- diff --git a/src/include/PMusrT0.h b/src/include/PMusrT0.h index a52d0a79..0172fa4b 100644 --- a/src/include/PMusrT0.h +++ b/src/include/PMusrT0.h @@ -107,6 +107,7 @@ class PMusrT0 : public TObject, public TQObject TLine *fLastDataLine; void InitDataAndBkg(); + void SetT0Channel(); void UnZoom(); ClassDef(PMusrT0, 1)