Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-17 23:10:43

0001 // -*- C++ -*-
0002 //
0003 // Package:     Calo
0004 // Class  :     FWFromSliceSelectorBase
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:
0010 //         Created:  Wed Jun  2 17:30:49 CEST 2010
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "Fireworks/Calo/interface/FWFromSliceSelector.h"
0017 #include "Fireworks/Core/interface/FWEventItem.h"
0018 
0019 //
0020 // constants, enums and typedefs
0021 //
0022 
0023 //
0024 // static data member definitions
0025 //
0026 
0027 //
0028 // constructors and destructor
0029 //
0030 FWFromSliceSelector::FWFromSliceSelector(const FWEventItem* iItem) : m_item(iItem) {}
0031 
0032 FWFromSliceSelector::~FWFromSliceSelector() {}
0033 
0034 //
0035 // member functions
0036 //
0037 
0038 void FWFromSliceSelector::clear() {
0039   if (!m_item)
0040     return;
0041 
0042   int size = static_cast<int>(m_item->size());
0043   for (int index = 0; index < size; ++index) {
0044     if (m_item->modelInfo(index).m_displayProperties.isVisible() && m_item->modelInfo(index).isSelected()) {
0045       m_item->unselect(index);
0046     }
0047   }
0048 }
0049 
0050 void FWFromSliceSelector::reset() { m_item = nullptr; }
0051 
0052 //
0053 // const member functions
0054 //
0055 FWModelChangeManager* FWFromSliceSelector::changeManager() const { return m_item->changeManager(); }
0056 
0057 //
0058 // static member functions
0059 //