Public Member Functions | Private Attributes | List of all members
om::HistogramInfo Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/OnlineMonitoring/viewer/HistogramInfo.h"

Inheritance diagram for om::HistogramInfo:
om::GUIModelSubscriber

Public Member Functions

 HistogramInfo (TGWindow *w)
 
 ~HistogramInfo ()
 
void GUIModelDataIssue (const GUIModelData &d, unsigned int which)
 
bool GetLock ()
 
void ReleaseLock ()
 

Private Attributes

std::string fBuffer
 The text insider the buffer. More...
 
TGText * fText
 The text inside the box. More...
 

Detailed Description

Definition at line 9 of file HistogramInfo.h.

Constructor & Destructor Documentation

HistogramInfo::HistogramInfo ( TGWindow *  w)

Definition at line 9 of file HistogramInfo.cxx.

References MakeMiniprodValidationCuts::f, and fText.

9  :
10  TGTextView(w,
14 {
15  fText = new TGText("Click on plot for histogram data");
16  TGFont* f =
17  gClient->GetFont("-adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1");
18  this->SetFont(f->GetFontStruct());
19 }
GUIModelSubscriber(unsigned int which)
static const unsigned int kHistogramInfoTextID
Definition: GUIModelData.h:16
TGText * fText
The text inside the box.
Definition: HistogramInfo.h:21
static const unsigned int fHistogramInfoSizeY
Definition: Layout.h:34
static const unsigned int fPlotViewerSizeX
Definition: Layout.h:36
Float_t w
Definition: plot.C:20
HistogramInfo::~HistogramInfo ( )

Definition at line 23 of file HistogramInfo.cxx.

References fText.

24 {
25  delete fText;
26 }
TGText * fText
The text inside the box.
Definition: HistogramInfo.h:21

Member Function Documentation

bool GUIModelSubscriber::GetLock ( )
inherited

Definition at line 24 of file GUIModelSubscriber.cxx.

References gsLock, MECModelEnuComparisons::i, and kSleep.

Referenced by om::CaptionBox::GUIModelDataIssue(), GUIModelDataIssue(), om::ButtonBank::GUIModelDataIssue(), om::HistogramBrowser::GUIModelDataIssue(), om::PlotViewer::GUIModelDataIssue(), and om::WatchListBox::GUIModelDataIssue().

25 {
26  unsigned int i;
27  const unsigned int kSleep = 1000; // 1 msec
28  const unsigned int kCount = 10000; // 10k tries at 1 msec = 10 seconds
29  for (i=0; i<kCount; ++i) {
30  if (gsLock==false) {
31  gsLock = true;
32  return true;
33  }
34  usleep(kSleep);
35  }
36  return false;
37 }
static bool gsLock
static const unsigned int kSleep
Definition: IPC.cxx:21
void HistogramInfo::GUIModelDataIssue ( const GUIModelData d,
unsigned int  which 
)
virtual

Complete the GUIModelSubscriber interface

Implements om::GUIModelSubscriber.

Definition at line 30 of file HistogramInfo.cxx.

References fBuffer, om::GUIModelData::fHistogramInfoText, om::GUIModelSubscriber::GetLock(), om::kHistogramInfoTextID, and om::GUIModelSubscriber::ReleaseLock().

32 {
33  if (this->GetLock()==false) return;
34 
35  if ((which&kHistogramInfoTextID)==0) {
36  this->ReleaseLock();
37  return;
38  }
39 
40  if (fBuffer == d.fHistogramInfoText) {
41  this->ReleaseLock();
42  return;
43  }
45  this->LoadBuffer(fBuffer.c_str());
46 
47  this->ReleaseLock();
48 }
static const unsigned int kHistogramInfoTextID
Definition: GUIModelData.h:16
std::string fHistogramInfoText
Definition: GUIModelData.h:36
std::string fBuffer
The text insider the buffer.
Definition: HistogramInfo.h:20
void GUIModelSubscriber::ReleaseLock ( )
inherited

Member Data Documentation

std::string om::HistogramInfo::fBuffer
private

The text insider the buffer.

Definition at line 20 of file HistogramInfo.h.

Referenced by GUIModelDataIssue().

TGText* om::HistogramInfo::fText
private

The text inside the box.

Definition at line 21 of file HistogramInfo.h.

Referenced by HistogramInfo(), and ~HistogramInfo().


The documentation for this class was generated from the following files: