CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/Fireworks/Calo/src/FWFromSliceSelector.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Calo
00004 // Class  :     FWFromSliceSelectorBase
00005 // 
00006 // Implementation:
00007 //     [Notes on implementation]
00008 //
00009 // Original Author:  
00010 //         Created:  Wed Jun  2 17:30:49 CEST 2010
00011 // $Id: FWFromSliceSelector.cc,v 1.4 2010/06/18 10:17:51 yana Exp $
00012 //
00013 
00014 // system include files
00015 
00016 // user include files
00017 #include "Fireworks/Calo/src/FWFromSliceSelector.h"
00018 #include "Fireworks/Core/interface/FWEventItem.h"
00019 
00020 //
00021 // constants, enums and typedefs
00022 //
00023 
00024 //
00025 // static data member definitions
00026 //
00027 
00028 //
00029 // constructors and destructor
00030 //
00031 FWFromSliceSelector::FWFromSliceSelector(const FWEventItem* iItem) :
00032 m_item(iItem)
00033 {
00034 }
00035 
00036 FWFromSliceSelector::~FWFromSliceSelector()
00037 {
00038 }
00039 
00040 //
00041 // member functions
00042 //
00043 
00044 void 
00045 FWFromSliceSelector::clear()
00046 {
00047    if (!m_item) return;
00048 
00049    int size =  static_cast<int>(m_item->size());
00050    for(int index=0; index < size; ++index)
00051    {
00052       if( m_item->modelInfo(index).m_displayProperties.isVisible() &&
00053           m_item->modelInfo(index).isSelected()) {
00054          m_item->unselect(index);
00055       }
00056    }
00057 }
00058 
00059 void
00060 FWFromSliceSelector::reset()
00061 {
00062    m_item = 0;
00063 }
00064 
00065 //
00066 // const member functions
00067 //
00068 FWModelChangeManager* 
00069 FWFromSliceSelector::changeManager() const {
00070    return m_item->changeManager();
00071 }
00072 
00073 //
00074 // static member functions
00075 //