]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
TrackCounterEditor: add number-entry to directly set the event number.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Jan 2007 13:40:20 +0000 (13:40 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Jan 2007 13:40:20 +0000 (13:40 +0000)
EVE/Reve/TrackEditors.cxx
EVE/Reve/TrackEditors.h

index 6d093742828a9021977bc142f23168910c52f926..136a2e124027373e04b3aa2d4cb08bb1479d3e9e 100644 (file)
@@ -280,7 +280,8 @@ TrackCounterEditor::TrackCounterEditor(const TGWindow *p, Int_t width, Int_t hei
   TGedFrame(p, width, height, options | kVerticalFrame, back),
   fM(0),
   fClickAction (0),
-  fInfoLabel   (0)
+  fInfoLabel   (0),
+  fEventId     (0)
 {
   MakeTitle("TrackCounter");
 
@@ -353,6 +354,11 @@ TrackCounterEditor::TrackCounterEditor(const TGWindow *p, Int_t width, Int_t hei
     f->AddFrame(b, new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 1, 1, 0, 0));
     b->Connect("Clicked()", "Reve::TrackCounterEditor", this, "DoPrev()");
 
+    fEventId = new TGNumberEntry(f, 0, 3, -1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEAPositive,
+                                TGNumberFormat::kNELLimitMinMax, 0, 1000);
+    f->AddFrame(fEventId, new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 1, 1, 0, 0));
+    fEventId->Connect("ValueSet(Long_t)", "Reve::TrackCounterEditor", this, "DoSetEvent()");
+
     b = new TGTextButton(f, "Next");
     f->AddFrame(b, new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 1, 1, 0, 0));
     b->Connect("Clicked()", "Reve::TrackCounterEditor", this, "DoNext()");
@@ -410,6 +416,7 @@ void TrackCounterEditor::SetModel(TObject* obj)
 
   fClickAction->Select(fM->fClickAction, kFALSE);
   fInfoLabel->SetText(Form("All: %3d; Primaries: %3d", fM->fAllTracks, fM->fGoodTracks));
+  fEventId->SetNumber(fM->GetEventId());
 }
 
 /**************************************************************************/
@@ -448,6 +455,13 @@ void TrackCounterEditor::DoNext()
   gReve->EditRenderElement(fM);
 }
 
+void TrackCounterEditor::DoSetEvent()
+{
+  Reve::LoadMacro("event_goto.C");
+  gROOT->ProcessLine(Form("event_goto(%d);", (Int_t) fEventId->GetNumber()));
+  gReve->EditRenderElement(fM);
+}
+
 /**************************************************************************/
 
 void TrackCounterEditor::DoPrintReport()
index 549d163da4dc0eb41b416ca1a473ef7da8a064e8..6fc8f6fdb30fbf204780bcd5c406c770013d032c 100644 (file)
@@ -90,8 +90,9 @@ protected:
   TrackCounter* fM; // fModel dynamic-casted to TrackCounter
 
   // Declare widgets
-  TGComboBox*   fClickAction;
-  TGLabel*      fInfoLabel;
+  TGComboBox*    fClickAction;
+  TGLabel*       fInfoLabel;
+  TGNumberEntry* fEventId;
 
 public:
   TrackCounterEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
@@ -106,6 +107,7 @@ public:
 
   void DoPrev();
   void DoNext();
+  void DoSetEvent();
 
   void DoPrintReport();
   void DoFileReport();