Fireworks
Core
src
FWViewEnergyScaleEditor.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: Core
4
// Class : FWViewEnergyScaleEditor
5
//
6
// Implementation:
7
// [Notes on implementation]
8
//
9
// Original Author: Alja Mrak-Tadel
10
// Created: Fri Sep 24 18:52:19 CEST 2010
11
//
12
13
// system include files
14
15
// user include files
16
#include "TGButton.h"
17
#include "TGLabel.h"
18
#include "
Fireworks/Core/interface/FWViewEnergyScaleEditor.h
"
19
#include "
Fireworks/Core/interface/FWEveView.h
"
20
#include "
Fireworks/Core/interface/FWViewEnergyScale.h
"
21
#include "
Fireworks/Core/interface/FWParameterSetterBase.h
"
22
23
//
24
// constants, enums and typedefs
25
//
26
27
//
28
// static data member definitions
29
//
30
31
//
32
// constructors and destructor
33
//
34
FWViewEnergyScaleEditor::FWViewEnergyScaleEditor
(
FWViewEnergyScale
*
s
, TGCompositeFrame*
w
,
bool
addAutoScaleControll)
35
: TGVerticalFrame(
w
), m_scale(
s
), m_enabled(
true
) {
36
addParam
(&
m_scale
->
m_plotEt
);
37
addParam
(&
m_scale
->
m_scaleMode
);
38
addParam
(&
m_scale
->
m_fixedValToHeight
,
"FixedScaleMode"
);
39
if
(addAutoScaleControll)
40
addParam
(&
m_scale
->
m_maxTowerHeight
,
"AutomaticScaleMode"
);
41
}
42
43
FWViewEnergyScaleEditor::~FWViewEnergyScaleEditor
() {}
44
45
//
46
// member functions
47
//
48
void
FWViewEnergyScaleEditor::setEnabled
(
bool
x
) {
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
}
55
56
void
FWViewEnergyScaleEditor::addParam
(
FWParameterBase
* param,
const
char
*
title
) {
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
}
FWViewEnergyScaleEditor::m_scale
FWViewEnergyScale * m_scale
Definition:
FWViewEnergyScaleEditor.h:59
mps_fire.i
i
Definition:
mps_fire.py:355
FWViewEnergyScaleEditor::addParam
void addParam(FWParameterBase *, const char *title=nullptr)
Definition:
FWViewEnergyScaleEditor.cc:56
FWEveView.h
FWParameterBase
Definition:
FWParameterBase.h:31
DDAxes::x
FWViewEnergyScale::m_plotEt
FWBoolParameter m_plotEt
Definition:
FWViewEnergyScale.h:63
FWViewEnergyScaleEditor::setEnabled
void setEnabled(bool)
Definition:
FWViewEnergyScaleEditor.cc:48
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
vertices_cff.x
x
Definition:
vertices_cff.py:29
funct::true
true
Definition:
Factorize.h:173
FWViewEnergyScaleEditor::FWViewEnergyScaleEditor
FWViewEnergyScaleEditor(FWViewEnergyScale *s, TGCompositeFrame *w, bool addAutoScaleControll=true)
Definition:
FWViewEnergyScaleEditor.cc:34
FWParameterSetterBase.h
FWViewEnergyScaleEditor.h
FWViewEnergyScale::m_maxTowerHeight
FWDoubleParameter m_maxTowerHeight
Definition:
FWViewEnergyScale.h:62
FWParameterSetterBase::makeSetterFor
static std::shared_ptr< FWParameterSetterBase > makeSetterFor(FWParameterBase *)
Definition:
FWParameterSetterBase.cc:83
overlapproblemtsosanalyzer_cfi.title
title
Definition:
overlapproblemtsosanalyzer_cfi.py:7
FWViewEnergyScaleEditor::m_setters
std::vector< std::shared_ptr< FWParameterSetterBase > > m_setters
Definition:
FWViewEnergyScaleEditor.h:63
FWViewEnergyScaleEditor::~FWViewEnergyScaleEditor
~FWViewEnergyScaleEditor() override
Definition:
FWViewEnergyScaleEditor.cc:43
FWViewEnergyScale::m_scaleMode
FWEnumParameter m_scaleMode
Definition:
FWViewEnergyScale.h:60
FWViewEnergyScale
Definition:
FWViewEnergyScale.h:34
FWViewEnergyScale.h
FWViewEnergyScale::m_fixedValToHeight
FWDoubleParameter m_fixedValToHeight
Definition:
FWViewEnergyScale.h:61
Generated for CMSSW Reference Manual by
1.8.16