001 #include "FMDetectorSelector.h"
002
003 #ifdef WIN32
004 #include <Riostream.h>
005 #else
006 #include <iostream.h>
007 #endif
008
009 using std::cout;
010 using std::endl;
011
012 #include "TGButtonGroup.h"
013
014 FMDetectorSelector::FMDetectorSelector(IDisplayFrame* parentFrame):
015 m_pParentFrame(parentFrame)
016 {
017 TGVerticalFrame* fToolFrame = parentFrame->modulesFrame();
018
019 TGButtonGroup *fDetButtonGroup = new TGButtonGroup(fToolFrame,"Detectors",kHorizontalFrame);
020
021 m_fDetRadioButton[0] = new TGRadioButton(fDetButtonGroup, new TGHotString("&EM"), BT_RADIO_DET_EM);
022 m_fDetRadioButton[1] = new TGRadioButton(fDetButtonGroup, new TGHotString("&HAD"), BT_RADIO_DET_HAD);
023 m_fDetRadioButton[2] = new TGRadioButton(fDetButtonGroup, new TGHotString("&Both"),BT_RADIO_DET_BOTH);
024 m_fDetRadioButton[0]->SetState(kButtonDown);
025 m_previousId = BT_RADIO_DET_EM;
026
027 fDetButtonGroup->Connect("Pressed(Int_t)", "FMDetectorSelector", this, "OnDetectorsChange(Int_t)");
028
029 fToolFrame->AddFrame(fDetButtonGroup, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX,2,2,0,0));
030 }
031
032 FMDetectorSelector::~FMDetectorSelector(void)
033 {
034 }
035
036 void FMDetectorSelector::OnDetectorsChange(Int_t id) {
037
038
039 if(id!=m_previousId) {
040 cout<<"FMDetectorSelector::OnDetectorsChange(Int_t) "<< id <<endl;
041
042 m_previousId = static_cast<eDetectorId>(id);
043
044 m_pParentFrame->onDetectorChangeDraw();
045 }
046 }
| Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems |
|
This page was automatically generated by the
LXR engine.
|
|