CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions
FWNumberEntryField Class Reference

#include <FWNumberEntry.h>

Inheritance diagram for FWNumberEntryField:

Public Member Functions

 ClassDefOverride (FWNumberEntryField, 0)
 
 FWNumberEntryField (const TGWindow *p, Int_t id, Double_t val, GContext_t norm, FontStruct_t font=GetDefaultFontStruct(), UInt_t option=kSunkenFrame|kDoubleBorder, Pixel_t back=GetWhitePixel())
 
 FWNumberEntryField (const TGWindow *parent=nullptr, Int_t id=-1, Double_t val=0, EStyle style=kNESReal, EAttribute attr=kNEAAnyNumber, ELimit limits=kNELNoLimits, Double_t min=0, Double_t max=1)
 
virtual UInt_t GetUIntNumber ()
 
virtual ULong64_t GetULong64Number ()
 
Bool_t HandleFocusChange (Event_t *event) override
 
void ReturnPressed () override
 
virtual void SetUIntNumber (UInt_t n)
 
virtual void SetULong64Number (ULong64_t n)
 
 ~FWNumberEntryField () override
 

Detailed Description

Definition at line 8 of file FWNumberEntry.h.

Constructor & Destructor Documentation

◆ FWNumberEntryField() [1/2]

FWNumberEntryField::FWNumberEntryField ( const TGWindow *  p,
Int_t  id,
Double_t  val,
GContext_t  norm,
FontStruct_t  font = GetDefaultFontStruct(),
UInt_t  option = kSunkenFrame|kDoubleBorder,
Pixel_t  back = GetWhitePixel() 
)

◆ FWNumberEntryField() [2/2]

FWNumberEntryField::FWNumberEntryField ( const TGWindow *  parent = nullptr,
Int_t  id = -1,
Double_t  val = 0,
EStyle  style = kNESReal,
EAttribute  attr = kNEAAnyNumber,
ELimit  limits = kNELNoLimits,
Double_t  min = 0,
Double_t  max = 1 
)

Definition at line 15 of file FWNumberEntry.cc.

23  : TGNumberEntryField(parent, id, val, style, attr, limits, min, max) {
24  // Constructs a number entry field.
25 }

◆ ~FWNumberEntryField()

FWNumberEntryField::~FWNumberEntryField ( )
inlineoverride

Definition at line 27 of file FWNumberEntry.h.

27 {}

Member Function Documentation

◆ ClassDefOverride()

FWNumberEntryField::ClassDefOverride ( FWNumberEntryField  ,
 
)

◆ GetUIntNumber()

UInt_t FWNumberEntryField::GetUIntNumber ( )
virtual

Definition at line 48 of file FWNumberEntry.cc.

48 { return static_cast<UInt_t>(strtoul(GetText(), nullptr, 10)); }

Referenced by FWGUIManager::eventIdChanged(), FWGUIManager::lumiIdChanged(), and FWGUIManager::runIdChanged().

◆ GetULong64Number()

ULong64_t FWNumberEntryField::GetULong64Number ( )
virtual

Definition at line 54 of file FWNumberEntry.cc.

54 { return static_cast<ULong64_t>(strtoull(GetText(), nullptr, 10)); }

Referenced by FWGUIManager::eventIdChanged().

◆ HandleFocusChange()

Bool_t FWNumberEntryField::HandleFocusChange ( Event_t *  event)
override

Definition at line 30 of file FWNumberEntry.cc.

30  {
31  // Handle focus change.
32  // Avoid verification by TGNumberEntryField (which is f***ed).
33 
34  return TGTextEntry::HandleFocusChange(event);
35 }

◆ ReturnPressed()

void FWNumberEntryField::ReturnPressed ( )
override

Definition at line 38 of file FWNumberEntry.cc.

38  {
39  // Return was pressed.
40  // Avoid verification by TGNumberEntryField (which is f***ed).
41 
42  TGTextEntry::ReturnPressed();
43 }

◆ SetUIntNumber()

void FWNumberEntryField::SetUIntNumber ( UInt_t  n)
virtual

Definition at line 51 of file FWNumberEntry.cc.

51 { SetText(Form("%u", n), kFALSE); }

References dqmiodumpmetadata::n.

Referenced by CmsShowMainFrame::loadEvent(), FWGUIManager::lumiIdChanged(), and FWGUIManager::runIdChanged().

◆ SetULong64Number()

void FWNumberEntryField::SetULong64Number ( ULong64_t  n)
virtual

Definition at line 57 of file FWNumberEntry.cc.

57 { SetText(Form("%llu", n), kFALSE); }

References dqmiodumpmetadata::n.

Referenced by FWGUIManager::eventIdChanged(), and CmsShowMainFrame::loadEvent().

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
min
T min(T a, T b)
Definition: MathUtil.h:58
style
Definition: style.py:1
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TH2PolyOfflineMaps.limits
limits
Definition: TH2PolyOfflineMaps.py:44
heppy_batch.val
val
Definition: heppy_batch.py:351
event
Definition: event.py:1
class-composition.parent
parent
Definition: class-composition.py:98