]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added control for double sampling-rate fDoubleSR.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jun 2006 18:31:09 +0000 (18:31 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Jun 2006 18:31:09 +0000 (18:31 +0000)
EVE/Alieve/TPCLoaderEditor.cxx
EVE/Alieve/TPCLoaderEditor.h

index 07d5ee6257b6bde04f90d7aea569ad6af1e060f1..ce1aa0876a4dad8642ffe9b8a678e9b8eb70d086 100644 (file)
@@ -61,6 +61,11 @@ TPCLoaderEditor::TPCLoaderEditor(const TGWindow *p, Int_t id, Int_t width, Int_t
   fEvent->SetToolTip("Current event number");
   fEvent->Connect("ValueSet(Double_t)",
                  "Alieve::TPCLoaderEditor", this, "DoEvent()");
+  // Reuse Event for DoubleSR button
+  fDoubleSR = new TGCheckButton(fEvent, "Double SR");
+  fDoubleSR->SetToolTipText("Double sampling rate");
+  fEvent->AddFrame(fDoubleSR, new TGLayoutHints(kLHintsLeft, 12, 0, 1, 0));
+  fDoubleSR->Connect("Toggled(Bool_t)","Alieve::TPCSectorVizEditor", this, "DoDoubleSR()");
   AddFrame(fEvent);
 
   fUpdateSectors = new TGTextButton(this, "Update Sectors");
@@ -111,7 +116,8 @@ void TPCLoaderEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t /*event*/)
   fFile->SetText(fM->fFile);
   fEvent->SetValue(fM->fEvent);
   fEvent->SetEnabled(fM->fEvent >= 0);
-    
+  fDoubleSR->SetState(fM->fDoubleSR  ? kButtonDown : kButtonUp);
+
   SetActive();
 }
 
@@ -154,6 +160,12 @@ void TPCLoaderEditor::DoEvent()
   SetModel(fPad, fModel, 0);
 }
 
+void TPCLoaderEditor::DoDoubleSR()
+{
+  fM->SetDoubleSR(fDoubleSR->IsOn());
+  Update();
+}
+
 /**************************************************************************/
 
 void TPCLoaderEditor::DoUpdateSectors()
index 30e5e631e7148134787e97202803ba01d505fd45..5af8a3f0b6365d508b83462ccb0bd4e04cacbfc3 100644 (file)
@@ -28,13 +28,14 @@ protected:
   TGTextButton* fOpenFile;
 
   Reve::RGValuator* fEvent;
+  TGCheckButton*    fDoubleSR;
 
   TGTextButton* fUpdateSectors;
   TGTextButton* fCreateSectors3D;
   TGTextButton* fDeleteSectors3D;
 
 public:
-  TPCLoaderEditor(const TGWindow* p, Int_t id, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
+  TPCLoaderEditor(const TGWindow* p=0, Int_t id=-1, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
   ~TPCLoaderEditor();
 
   virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
@@ -44,6 +45,7 @@ public:
   void DoOpen();
 
   void DoEvent();
+  void DoDoubleSR();
 
   void DoUpdateSectors();
   void DoCreateSectors3D();