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() [1/2]

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

Definition at line 34 of file FWViewEnergyScaleEditor.cc.

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 }

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

◆ ~FWViewEnergyScaleEditor()

FWViewEnergyScaleEditor::~FWViewEnergyScaleEditor ( )
override

Definition at line 43 of file FWViewEnergyScaleEditor.cc.

43 {}

◆ FWViewEnergyScaleEditor() [2/2]

FWViewEnergyScaleEditor::FWViewEnergyScaleEditor ( const FWViewEnergyScaleEditor )
private

Member Function Documentation

◆ addParam()

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

Definition at line 56 of file FWViewEnergyScaleEditor.cc.

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 }

References m_setters, FWParameterSetterBase::makeSetterFor(), and runGCPTkAlMap::title.

Referenced by FWViewEnergyScaleEditor().

◆ ClassDefOverride()

FWViewEnergyScaleEditor::ClassDefOverride ( FWViewEnergyScaleEditor  ,
 
)

◆ operator=()

const FWViewEnergyScaleEditor& FWViewEnergyScaleEditor::operator= ( const FWViewEnergyScaleEditor )
private

◆ setEnabled()

void FWViewEnergyScaleEditor::setEnabled ( bool  x)

Definition at line 48 of file FWViewEnergyScaleEditor.cc.

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 }

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

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

Member Data Documentation

◆ m_enabled

bool FWViewEnergyScaleEditor::m_enabled
private

Definition at line 60 of file FWViewEnergyScaleEditor.h.

Referenced by setEnabled().

◆ m_scale

FWViewEnergyScale* FWViewEnergyScaleEditor::m_scale
private

Definition at line 59 of file FWViewEnergyScaleEditor.h.

Referenced by FWViewEnergyScaleEditor().

◆ m_setters

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

Definition at line 63 of file FWViewEnergyScaleEditor.h.

Referenced by addParam(), and setEnabled().

runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
FWViewEnergyScaleEditor::m_scale
FWViewEnergyScale * m_scale
Definition: FWViewEnergyScaleEditor.h:59
mps_fire.i
i
Definition: mps_fire.py:428
FWViewEnergyScaleEditor::addParam
void addParam(FWParameterBase *, const char *title=nullptr)
Definition: FWViewEnergyScaleEditor.cc:56
FWParameterBase
Definition: FWParameterBase.h:31
DDAxes::x
FWViewEnergyScale::m_plotEt
FWBoolParameter m_plotEt
Definition: FWViewEnergyScale.h:63
alignCSCRings.s
s
Definition: alignCSCRings.py:92
FWViewEnergyScaleEditor::m_enabled
bool m_enabled
Definition: FWViewEnergyScaleEditor.h:60
w
const double w
Definition: UKUtility.cc:23
FWViewEnergyScale::m_maxTowerHeight
FWDoubleParameter m_maxTowerHeight
Definition: FWViewEnergyScale.h:62
FWParameterSetterBase::makeSetterFor
static std::shared_ptr< FWParameterSetterBase > makeSetterFor(FWParameterBase *)
Definition: FWParameterSetterBase.cc:83
FWViewEnergyScaleEditor::m_setters
std::vector< std::shared_ptr< FWParameterSetterBase > > m_setters
Definition: FWViewEnergyScaleEditor.h:63
FWViewEnergyScale::m_scaleMode
FWEnumParameter m_scaleMode
Definition: FWViewEnergyScale.h:60
FWViewEnergyScale::m_fixedValToHeight
FWDoubleParameter m_fixedValToHeight
Definition: FWViewEnergyScale.h:61