QXRD  0.11.16
Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Protected Attributes | Properties | Private Attributes | List of all members
QxrdDetector Class Reference

#include <qxrddetector.h>

Inheritance diagram for QxrdDetector:
Inheritance graph
[legend]
Collaboration diagram for QxrdDetector:
Collaboration graph
[legend]

Public Types

enum  { FileIndexScaler, FilePhaseScaler, ExtraScalers }
 

Public Slots

bool isEnabled ()
 
bool checkDetectorEnabled ()
 
virtual void startDetector ()
 
virtual void stopDetector ()
 
virtual void onExposureTimeChanged ()
 
virtual void beginAcquisition (double exposure)
 
virtual void endAcquisition ()
 
virtual void shutdownAcquisition ()
 
void openControlWindow ()
 
QxrdDetectorProcessorPtr processor ()
 
void startOrStop (bool enabled)
 
virtual void beginFrame ()
 
virtual QcepImageDataBasePtr acquireFrameIfAvailable ()
 
virtual QcepImageDataBasePtr acquireFrame ()
 
int roiCount ()
 
QxrdROICoordinatesPtr roi (int i)
 
QcepDoubleVector scalerCounts ()
 
double scalerCounts (int chan)
 
- Public Slots inherited from QcepObject
virtual void printLine (QString line)
 
virtual QString settingsScript ()
 
QString scriptValueLiteral (QVariant v)
 

Public Member Functions

 QxrdDetector (QcepSettingsSaverWPtr saver, QxrdExperimentWPtr expt, QxrdAcquisitionWPtr acq, int detType, int detNum, QcepObject *parent)
 
void initialize ()
 
virtual ~QxrdDetector ()
 
QxrdExperimentWPtr experiment ()
 
QxrdAcquisitionWPtr acquisition ()
 
virtual void pushPropertiesToProxy (QxrdDetectorProxyPtr proxy)
 
virtual void pullPropertiesfromProxy (QxrdDetectorProxyPtr proxy)
 
void printMessage (QString msg, QDateTime ts=QDateTime::currentDateTime()) const
 
void criticalMessage (QString msg, QDateTime ts=QDateTime::currentDateTime()) const
 
void statusMessage (QString msg, QDateTime ts=QDateTime::currentDateTime()) const
 
void readSettings (QSettings *settings, QString section)
 
void writeSettings (QSettings *settings, QString section)
 
void enqueueAcquiredFrame (QcepImageDataBasePtr img)
 
- Public Member Functions inherited from QcepObject
 QcepObject (QString name, QcepObject *parent)
 
virtual ~QcepObject ()
 
QString get_Name () const
 
void set_Name (QString name)
 

Static Public Member Functions

static QScriptValue toScriptValue (QScriptEngine *engine, const QxrdDetectorPtr &det)
 
static void fromScriptValue (const QScriptValue &obj, QxrdDetectorPtr &det)
 
static void pushDefaultsToProxy (QxrdDetectorProxyPtr proxy, int detType)
 
- Static Public Member Functions inherited from QcepObject
static int allocatedObjects ()
 
static int deletedObjects ()
 
static QSet< QcepObject * > allocatedObjectsSet ()
 
static QString addSlashes (QString str)
 

Protected Attributes

QcepSettingsSaverWPtr m_Saver
 
QxrdExperimentWPtr m_Experiment
 
QxrdAcquisitionWPtr m_Acquisition
 
QxrdDetectorProcessorPtr m_Processor
 
QxrdDetectorControlWindowPtr m_DetectorControlWindow
 

Properties

int detectorNumber
 
int detectorType
 
QString detectorTypeName
 
bool enabled
 
QString detectorName
 
int nCols
 
int nRows
 
int hBinning
 
int vBinning
 
QString extension
 
- Properties inherited from QcepObject
QString name
 

Private Attributes

QMutex m_Mutex
 
QSemaphore m_NAcquiredImages
 
QcepImageBaseQueue m_AcquiredImages
 

Detailed Description

Definition at line 21 of file qxrddetector.h.

Member Enumeration Documentation

anonymous enum
Enumerator
FileIndexScaler 
FilePhaseScaler 
ExtraScalers 

Definition at line 55 of file qxrddetector.h.

Constructor & Destructor Documentation

QxrdDetector::QxrdDetector ( QcepSettingsSaverWPtr  saver,
QxrdExperimentWPtr  expt,
QxrdAcquisitionWPtr  acq,
int  detType,
int  detNum,
QcepObject parent 
)
explicit

Definition at line 14 of file qxrddetector.cpp.

References DEBUG_CONSTRUCTORS, and qcepDebug().

19  :
20  QcepObject("detector", parent),
21  m_Saver(saver),
22  m_Experiment(expt),
23  m_Acquisition(acq),
24  m_Processor(),
27  m_AcquiredImages("acquired"),
28  m_DetectorNumber(QcepSettingsSaverWPtr(), this, "detectorNumber", detNum, "Detector Number"),
29  m_DetectorType(saver, this, "detectorType", detType, "Detector Type"),
30  m_DetectorTypeName(QcepSettingsSaverWPtr(), this, "detectorTypeName", QxrdDetectorThread::detectorTypeName(detType), "Detector Type Name"),
31  m_Enabled(saver, this, "enabled", true, "Is Detector Enabled?"),
32  m_DetectorName(saver, this, "detectorName", QxrdDetectorThread::detectorTypeName(detType), "Detector Name"),
33  m_NCols(QcepSettingsSaverWPtr(), this, "nCols", 0, "No of detector cols"),
34  m_NRows(QcepSettingsSaverWPtr(), this, "nRows", 0, "No of detector rows"),
35  m_HBinning(QcepSettingsSaverWPtr(), this, "hBinning", 0, "Horiz Binning"),
36  m_VBinning(QcepSettingsSaverWPtr(), this, "vBinning", 0, "Vert Binning"),
37  m_Extension(saver, this, "extension", "tif", "File extension")
38 {
40  printf("QxrdDetector::QxrdDetector(%p)\n", this);
41  }
42 }
QxrdExperimentWPtr m_Experiment
Definition: qxrddetector.h:93
QcepImageBaseQueue m_AcquiredImages
Definition: qxrddetector.h:101
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QxrdAcquisitionWPtr m_Acquisition
Definition: qxrddetector.h:94
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
QcepSettingsSaverWPtr m_Saver
Definition: qxrddetector.h:92
QcepObject(QString name, QcepObject *parent)
Definition: qcepobject.cpp:16
QxrdDetectorControlWindowPtr m_DetectorControlWindow
Definition: qxrddetector.h:96
static QString detectorTypeName(int detectorType)
QSemaphore m_NAcquiredImages
Definition: qxrddetector.h:100
QWeakPointer< QcepSettingsSaver > QcepSettingsSaverWPtr

Here is the call graph for this function:

QxrdDetector::~QxrdDetector ( )
virtual

Definition at line 65 of file qxrddetector.cpp.

References DEBUG_CONSTRUCTORS, and qcepDebug().

66 {
68  printf("QxrdDetector::~QxrdDetector(%p)\n", this);
69  }
70 
71 // if (m_DetectorControlWindow) {
72 // m_DetectorControlWindow->deleteLater();
73 // }
74 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26

Here is the call graph for this function:

Member Function Documentation

QcepImageDataBasePtr QxrdDetector::acquireFrame ( )
virtualslot

Definition at line 309 of file qxrddetector.cpp.

References QcepImageQueue< T >::dequeue(), m_AcquiredImages, m_Acquisition, and m_NAcquiredImages.

Referenced by acquireFrameIfAvailable().

310 {
312 
313  if (acq) {
314  while (1) {
315  if (m_NAcquiredImages.tryAcquire(1, 100)) {
316  return m_AcquiredImages.dequeue();
317  } else if (acq->get_Cancelling()) {
318  return QcepImageDataBasePtr();
319  }
320  }
321  }
322 
323  return QcepImageDataBasePtr();
324 }
QcepImageBaseQueue m_AcquiredImages
Definition: qxrddetector.h:101
QSharedPointer< QxrdAcquisition > QxrdAcquisitionPtr
QxrdAcquisitionWPtr m_Acquisition
Definition: qxrddetector.h:94
QSharedPointer< T > dequeue()
QSharedPointer< QcepImageDataBase > QcepImageDataBasePtr
QSemaphore m_NAcquiredImages
Definition: qxrddetector.h:100

Here is the call graph for this function:

Here is the caller graph for this function:

QcepImageDataBasePtr QxrdDetector::acquireFrameIfAvailable ( )
virtualslot

Definition at line 326 of file qxrddetector.cpp.

References acquireFrame(), and m_NAcquiredImages.

327 {
329 
330  while (m_NAcquiredImages.available() >= 1) {
331  res = acquireFrame();
332  }
333 
334  return res;
335 }
virtual QcepImageDataBasePtr acquireFrame()
QSharedPointer< QcepImageDataBase > QcepImageDataBasePtr
QSemaphore m_NAcquiredImages
Definition: qxrddetector.h:100

Here is the call graph for this function:

QxrdAcquisitionWPtr QxrdDetector::acquisition ( )

Definition at line 81 of file qxrddetector.cpp.

References m_Acquisition.

82 {
83  return m_Acquisition;
84 }
QxrdAcquisitionWPtr m_Acquisition
Definition: qxrddetector.h:94
void QxrdDetector::beginAcquisition ( double  exposure)
virtualslot

Reimplemented in QxrdDetectorPerkinElmer, and QxrdDetectorSimulated.

Definition at line 206 of file qxrddetector.cpp.

Referenced by QxrdDetectorPilatus::beginAcquisition(), QxrdDetectorSimulated::beginAcquisition(), and QxrdDetectorPerkinElmer::beginAcquisition().

207 {
208 }

Here is the caller graph for this function:

void QxrdDetector::beginFrame ( )
virtualslot

Definition at line 305 of file qxrddetector.cpp.

Referenced by QxrdDetectorPilatus::beginFrame().

306 {
307 }

Here is the caller graph for this function:

bool QxrdDetector::checkDetectorEnabled ( )
slot

Definition at line 184 of file qxrddetector.cpp.

References criticalMessage(), and isEnabled().

Referenced by QxrdDetectorPilatus::imagePath(), QxrdDetectorPerkinElmer::onEndFrame(), QxrdDetectorPerkinElmer::onEndFrameCallback(), QxrdDetectorSimulated::onTimerTimeout(), QxrdDetectorSimulated::startDetector(), QxrdDetectorPerkinElmer::startDetector(), and QxrdDetectorPerkinElmer::startupAcquisition().

185 {
186  if (isEnabled()) {
187  return true;
188  } else {
189  criticalMessage("Attempt to use disabled detector");
190  return false;
191  }
192 }
void criticalMessage(QString msg, QDateTime ts=QDateTime::currentDateTime()) const

Here is the call graph for this function:

Here is the caller graph for this function:

void QxrdDetector::criticalMessage ( QString  msg,
QDateTime  ts = QDateTime::currentDateTime() 
) const
virtual

Reimplemented from QcepObject.

Definition at line 130 of file qxrddetector.cpp.

References m_Experiment.

Referenced by QxrdDetectorPerkinElmer::acquisitionError(), QxrdDetectorPerkinElmer::acquisitionInitError(), QxrdDetectorPerkinElmer::acquisitionNSensorsError(), checkDetectorEnabled(), QxrdDetectorPerkinElmer::checkPluginAvailable(), QxrdDetectorPilatus::interpretReply(), and QxrdDetectorPerkinElmer::startDetector().

131 {
133 
134  if (exp) {
135  exp->criticalMessage(msg);
136  }
137 }
QSharedPointer< QxrdExperiment > QxrdExperimentPtr
QxrdExperimentWPtr m_Experiment
Definition: qxrddetector.h:93

Here is the caller graph for this function:

void QxrdDetector::endAcquisition ( )
virtualslot

Reimplemented in QxrdDetectorPerkinElmer, and QxrdDetectorSimulated.

Definition at line 210 of file qxrddetector.cpp.

Referenced by QxrdDetectorPilatus::endAcquisition(), QxrdDetectorSimulated::endAcquisition(), and QxrdDetectorPerkinElmer::endAcquisition().

211 {
212 }

Here is the caller graph for this function:

void QxrdDetector::enqueueAcquiredFrame ( QcepImageDataBasePtr  img)

Definition at line 298 of file qxrddetector.cpp.

References QcepImageQueue< T >::enqueue(), m_AcquiredImages, and m_NAcquiredImages.

Referenced by QxrdDetectorPilatus::interpretReply(), QxrdDetectorPilatus::loadAndPush(), QxrdDetectorPerkinElmer::onEndFrame(), and QxrdDetectorSimulated::onTimerTimeout().

299 {
301 
302  m_NAcquiredImages.release(1);
303 }
QcepImageBaseQueue m_AcquiredImages
Definition: qxrddetector.h:101
void enqueue(QSharedPointer< T > data)
QSemaphore m_NAcquiredImages
Definition: qxrddetector.h:100

Here is the call graph for this function:

Here is the caller graph for this function:

QxrdExperimentWPtr QxrdDetector::experiment ( )

Definition at line 76 of file qxrddetector.cpp.

References m_Experiment.

77 {
78  return m_Experiment;
79 }
QxrdExperimentWPtr m_Experiment
Definition: qxrddetector.h:93
void QxrdDetector::fromScriptValue ( const QScriptValue &  obj,
QxrdDetectorPtr det 
)
static

Definition at line 223 of file qxrddetector.cpp.

224 {
225  QObject *qobj = obj.toQObject();
226 
227  if (qobj) {
228  QxrdDetector *qdet = qobject_cast<QxrdDetector*>(qobj);
229 
230  if (qdet) {
231  det = QxrdDetectorPtr(qdet);
232  }
233  }
234 }
QSharedPointer< QxrdDetector > QxrdDetectorPtr
void QxrdDetector::initialize ( )

Definition at line 44 of file qxrddetector.cpp.

References QxrdAcquisition::detectorStateChanged(), m_Acquisition, m_Experiment, m_Processor, m_Saver, startOrStop(), and QcepBoolProperty::valueChanged().

45 {
46  connect(prop_Enabled(), &QcepBoolProperty::valueChanged,
48 
50 
51  if (exper) {
52  m_Processor =
54  new QxrdDetectorProcessor(m_Saver, m_Experiment, exper->fileSaver(), sharedFromThis()));
55  }
56 
58 
59  if (a) {
60  connect(prop_Enabled(), &QcepBoolProperty::valueChanged,
62  }
63 }
QSharedPointer< QxrdExperiment > QxrdExperimentPtr
QxrdExperimentWPtr m_Experiment
Definition: qxrddetector.h:93
QSharedPointer< QxrdAcquisition > QxrdAcquisitionPtr
void detectorStateChanged()
QxrdAcquisitionWPtr m_Acquisition
Definition: qxrddetector.h:94
void startOrStop(bool enabled)
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
QcepSettingsSaverWPtr m_Saver
Definition: qxrddetector.h:92
QSharedPointer< QxrdDetectorProcessor > QxrdDetectorProcessorPtr
void valueChanged(bool val, int index)

Here is the call graph for this function:

bool QxrdDetector::isEnabled ( )
slot
void QxrdDetector::onExposureTimeChanged ( )
virtualslot

Definition at line 202 of file qxrddetector.cpp.

203 {
204 }
void QxrdDetector::openControlWindow ( )
slot

Definition at line 272 of file qxrddetector.cpp.

References GUI_THREAD_CHECK, m_Acquisition, m_DetectorControlWindow, m_Experiment, m_Processor, and m_Saver.

273 {
275 
276  if (m_DetectorControlWindow == NULL) {
280  m_Experiment,
282  sharedFromThis(),
283  m_Processor, NULL), &QObject::deleteLater);
284 
286 
287  if (dp) {
288  dp->setControlWindow(m_DetectorControlWindow);
289  }
290  }
291 
293  m_DetectorControlWindow->show();
294  m_DetectorControlWindow->raise();
295  }
296 }
QSharedPointer< QxrdDetectorControlWindow > QxrdDetectorControlWindowPtr
QxrdExperimentWPtr m_Experiment
Definition: qxrddetector.h:93
#define GUI_THREAD_CHECK
Definition: qcepmacros.h:10
QxrdAcquisitionWPtr m_Acquisition
Definition: qxrddetector.h:94
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
QcepSettingsSaverWPtr m_Saver
Definition: qxrddetector.h:92
QSharedPointer< QxrdDetectorProcessor > QxrdDetectorProcessorPtr
QxrdDetectorControlWindowPtr m_DetectorControlWindow
Definition: qxrddetector.h:96
void QxrdDetector::printMessage ( QString  msg,
QDateTime  ts = QDateTime::currentDateTime() 
) const
virtual
QxrdDetectorProcessorPtr QxrdDetector::processor ( )
slot

Definition at line 86 of file qxrddetector.cpp.

References m_Processor.

87 {
88  return m_Processor;
89 }
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
void QxrdDetector::pullPropertiesfromProxy ( QxrdDetectorProxyPtr  proxy)
virtual

Reimplemented in QxrdDetectorPerkinElmer, QxrdDetectorPilatus, QxrdDetectorSimulated, and QxrdDetectorFileWatcher.

Definition at line 262 of file qxrddetector.cpp.

Referenced by QxrdDetectorFileWatcher::pullPropertiesfromProxy(), QxrdDetectorSimulated::pullPropertiesfromProxy(), QxrdDetectorPilatus::pullPropertiesfromProxy(), and QxrdDetectorPerkinElmer::pullPropertiesfromProxy().

263 {
264  if (proxy) {
265  set_Enabled(proxy->property("enabled").toBool());
266  set_DetectorNumber(proxy->property("detectorNumber").toInt());
267  set_DetectorName(proxy->property("detectorName").toString());
268 // set_Extension(proxy->property("extension").toString());
269  }
270 }

Here is the caller graph for this function:

void QxrdDetector::pushDefaultsToProxy ( QxrdDetectorProxyPtr  proxy,
int  detType 
)
static

Definition at line 236 of file qxrddetector.cpp.

References QxrdDetectorProxy::BooleanProperty, QxrdDetectorProxy::DetectorNumberProperty, QxrdDetectorThread::detectorTypeName(), QxrdDetectorProxy::DetectorTypeProperty, and QxrdDetectorProxy::StringProperty.

Referenced by QxrdDetectorFileWatcher::pushDefaultsToProxy(), QxrdDetectorSimulated::pushDefaultsToProxy(), QxrdDetectorPilatus::pushDefaultsToProxy(), QxrdDetectorPerkinElmer::pushDefaultsToProxy(), and QxrdDetectorThread::pushDefaultsToProxy().

237 {
238  proxy->clearProperties();
239 
240  if (proxy) {
241  proxy->pushProperty(QxrdDetectorProxy::DetectorNumberProperty, "detectorNumber", "Detector Number", -1);
242  proxy->pushProperty(QxrdDetectorProxy::DetectorTypeProperty, "detectorType", "Detector Type", detType);
243  proxy->pushProperty(QxrdDetectorProxy::BooleanProperty, "enabled", "Detector Enabled?", true);
244  proxy->pushProperty(QxrdDetectorProxy::StringProperty, "detectorName", "Detector Name", "A " + QxrdDetectorThread::detectorTypeName(detType));
245 // proxy->pushProperty(QxrdDetectorProxy::ExtensionProperty, "extension", "File extension", "tif");
246  }
247 }
static QString detectorTypeName(int detectorType)

Here is the call graph for this function:

Here is the caller graph for this function:

void QxrdDetector::pushPropertiesToProxy ( QxrdDetectorProxyPtr  proxy)
virtual

Reimplemented in QxrdDetectorPerkinElmer, QxrdDetectorPilatus, QxrdDetectorSimulated, and QxrdDetectorFileWatcher.

Definition at line 249 of file qxrddetector.cpp.

References QxrdDetectorProxy::BooleanProperty, QxrdDetectorProxy::DetectorNumberProperty, QxrdDetectorProxy::DetectorTypeProperty, and QxrdDetectorProxy::StringProperty.

Referenced by QxrdDetectorFileWatcher::pushPropertiesToProxy(), QxrdDetectorSimulated::pushPropertiesToProxy(), QxrdDetectorPilatus::pushPropertiesToProxy(), and QxrdDetectorPerkinElmer::pushPropertiesToProxy().

250 {
251  proxy->clearProperties();
252 
253  if (proxy) {
254  proxy->pushProperty(QxrdDetectorProxy::DetectorNumberProperty, "detectorNumber", "Detector Number", get_DetectorNumber());
255  proxy->pushProperty(QxrdDetectorProxy::DetectorTypeProperty, "detectorType", "Detector Type", get_DetectorType());
256  proxy->pushProperty(QxrdDetectorProxy::BooleanProperty, "enabled", "Detector Enabled?", get_Enabled());
257  proxy->pushProperty(QxrdDetectorProxy::StringProperty, "detectorName", "Detector Name", get_DetectorName());
258 // proxy->pushProperty(QxrdDetectorProxy::ExtensionProperty, "extension", "File extension", get_Extension());
259  }
260 }

Here is the caller graph for this function:

void QxrdDetector::readSettings ( QSettings *  settings,
QString  section 
)
virtual

Reimplemented from QcepObject.

Definition at line 148 of file qxrddetector.cpp.

References m_Mutex, m_Processor, and QcepObject::readSettings().

149 {
150  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
151 
152  QcepObject::readSettings(settings, section);
153 
154  if (m_Processor) {
155  m_Processor->readSettings(settings, section+"/processor");
156  }
157 }
virtual void readSettings(QSettings *set, QString section)
Definition: qcepobject.cpp:119
QMutex m_Mutex
Definition: qxrddetector.h:99
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95

Here is the call graph for this function:

QxrdROICoordinatesPtr QxrdDetector::roi ( int  i)
slot

Definition at line 106 of file qxrddetector.cpp.

References m_Processor.

107 {
109 
110  if (m_Processor) {
111  QxrdROICalculatorPtr calc = m_Processor->roiCalculator();
112 
113  if (calc) {
114  res = calc->roi(i);
115  }
116  }
117 
118  return res;
119 }
QSharedPointer< QxrdROICoordinates > QxrdROICoordinatesPtr
QSharedPointer< QxrdROICalculator > QxrdROICalculatorPtr
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
int QxrdDetector::roiCount ( )
slot

Definition at line 91 of file qxrddetector.cpp.

References m_Processor.

92 {
93  int res = 0;
94 
95  if (m_Processor) {
96  QxrdROICalculatorPtr calc = m_Processor->roiCalculator();
97 
98  if (calc) {
99  res = calc->roiCount();
100  }
101  }
102 
103  return res;
104 }
QSharedPointer< QxrdROICalculator > QxrdROICalculatorPtr
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
QcepDoubleVector QxrdDetector::scalerCounts ( )
slot

Definition at line 337 of file qxrddetector.cpp.

References m_Processor.

338 {
339  if (m_Processor) {
340  return m_Processor->get_RoiCounts();
341  } else {
342  return QcepDoubleVector();
343  }
344 }
QVector< double > QcepDoubleVector
Definition: qcepmacros.h:19
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
double QxrdDetector::scalerCounts ( int  chan)
slot

Definition at line 346 of file qxrddetector.cpp.

References m_Processor.

347 {
348  if (m_Processor) {
349  return m_Processor->get_RoiCounts().value(chan);
350  } else {
351  return 0;
352  }
353 }
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
void QxrdDetector::shutdownAcquisition ( )
virtualslot

Reimplemented in QxrdDetectorPerkinElmer, and QxrdDetectorSimulated.

Definition at line 214 of file qxrddetector.cpp.

Referenced by QxrdDetectorPilatus::shutdownAcquisition(), QxrdDetectorSimulated::shutdownAcquisition(), and QxrdDetectorPerkinElmer::shutdownAcquisition().

215 {
216 }

Here is the caller graph for this function:

void QxrdDetector::startDetector ( )
virtualslot

Definition at line 194 of file qxrddetector.cpp.

Referenced by QxrdDetectorSimulated::startDetector(), QxrdDetectorPilatus::startDetector(), QxrdDetectorPerkinElmer::startDetector(), and startOrStop().

195 {
196 }

Here is the caller graph for this function:

void QxrdDetector::startOrStop ( bool  enabled)
slot

Definition at line 175 of file qxrddetector.cpp.

References startDetector(), and stopDetector().

Referenced by initialize().

176 {
177  if (enabled) {
178  startDetector();
179  } else {
180  stopDetector();
181  }
182 }
virtual void startDetector()
virtual void stopDetector()

Here is the call graph for this function:

Here is the caller graph for this function:

void QxrdDetector::statusMessage ( QString  msg,
QDateTime  ts = QDateTime::currentDateTime() 
) const
virtual

Reimplemented from QcepObject.

Definition at line 139 of file qxrddetector.cpp.

References m_Experiment.

140 {
142 
143  if (exp) {
144  exp->statusMessage(msg);
145  }
146 }
QSharedPointer< QxrdExperiment > QxrdExperimentPtr
QxrdExperimentWPtr m_Experiment
Definition: qxrddetector.h:93
void QxrdDetector::stopDetector ( )
virtualslot

Definition at line 198 of file qxrddetector.cpp.

Referenced by startOrStop(), QxrdDetectorSimulated::stopDetector(), and QxrdDetectorPilatus::stopDetector().

199 {
200 }

Here is the caller graph for this function:

QScriptValue QxrdDetector::toScriptValue ( QScriptEngine *  engine,
const QxrdDetectorPtr det 
)
static

Definition at line 218 of file qxrddetector.cpp.

219 {
220  return engine->newQObject(det.data());
221 }
void QxrdDetector::writeSettings ( QSettings *  settings,
QString  section 
)
virtual

Reimplemented from QcepObject.

Definition at line 159 of file qxrddetector.cpp.

References m_Mutex, m_Processor, and QcepObject::writeSettings().

160 {
161  QcepMutexLocker lock(__FILE__, __LINE__, &m_Mutex);
162 
163  QcepObject::writeSettings(settings, section);
164 
165  if (m_Processor) {
166  m_Processor->writeSettings(settings, section+"/processor");
167  }
168 }
QMutex m_Mutex
Definition: qxrddetector.h:99
QxrdDetectorProcessorPtr m_Processor
Definition: qxrddetector.h:95
virtual void writeSettings(QSettings *set, QString section)
Definition: qcepobject.cpp:114

Here is the call graph for this function:

Member Data Documentation

QcepImageBaseQueue QxrdDetector::m_AcquiredImages
private

Definition at line 101 of file qxrddetector.h.

Referenced by acquireFrame(), and enqueueAcquiredFrame().

QxrdAcquisitionWPtr QxrdDetector::m_Acquisition
protected
QxrdDetectorControlWindowPtr QxrdDetector::m_DetectorControlWindow
protected

Definition at line 96 of file qxrddetector.h.

Referenced by openControlWindow().

QxrdExperimentWPtr QxrdDetector::m_Experiment
protected
QMutex QxrdDetector::m_Mutex
private

Definition at line 99 of file qxrddetector.h.

Referenced by readSettings(), and writeSettings().

QSemaphore QxrdDetector::m_NAcquiredImages
private

Definition at line 100 of file qxrddetector.h.

Referenced by acquireFrame(), acquireFrameIfAvailable(), and enqueueAcquiredFrame().

QxrdDetectorProcessorPtr QxrdDetector::m_Processor
protected
QcepSettingsSaverWPtr QxrdDetector::m_Saver
protected

Definition at line 92 of file qxrddetector.h.

Referenced by initialize(), and openControlWindow().

Property Documentation

QString QxrdDetector::detectorName
readwrite

Definition at line 116 of file qxrddetector.h.

int QxrdDetector::detectorNumber
readwrite

Definition at line 104 of file qxrddetector.h.

int QxrdDetector::detectorType
readwrite

Definition at line 107 of file qxrddetector.h.

QString QxrdDetector::detectorTypeName
readwrite

Definition at line 110 of file qxrddetector.h.

bool QxrdDetector::enabled
readwrite

Definition at line 113 of file qxrddetector.h.

QString QxrdDetector::extension
readwrite

Definition at line 131 of file qxrddetector.h.

int QxrdDetector::hBinning
readwrite

Definition at line 125 of file qxrddetector.h.

int QxrdDetector::nCols
readwrite

Definition at line 119 of file qxrddetector.h.

Referenced by QxrdDetectorSimulated::onTimerTimeout().

int QxrdDetector::nRows
readwrite

Definition at line 122 of file qxrddetector.h.

Referenced by QxrdDetectorSimulated::onTimerTimeout().

int QxrdDetector::vBinning
readwrite

Definition at line 128 of file qxrddetector.h.


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