CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWViewEnergyScaleEditor Class Reference

#include <Fireworks/Core/interface/FWViewEnergyScaleEditor.h>

Inheritance diagram for FWViewEnergyScaleEditor:
FWParameterSetterEditorBase

Public Member Functions

 ClassDefOverride (FWViewEnergyScaleEditor, 0)
 
 FWViewEnergyScaleEditor (FWViewEnergyScale *s, TGCompositeFrame *w, bool addAutoScaleControll=true)
 
void setEnabled (bool)
 
 ~FWViewEnergyScaleEditor () override
 
- Public Member Functions inherited from FWParameterSetterEditorBase
 FWParameterSetterEditorBase ()
 
virtual void updateEditor ()
 
virtual ~FWParameterSetterEditorBase ()
 

Private Member Functions

void addParam (FWParameterBase *, const char *title=nullptr)
 
 FWViewEnergyScaleEditor (const FWViewEnergyScaleEditor &)
 
const FWViewEnergyScaleEditoroperator= (const FWViewEnergyScaleEditor &)
 

Private Attributes

bool m_enabled
 
FWViewEnergyScalem_scale
 
std::vector< std::shared_ptr< FWParameterSetterBase > > m_setters
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 37 of file FWViewEnergyScaleEditor.h.

Constructor & Destructor Documentation

FWViewEnergyScaleEditor::FWViewEnergyScaleEditor ( FWViewEnergyScale s,
TGCompositeFrame *  w,
bool  addAutoScaleControll = true 
)

Definition at line 35 of file FWViewEnergyScaleEditor.cc.

References addParam(), FWViewEnergyScale::m_fixedValToHeight, FWViewEnergyScale::m_maxTowerHeight, FWViewEnergyScale::m_plotEt, m_scale, and FWViewEnergyScale::m_scaleMode.

35  :
36  TGVerticalFrame(w),
37  m_scale(s),
38  m_enabled(true)
39 {
42  addParam(&m_scale->m_fixedValToHeight, "FixedScaleMode");
43  if (addAutoScaleControll)
44  addParam(&m_scale->m_maxTowerHeight, "AutomaticScaleMode");
45 }
FWDoubleParameter m_fixedValToHeight
const double w
Definition: UKUtility.cc:23
void addParam(FWParameterBase *, const char *title=nullptr)
FWBoolParameter m_plotEt
FWDoubleParameter m_maxTowerHeight
FWEnumParameter m_scaleMode
FWViewEnergyScaleEditor::~FWViewEnergyScaleEditor ( )
override

Definition at line 48 of file FWViewEnergyScaleEditor.cc.

49 {
50 }
FWViewEnergyScaleEditor::FWViewEnergyScaleEditor ( const FWViewEnergyScaleEditor )
private

Member Function Documentation

void FWViewEnergyScaleEditor::addParam ( FWParameterBase param,
const char *  title = nullptr 
)
private

Definition at line 68 of file FWViewEnergyScaleEditor.cc.

References m_setters, and FWParameterSetterBase::makeSetterFor().

Referenced by FWViewEnergyScaleEditor().

69 {
70  int leftPad = 0;
71  if (title)
72  {
73  leftPad = 10;
74  AddFrame(new TGLabel(this, title), new TGLayoutHints(kLHintsLeft, leftPad, 0, 0, 0));
75  leftPad *= 2;
76  }
77 
78  std::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor(param) );
79  ptr->attach((FWParameterBase*)param, this);
80  TGFrame* pframe = ptr->build(this);
81  AddFrame(pframe, new TGLayoutHints(kLHintsLeft, leftPad, 0, 0, 0));
82  m_setters.push_back(ptr);
83 }
std::vector< std::shared_ptr< FWParameterSetterBase > > m_setters
static std::shared_ptr< FWParameterSetterBase > makeSetterFor(FWParameterBase *)
FWViewEnergyScaleEditor::ClassDefOverride ( FWViewEnergyScaleEditor  ,
 
)
const FWViewEnergyScaleEditor& FWViewEnergyScaleEditor::operator= ( const FWViewEnergyScaleEditor )
private
void FWViewEnergyScaleEditor::setEnabled ( bool  x)

Definition at line 57 of file FWViewEnergyScaleEditor.cc.

References mps_fire::i, m_enabled, m_setters, and x.

Referenced by FWEveView::populateController(), Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), and FWEveView::useGlobalEnergyScaleChanged().

58 {
59  m_enabled =x;
60  typedef std::vector<std::shared_ptr<FWParameterSetterBase> > sList;
61  for (sList::iterator i = m_setters.begin(); i!=m_setters.end(); ++i)
62  {
63  (*i)->setEnabled(m_enabled);
64  }
65 }
std::vector< std::shared_ptr< FWParameterSetterBase > > m_setters

Member Data Documentation

bool FWViewEnergyScaleEditor::m_enabled
private

Definition at line 61 of file FWViewEnergyScaleEditor.h.

Referenced by setEnabled().

FWViewEnergyScale* FWViewEnergyScaleEditor::m_scale
private

Definition at line 60 of file FWViewEnergyScaleEditor.h.

Referenced by FWViewEnergyScaleEditor().

std::vector<std::shared_ptr<FWParameterSetterBase> > FWViewEnergyScaleEditor::m_setters
private

Definition at line 64 of file FWViewEnergyScaleEditor.h.

Referenced by addParam(), and setEnabled().