CMS 3D CMS Logo

FWNumberEntry.cc
Go to the documentation of this file.
2 
3 #include <cstdlib>
4 
5 //------------------------------FWNumberEntryField------------------------------//
6 
7 //______________________________________________________________________________
9  const TGWindow* p, Int_t id, Double_t val, GContext_t norm, FontStruct_t font, UInt_t option, ULong_t back)
10  : TGNumberEntryField(p, id, val, norm, font, option, back) {
11  // Constructs a number entry field.
12 }
13 
14 //______________________________________________________________________________
16  Int_t id,
17  Double_t val,
18  EStyle style,
19  EAttribute attr,
20  ELimit limits,
21  Double_t min,
22  Double_t max)
23  : TGNumberEntryField(parent, id, val, style, attr, limits, min, max) {
24  // Constructs a number entry field.
25 }
26 
27 //------------------------------------------------------------------------------
28 
29 //______________________________________________________________________________
31  // Handle focus change.
32  // Avoid verification by TGNumberEntryField (which is f***ed).
33 
34  return TGTextEntry::HandleFocusChange(event);
35 }
36 
37 //______________________________________________________________________________
39  // Return was pressed.
40  // Avoid verification by TGNumberEntryField (which is f***ed).
41 
42  TGTextEntry::ReturnPressed();
43 }
44 
45 //------------------------------------------------------------------------------
46 
47 //______________________________________________________________________________
48 UInt_t FWNumberEntryField::GetUIntNumber() { return static_cast<UInt_t>(strtoul(GetText(), nullptr, 10)); }
49 
50 //______________________________________________________________________________
51 void FWNumberEntryField::SetUIntNumber(UInt_t n) { SetText(Form("%u", n), kFALSE); }
52 
53 //______________________________________________________________________________
54 ULong64_t FWNumberEntryField::GetULong64Number() { return static_cast<ULong64_t>(strtoull(GetText(), nullptr, 10)); }
55 
56 //______________________________________________________________________________
57 void FWNumberEntryField::SetULong64Number(ULong64_t n) { SetText(Form("%llu", n), kFALSE); }
FWNumberEntry.h
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
FWNumberEntryField::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())
min
T min(T a, T b)
Definition: MathUtil.h:58
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FWNumberEntryField::ReturnPressed
void ReturnPressed() override
Definition: FWNumberEntry.cc:38
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
style
Definition: style.py:1
FWNumberEntryField::GetUIntNumber
virtual UInt_t GetUIntNumber()
Definition: FWNumberEntry.cc:48
FWNumberEntryField::GetULong64Number
virtual ULong64_t GetULong64Number()
Definition: FWNumberEntry.cc:54
FWNumberEntryField::HandleFocusChange
Bool_t HandleFocusChange(Event_t *event) override
Definition: FWNumberEntry.cc:30
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
FWNumberEntryField::SetUIntNumber
virtual void SetUIntNumber(UInt_t n)
Definition: FWNumberEntry.cc:51
TH2PolyOfflineMaps.limits
limits
Definition: TH2PolyOfflineMaps.py:45
heppy_batch.val
val
Definition: heppy_batch.py:351
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
FWNumberEntryField::SetULong64Number
virtual void SetULong64Number(ULong64_t n)
Definition: FWNumberEntry.cc:57
event
Definition: event.py:1
class-composition.parent
parent
Definition: class-composition.py:88