nmrspectrum.h
1 /***************************************************************************
2  Copyright (C) 2002-2015 Kentaro Kitagawa
3  kitagawa@phys.s.u-tokyo.ac.jp
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  You should have received a copy of the GNU Library General
11  Public License and a list of authors along with this program;
12  see the files COPYING and AUTHORS.
13 ***************************************************************************/
14 #ifndef nmrspectrumH
15 #define nmrspectrumH
16 //---------------------------------------------------------------------------
17 #include "nmrspectrumbase.h"
18 
19 class XMagnetPS;
20 class XDMM;
21 class XQDPPMS;
22 
23 class Ui_FrmNMRSpectrum;
25 
26 class XNMRSpectrum : public XNMRSpectrumBase<FrmNMRSpectrum> {
27 public:
28  XNMRSpectrum(const char *name, bool runtime,
29  Transaction &tr_meas, const shared_ptr<XMeasure> &meas);
30  //! ususally nothing to do
31  virtual ~XNMRSpectrum() = default;
32 protected:
33  //! \return true to be cleared.
34  virtual bool onCondChangedImpl(const Snapshot &shot, XValueNodeBase *) const override;
35  virtual double getFreqResHint(const Snapshot &shot_this) const override;
36  virtual double getMinFreq(const Snapshot &shot_this) const override;
37  virtual double getMaxFreq(const Snapshot &shot_this) const override;
38  virtual double getCurrentCenterFreq(const Snapshot &shot_this, const Snapshot &shot_others) const override;
39  virtual void getValues(const Snapshot &shot_this, std::vector<double> &values) const override;
40 
41  virtual bool checkDependencyImpl(const Snapshot &shot_this,
42  const Snapshot &shot_emitter, const Snapshot &shot_others,
43  XDriver *emitter) const override;
44 public:
45  const shared_ptr<XItemNode<XDriverList, XMagnetPS, XDMM, XQDPPMS> > &magnet() const {return m_magnet;}
46 
47  const shared_ptr<XDoubleNode> &centerFreq() const {return m_centerFreq;}
48  const shared_ptr<XDoubleNode> &resolution() const {return m_resolution;}
49  const shared_ptr<XDoubleNode> &minValue() const {return m_minValue;}
50  const shared_ptr<XDoubleNode> &maxValue() const {return m_maxValue;}
51  const shared_ptr<XDoubleNode> &fieldFactor() const {return m_fieldFactor;}
52  const shared_ptr<XDoubleNode> &residualField() const {return m_residualField;}
53 private:
54  const shared_ptr<XItemNode<XDriverList, XMagnetPS, XDMM, XQDPPMS> > m_magnet;
55  const shared_ptr<XDoubleNode> m_centerFreq;
56  const shared_ptr<XDoubleNode> m_resolution;
57  const shared_ptr<XDoubleNode> m_minValue, m_maxValue;
58  const shared_ptr<XDoubleNode> m_fieldFactor;
59  const shared_ptr<XDoubleNode> m_residualField;
60  std::deque<xqcon_ptr> m_conUIs;
61 };
62 
63 #endif

Generated for KAME4 by  doxygen 1.8.3