CMS 3D CMS Logo

VisCSCChamberSelectorImpl.cc

Go to the documentation of this file.
00001 #include "VisReco/VisMuonCSC/interface/VisCSCStripDigiTwig.h"
00002 #include "VisReco/VisMuonCSC/interface/VisCSCChamberSelectorImpl.h"
00003 #include <qwidget.h>
00004 #include <qstring.h>
00005 #include <qspinbox.h>
00006 #include <qradiobutton.h>
00007 #undef emit /* qt problem... */
00008 #undef signal /* ditto */
00009 //#include "VisReco/VisMuonCSC/interface/VisCSCStripDigiTwig.h"
00010 
00011 //VisCSCChamberSelectorImpl::VisCSCChamberSelectorImpl( VisCSCStripDigiTwig *t, QWidget* parent, const char* name, WFlags fl) :
00012 //VisCSCChamberSelector(parent, name, fl), m_twig(t) 
00013 VisCSCChamberSelectorImpl::VisCSCChamberSelectorImpl(  QWidget* parent, const char* name, WFlags fl) :
00014 VisCSCChamberSelector(parent, name, fl), m_did(CSCDetId(0, 0, 0, 0))
00015 {
00016     connect(ChamberSpin, SIGNAL(valueChanged(int)),this, SLOT(selectorInput(int)));
00017     connect(RingSpin, SIGNAL(valueChanged(int)),this, SLOT(selectorInput(int)));
00018     connect(StationSpin, SIGNAL(valueChanged(int)),this, SLOT(selectorInput(int)));
00019     connect(EndcapSpin, SIGNAL(valueChanged(int)),this, SLOT(selectorInput(int)));
00020     connect(ApplyFilter, SIGNAL(stateChanged(int)),this, SLOT(filterChange(int)));
00021 
00022 }
00023 VisCSCChamberSelectorImpl::~VisCSCChamberSelectorImpl()
00024 {
00025 }
00026 void VisCSCChamberSelectorImpl::selectorInput(int)
00027 {
00028     int chamber = ChamberSpin->value();
00029     int ring = RingSpin->value();
00030     int station = StationSpin->value();
00031     int endcap = EndcapSpin->value();
00032     m_did = CSCDetId(endcap, station, ring, chamber); 
00033     if (ApplyFilter->isChecked()) 
00034     {
00035         selectionChange( m_did() );
00036     }
00037          
00038 }
00039 void VisCSCChamberSelectorImpl::filterChange( int )
00040 {
00041     if (!ApplyFilter->isChecked()) 
00042     {
00043         CSCDetId id = CSCDetId(0, 0, 0, 0);
00044         selectionChange( id() );
00045     }
00046     else
00047     {
00048         selectionChange( m_did() );
00049     }   
00050 }

Generated on Tue Jun 9 17:50:20 2009 for CMSSW by  doxygen 1.5.4