CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
FWGenericParameter< T > Class Template Reference

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

Inheritance diagram for FWGenericParameter< T >:
FWParameterBase FWConfigurable FWGenericParameterWithRange< T > FWEnumParameter

Public Types

typedef T value_type
 

Public Member Functions

void addTo (FWConfiguration &iTo) const override
 
 FWGenericParameter ()
 
 FWGenericParameter (FWParameterizable *iParent, const std::string &iName, const T &iDefault=T())
 
template<class K >
 FWGenericParameter (FWParameterizable *iParent, const std::string &iName, K iCallback, const T &iDefault=T())
 
void set (T iValue)
 
void setFrom (const FWConfiguration &iFrom) override
 
T value () const
 
- Public Member Functions inherited from FWParameterBase
 FWParameterBase (FWParameterizable *iParent, const std::string &iName)
 
const std::string & name () const
 
 ~FWParameterBase () override
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
virtual ~FWConfigurable ()
 

Public Attributes

sigc::signal< void, Tchanged_
 

Private Member Functions

 FWGenericParameter (const FWGenericParameter &)=delete
 
const FWGenericParameteroperator= (const FWGenericParameter &)=delete
 

Private Attributes

T m_value
 

Detailed Description

template<class T>
class FWGenericParameter< T >

Description: Provides access to a simple generic parameter.

Usage:

Definition at line 31 of file FWGenericParameter.h.

Member Typedef Documentation

◆ value_type

template<class T>
typedef T FWGenericParameter< T >::value_type

Definition at line 33 of file FWGenericParameter.h.

Constructor & Destructor Documentation

◆ FWGenericParameter() [1/4]

template<class T>
FWGenericParameter< T >::FWGenericParameter ( )
inline

Definition at line 35 of file FWGenericParameter.h.

35 : FWParameterBase(nullptr, "invalid") {}

◆ FWGenericParameter() [2/4]

template<class T>
FWGenericParameter< T >::FWGenericParameter ( FWParameterizable iParent,
const std::string &  iName,
const T iDefault = T() 
)
inline

Definition at line 37 of file FWGenericParameter.h.

38  : FWParameterBase(iParent, iName), m_value(iDefault) {}

◆ FWGenericParameter() [3/4]

template<class T>
template<class K >
FWGenericParameter< T >::FWGenericParameter ( FWParameterizable iParent,
const std::string &  iName,
iCallback,
const T iDefault = T() 
)
inline

Definition at line 41 of file FWGenericParameter.h.

42  : FWParameterBase(iParent, iName), m_value(iDefault) {
43  changed_.connect(iCallback);
44  }

References FWGenericParameter< T >::changed_.

◆ FWGenericParameter() [4/4]

template<class T>
FWGenericParameter< T >::FWGenericParameter ( const FWGenericParameter< T > &  )
privatedelete

Member Function Documentation

◆ addTo()

template<class T>
void FWGenericParameter< T >::addTo ( FWConfiguration iTo) const
inlineoverridevirtual

Implements FWConfigurable.

Definition at line 52 of file FWGenericParameter.h.

52  {
53  std::ostringstream s;
54  s << m_value;
55  iTo.addKeyValue(name(), FWConfiguration(s.str()));
56  }

References FWConfiguration::addKeyValue(), FWGenericParameter< T >::m_value, FWParameterBase::name(), and alignCSCRings::s.

◆ operator=()

template<class T>
const FWGenericParameter& FWGenericParameter< T >::operator= ( const FWGenericParameter< T > &  )
privatedelete

◆ set()

template<class T>
void FWGenericParameter< T >::set ( T  iValue)
inline

◆ setFrom()

template<class T>
void FWGenericParameter< T >::setFrom ( const FWConfiguration iFrom)
inlineoverridevirtual

Implements FWConfigurable.

Definition at line 62 of file FWGenericParameter.h.

62  {
63  if (const FWConfiguration* config = iFrom.valueForKey(name())) {
64  std::istringstream s(config->value());
65  s >> m_value;
66  }
68  }

References FWGenericParameter< T >::changed_, FWGenericParameter< T >::m_value, FWParameterBase::name(), alignCSCRings::s, and FWConfiguration::valueForKey().

Referenced by FWTriggerTableView::setFrom().

◆ value()

template<class T>
T FWGenericParameter< T >::value ( ) const
inline

Definition at line 50 of file FWGenericParameter.h.

50 { return m_value; }

References FWGenericParameter< T >::m_value.

Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), average.Average::average(), FWStringParameterSetter::build(), FWDoubleParameterSetter::build(), FWEnumParameterSetter::build(), FWBoolParameterSetter::build(), FWLongParameterSetter::build(), FWViewEnergyScale::calculateScaleFactor(), FWEveView::cameraGuideChanged(), FWOverlapTableView::cdTop(), FWGeometryTableViewBase::checkExpandLevel(), FWGeometryTableView::checkRegionOfInterest(), Types.string::configValue(), Types.FileInPath::configValue(), FWRPZView::doFishEyeDistortion(), FWRPZView::doPreScaleDistortion(), FWRPZView::doShiftOriginToBeamSpot(), FWOverlapTableView::drawPoints(), FWGeometryTableView::drawTopNode(), Mixins.UsingBlock::dumpPython(), FWL1TriggerTableView::fillTable(), FWHLTTriggerTableView::fillTable(), FWOverlapTableView::FWOverlapTableView(), FWRPZView::FWRPZView(), CmsShowCommon::gamma(), FWGeometryTableView::getAutoExpand(), FWGeometryTableViewBase::getEnableHighlight(), FWGeometryTableView::getFilter(), FWGeometryTableView::getFilterType(), FWGeometryTableView::getIgnoreVisLevelWhenFilter(), FWGeometryTableViewBase::getLeafTransparencyFactor(), FWGeometryTableViewBase::getMinLeafTransparency(), FWGeometryTableViewBase::getMinParentTransparency(), FWGeometryTableViewBase::getParentTransparencyFactor(), FWViewEnergyScale::getPlotEt(), CmsShowCommon::getProjTrackBreaking(), CmsShowCommon::getRnrPTBMarkers(), FWGeometryTableViewBase::getTopNodeIdx(), FWGeometryTableView::getVisLevel(), FWGeometryTableView::getVolumeMode(), Mixins.UsingBlock::insertInto(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), Types.vstring::insertInto(), FWEveView::isEnergyScaleGlobal(), FWTriggerTableView::isProcessValid(), FWGeometryTableView::isSelectedByRegion(), FWOverlapTableView::listAllNodes(), CmsShowCommon::loopPalettes(), FWEveOverlap::paintChildNodesRecurse(), FWEveView::pointLineScalesChanged(), FWOverlapTableView::pointSize(), FWEveView::populateController(), FWRPZView::projectionAxesLabelSize(), FWOverlapTableView::recalculate(), FWOverlapTableView::refreshTable3D(), FWTriggerTableView::resetCombo(), FWEveView::saveImageTo(), FWLegoViewBase::setAutoRebin(), FWLegoViewBase::setCell2DMode(), FWLegoViewBase::setContext(), FW3DViewBase::setContext(), FWEveView::setContext(), CmsShowCommon::setDrawBreakMarkers(), FWRPZView::setEtaRng(), FWLegoViewBase::setFontSizein2D(), FWOverlapTableView::setFrom(), FWTriggerTableView::setFrom(), FWGeometryTableView::setFrom(), CmsShowCommon::setFrom(), CmsShowCommon::setGamma(), CmsShowCommon::setPalette(), FWGeometryTableView::setPath(), FWLegoViewBase::setPixelsPerBin(), FWLegoViewBase::setProjectionMode(), CmsShowCommon::setTrackBreakMode(), FWGlimpseView::showAxes(), FWGlimpseView::showCylinder(), FWLegoViewBase::showOverlay(), FWRPZView::showProjectionAxes(), FW3DViewBase::updateClipPlanes(), FWGeometryTableView::updateFilter(), FW3DViewBase::updateHGCalVisibility(), FWGeometryTableView::updateVisibilityTopNode(), FWEveView::useGlobalEnergyScaleChanged(), and FWProxyBuilderConfiguration::value().

Member Data Documentation

◆ changed_

template<class T>
sigc::signal<void, T> FWGenericParameter< T >::changed_

◆ m_value

template<class T>
T FWGenericParameter< T >::m_value
private
FWGenericParameter::m_value
T m_value
Definition: FWGenericParameter.h:83
config
Definition: config.py:1
alignCSCRings.s
s
Definition: alignCSCRings.py:92
FWGenericParameter::changed_
sigc::signal< void, T > changed_
Definition: FWGenericParameter.h:75
FWConfiguration::valueForKey
const FWConfiguration * valueForKey(const std::string &iKey) const
Definition: FWConfiguration.cc:122
FWParameterBase::FWParameterBase
FWParameterBase(FWParameterizable *iParent, const std::string &iName)
Definition: FWParameterBase.cc:31
FWParameterBase::name
const std::string & name() const
Definition: FWParameterBase.h:39
FWConfiguration::addKeyValue
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
Definition: FWConfiguration.cc:58
FWConfiguration
Definition: FWConfiguration.h:31