qmca  0.0.20
Public Slots | Public Member Functions | Private Attributes | List of all members
EpicsPulseAnalyser Class Reference

#include <epicspulseanalyser.h>

Inheritance diagram for EpicsPulseAnalyser:
Inheritance graph

Public Slots

void setLowerLevel (int chan, double lowerlevel)
 
void setUpperLevel (int chan, double upperlevel)
 
void setEnabled (int enbl)
 
void setSelected (int slct)
 
void setGated (int chan, int gtd)
 
- Public Slots inherited from EpicsString
void changeValue (QString val)
 
void caput (QString val)
 

Public Member Functions

 EpicsPulseAnalyser (QString pvName, QObject *parent=0)
 
virtual ~EpicsPulseAnalyser ()
 
int channelCount ()
 
EpicsDoublelowerLevel (int chan)
 
EpicsDoubleupperLevel (int chan)
 
EpicsIntegerenabled ()
 
EpicsIntegerselected ()
 
EpicsIntegergated (int chan)
 
- Public Member Functions inherited from EpicsString
 EpicsString (QString pvName, QObject *parent=0, int debug=0)
 
virtual ~EpicsString ()
 
void changeConnection (QString pv)
 
QString value ()
 
- Public Member Functions inherited from EpicsObject
 EpicsObject (QString pvName, QObject *parent=0, int debug=0)
 
virtual ~EpicsObject ()
 
void changeConnection (QString pv)
 
int count ()
 
QString pvName ()
 
QString toolTip ()
 
virtual void connected ()
 
virtual void disconnected ()
 
chid channelID ()
 
int debug ()
 
void setDebug (int dbg)
 
void settle (double t)
 
void ca_pend_io (double t)
 

Private Attributes

int m_ChannelCount
 
QList< EpicsDouble * > m_LowerLevels
 
QList< EpicsDouble * > m_UpperLevels
 
EpicsInteger m_Enabled
 
EpicsInteger m_Selected
 
QList< EpicsInteger * > m_Gated
 

Additional Inherited Members

- Signals inherited from EpicsString
void valueChanged (QString)
 
- Signals inherited from EpicsObject
void valueChanged ()
 
- Static Public Attributes inherited from EpicsObject
static QMutex m_Mutex
 
- Protected Attributes inherited from EpicsObject
chid m_ChannelID
 
evid m_EventID
 
bool m_HasEventHandler
 
int m_Debug
 

Detailed Description

Definition at line 10 of file epicspulseanalyser.h.

Constructor & Destructor Documentation

EpicsPulseAnalyser::EpicsPulseAnalyser ( QString  pvName,
QObject *  parent = 0 
)

Definition at line 3 of file epicspulseanalyser.cpp.

References m_ChannelCount, m_Gated, m_LowerLevels, and m_UpperLevels.

4  : EpicsString(pvName+QString("STATUS"), parent),
6  m_Enabled(pvName+"SCA_ENABLE"),
7  m_Selected(pvName+"TCA_SELECT")
8 {
9  for (int i = 1; i <= m_ChannelCount; i++) {
10  m_LowerLevels.append(new EpicsDouble(pvName+QString("SCA%1_LOW").arg(i)));
11  m_UpperLevels.append(new EpicsDouble(pvName+QString("SCA%1_HI").arg(i)));
12  m_Gated.append(new EpicsInteger(pvName+QString("SCA%1_GATE").arg(i)));
13  }
14 }
QList< EpicsDouble * > m_LowerLevels
EpicsString(QString pvName, QObject *parent=0, int debug=0)
Definition: epicsstring.cpp:5
QString pvName()
Definition: epicsobject.cpp:30
QList< EpicsDouble * > m_UpperLevels
QList< EpicsInteger * > m_Gated
EpicsPulseAnalyser::~EpicsPulseAnalyser ( )
virtual

Definition at line 16 of file epicspulseanalyser.cpp.

References m_Gated, m_LowerLevels, and m_UpperLevels.

17 {
18  while (!m_LowerLevels.isEmpty()) {
19  delete m_LowerLevels.takeFirst();
20  }
21 
22  while (!m_UpperLevels.isEmpty()) {
23  delete m_UpperLevels.takeFirst();
24  }
25 
26  while (!m_Gated.isEmpty()) {
27  delete m_Gated.takeFirst();
28  }
29 }
QList< EpicsDouble * > m_LowerLevels
QList< EpicsDouble * > m_UpperLevels
QList< EpicsInteger * > m_Gated

Member Function Documentation

int EpicsPulseAnalyser::channelCount ( )
EpicsInteger * EpicsPulseAnalyser::enabled ( )

Definition at line 83 of file epicspulseanalyser.cpp.

References m_Enabled.

84 {
85  return &m_Enabled;
86 }
EpicsInteger * EpicsPulseAnalyser::gated ( int  chan)

Definition at line 93 of file epicspulseanalyser.cpp.

References m_Gated.

Referenced by setGated().

94 {
95  return m_Gated.value(chan);
96 }
QList< EpicsInteger * > m_Gated
EpicsDouble * EpicsPulseAnalyser::lowerLevel ( int  chan)

Definition at line 73 of file epicspulseanalyser.cpp.

References m_LowerLevels.

Referenced by PulseAnalyserControlPanel::append(), BM12ControlPanel::BM12ControlPanel(), BM12Controller::saveEnergyWindows(), and setLowerLevel().

74 {
75  return m_LowerLevels.value(chan);
76 }
QList< EpicsDouble * > m_LowerLevels
EpicsInteger * EpicsPulseAnalyser::selected ( )

Definition at line 88 of file epicspulseanalyser.cpp.

References m_Selected.

89 {
90  return &m_Selected;
91 }
void EpicsPulseAnalyser::setEnabled ( int  enbl)
slot

Definition at line 49 of file epicspulseanalyser.cpp.

References EpicsInteger::caput(), and m_Enabled.

50 {
51  m_Enabled.caput(enbl);
52 }
void caput(int val)
void EpicsPulseAnalyser::setGated ( int  chan,
int  gtd 
)
slot

Definition at line 59 of file epicspulseanalyser.cpp.

References EpicsString::caput(), and gated().

Referenced by BM12Controller::selectSCA().

60 {
61  EpicsInteger* g = gated(chan);
62 
63  if (g) {
64  g -> caput(gtd);
65  }
66 }
EpicsInteger * gated(int chan)
void caput(QString val)
Definition: epicsstring.cpp:71
void EpicsPulseAnalyser::setLowerLevel ( int  chan,
double  lowerlevel 
)
slot

Definition at line 31 of file epicspulseanalyser.cpp.

References EpicsString::caput(), and lowerLevel().

Referenced by BM12Controller::loadEnergyWindows().

32 {
33  EpicsDouble *l = lowerLevel(chan);
34 
35  if (l) {
36  l -> caput(lowerlevel);
37  }
38 }
EpicsDouble * lowerLevel(int chan)
void caput(QString val)
Definition: epicsstring.cpp:71
void EpicsPulseAnalyser::setSelected ( int  slct)
slot

Definition at line 54 of file epicspulseanalyser.cpp.

References EpicsInteger::caput(), and m_Selected.

Referenced by BM12Controller::selectSCA().

55 {
56  m_Selected.caput(slct);
57 }
void caput(int val)
void EpicsPulseAnalyser::setUpperLevel ( int  chan,
double  upperlevel 
)
slot

Definition at line 40 of file epicspulseanalyser.cpp.

References EpicsString::caput(), and upperLevel().

Referenced by BM12Controller::loadEnergyWindows().

41 {
42  EpicsDouble *u = upperLevel(chan);
43 
44  if (u) {
45  u -> caput(upperlevel);
46  }
47 }
EpicsDouble * upperLevel(int chan)
void caput(QString val)
Definition: epicsstring.cpp:71
EpicsDouble * EpicsPulseAnalyser::upperLevel ( int  chan)

Definition at line 78 of file epicspulseanalyser.cpp.

References m_UpperLevels.

Referenced by PulseAnalyserControlPanel::append(), BM12ControlPanel::BM12ControlPanel(), BM12Controller::saveEnergyWindows(), and setUpperLevel().

79 {
80  return m_UpperLevels.value(chan);
81 }
QList< EpicsDouble * > m_UpperLevels

Member Data Documentation

int EpicsPulseAnalyser::m_ChannelCount
private

Definition at line 34 of file epicspulseanalyser.h.

Referenced by channelCount(), and EpicsPulseAnalyser().

EpicsInteger EpicsPulseAnalyser::m_Enabled
private

Definition at line 38 of file epicspulseanalyser.h.

Referenced by enabled(), and setEnabled().

QList<EpicsInteger*> EpicsPulseAnalyser::m_Gated
private

Definition at line 40 of file epicspulseanalyser.h.

Referenced by EpicsPulseAnalyser(), gated(), and ~EpicsPulseAnalyser().

QList<EpicsDouble*> EpicsPulseAnalyser::m_LowerLevels
private

Definition at line 35 of file epicspulseanalyser.h.

Referenced by EpicsPulseAnalyser(), lowerLevel(), and ~EpicsPulseAnalyser().

EpicsInteger EpicsPulseAnalyser::m_Selected
private

Definition at line 39 of file epicspulseanalyser.h.

Referenced by selected(), and setSelected().

QList<EpicsDouble*> EpicsPulseAnalyser::m_UpperLevels
private

Definition at line 36 of file epicspulseanalyser.h.

Referenced by EpicsPulseAnalyser(), upperLevel(), and ~EpicsPulseAnalyser().


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