CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ()
 
 FWParameterSetterEditorBase (const FWParameterSetterEditorBase &)=delete
 
const FWParameterSetterEditorBaseoperator= (const FWParameterSetterEditorBase &)=delete
 
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 34 of file FWViewEnergyScaleEditor.cc.

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

35  : TGVerticalFrame(w), m_scale(s), m_enabled(true) {
38  addParam(&m_scale->m_fixedValToHeight, "FixedScaleMode");
39  if (addAutoScaleControll)
40  addParam(&m_scale->m_maxTowerHeight, "AutomaticScaleMode");
41 }
FWDoubleParameter m_fixedValToHeight
void addParam(FWParameterBase *, const char *title=nullptr)
FWBoolParameter m_plotEt
FWDoubleParameter m_maxTowerHeight
FWEnumParameter m_scaleMode
T w() const
FWViewEnergyScaleEditor::~FWViewEnergyScaleEditor ( )
override

Definition at line 43 of file FWViewEnergyScaleEditor.cc.

43 {}
FWViewEnergyScaleEditor::FWViewEnergyScaleEditor ( const FWViewEnergyScaleEditor )
private

Member Function Documentation

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

Definition at line 56 of file FWViewEnergyScaleEditor.cc.

References m_setters, and FWParameterSetterBase::makeSetterFor().

Referenced by FWViewEnergyScaleEditor().

56  {
57  int leftPad = 0;
58  if (title) {
59  leftPad = 10;
60  AddFrame(new TGLabel(this, title), new TGLayoutHints(kLHintsLeft, leftPad, 0, 0, 0));
61  leftPad *= 2;
62  }
63 
64  std::shared_ptr<FWParameterSetterBase> ptr(FWParameterSetterBase::makeSetterFor(param));
65  ptr->attach((FWParameterBase*)param, this);
66  TGFrame* pframe = ptr->build(this);
67  AddFrame(pframe, new TGLayoutHints(kLHintsLeft, leftPad, 0, 0, 0));
68  m_setters.push_back(ptr);
69 }
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 48 of file FWViewEnergyScaleEditor.cc.

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

Referenced by FWEveView::populateController(), and FWEveView::useGlobalEnergyScaleChanged().

48  {
49  m_enabled = x;
50  typedef std::vector<std::shared_ptr<FWParameterSetterBase> > sList;
51  for (sList::iterator i = m_setters.begin(); i != m_setters.end(); ++i) {
52  (*i)->setEnabled(m_enabled);
53  }
54 }
std::vector< std::shared_ptr< FWParameterSetterBase > > m_setters

Member Data Documentation

bool FWViewEnergyScaleEditor::m_enabled
private

Definition at line 60 of file FWViewEnergyScaleEditor.h.

Referenced by setEnabled().

FWViewEnergyScale* FWViewEnergyScaleEditor::m_scale
private

Definition at line 59 of file FWViewEnergyScaleEditor.h.

Referenced by FWViewEnergyScaleEditor().

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

Definition at line 63 of file FWViewEnergyScaleEditor.h.

Referenced by addParam(), and setEnabled().