Commit 04d2d9c5 authored by Antoine Lemasson's avatar Antoine Lemasson
Browse files

correct bug of last gate

correct bug of Z range in Gamma search
parent 2c09ab35
......@@ -72,15 +72,15 @@ CXGammaSearch::CXGammaSearch(const TGWindow *p, const TGWindow *main, UInt_t w,
Main->AddFrame(gFrame, GroupHints);
hFrame = new TGCompositeFrame(gFrame, 60, 20, kHorizontalFrame);
hFrame->AddFrame(fZRange[0] = new TGNumberEntry(hFrame, 28, 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
hFrame->AddFrame(fZRange[0] = new TGNumberEntry(hFrame, 1, 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
hFrame->AddFrame(new TGLabel(hFrame, " < Z < "),new TGLayoutHints(kLHintsCenterY, 0, 0, 0, 0));
hFrame->AddFrame(fZRange[1] = new TGNumberEntry(hFrame, 50, 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
hFrame->AddFrame(fZRange[1] = new TGNumberEntry(hFrame, 100, 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
gFrame->AddFrame(hFrame,new TGLayoutHints( kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0));
hFrame = new TGCompositeFrame(gFrame, 60, 20, kHorizontalFrame);
hFrame->AddFrame(fNRange[0] = new TGNumberEntry(hFrame, 28, 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
hFrame->AddFrame(fNRange[0] = new TGNumberEntry(hFrame, 0, 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
hFrame->AddFrame(new TGLabel(hFrame, " < N < "),new TGLayoutHints(kLHintsCenterY, 0, 0, 0, 0));
hFrame->AddFrame(fNRange[1] = new TGNumberEntry(hFrame, 50, 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
hFrame->AddFrame(fNRange[1] = new TGNumberEntry(hFrame, 100, 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
gFrame->AddFrame(hFrame,new TGLayoutHints( kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0));
hFrame = new TGCompositeFrame(gFrame, 60, 20, kHorizontalFrame);
......@@ -89,6 +89,8 @@ CXGammaSearch::CXGammaSearch(const TGWindow *p, const TGWindow *main, UInt_t w,
hFrame->AddFrame(fARange[1] = new TGNumberEntry(hFrame, fZRange[1]->GetNumber()+fNRange[1]->GetNumber(), 6,0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative),new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX,1,1,0,0));
gFrame->AddFrame(hFrame,new TGLayoutHints( kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0));
fZRange[0]->Connect("ValueSet(Long_t)", "CXGammaSearch", this, "HandleButtons()");
fZRange[1]->Connect("ValueSet(Long_t)", "CXGammaSearch", this, "HandleButtons()");
fNRange[0]->Connect("ValueSet(Long_t)", "CXGammaSearch", this, "HandleButtons()");
fNRange[1]->Connect("ValueSet(Long_t)", "CXGammaSearch", this, "HandleButtons()");
fARange[0]->Connect("ValueSet(Long_t)", "CXGammaSearch", this, "HandleButtons()");
......@@ -719,6 +721,10 @@ void CXGammaSearch::HandleButtons()
fNRange[0]->SetNumber(fARange[0]->GetNumber()-fZRange[0]->GetNumber());
if(gTQSender == fARange[1])
fNRange[1]->SetNumber(fARange[1]->GetNumber()-fZRange[1]->GetNumber());
if(gTQSender == fZRange[0])
fARange[0]->SetNumber(fZRange[0]->GetNumber()+fNRange[0]->GetNumber());
if(gTQSender == fZRange[1])
fARange[1]->SetNumber(fZRange[1]->GetNumber()+fNRange[1]->GetNumber());
}
if(((TObject*)gTQSender)->InheritsFrom("TGRadioButton"))
......
......@@ -85,7 +85,7 @@ CXHist2DPlayer::CXHist2DPlayer(const TGCompositeFrame *MotherFrame, UInt_t w, UI
fHorizontalFrame = new TGCompositeFrame(fSubGroupFrame, 60, 20, kHorizontalFrame);
fHorizontalFrame->AddFrame(new TGLabel(fHorizontalFrame, "Draw Options:"),new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 0, 5, 0, 0));
fDrawOpt = new TGTextEntry(fHorizontalFrame, "hist ");
fDrawOpt = new TGTextEntry(fHorizontalFrame, "hist");
fDrawOpt->SetToolTipText("hist, same, norm, add, add(fact)");
fHorizontalFrame->AddFrame(fDrawOpt,new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsCenterY ,0,0,0,0));
fSubGroupFrame->AddFrame(fHorizontalFrame,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,-10,-10,5,5));
......
......@@ -185,9 +185,11 @@ void CXTH1Proj::HandleMovement(Int_t EventType, Int_t EventX, Int_t EventY, TObj
if( KeySym == kKey_c && fMainWindow->GetSelectedPad() == fCurrentPad)
ClearGates();
if( KeySym == kKey_p )
Project();
f2DPlayer->Project();
if( KeySym == kKey_d && selected && selected->InheritsFrom("CXGateBox"))
RemoveGate(((CXGateBox*)selected));
if( KeySym == kKey_l )
f2DPlayer->ApplyLastGate();
UpdateGates();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment