SpectraPac 2.0(r200)
Evaluates PAC Measurements

PacCommonEnergyResult.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2008-2010 by Matthias Nagl                              *
00003  *   mnagl@uni-goettingen.de                                               *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef PACCOMMONENERGYRESULT_H
00022 #define PACCOMMONENERGYRESULT_H
00023 
00024 #include <QVector>
00025 
00026 class QDomElement;
00027 
00035 class PacCommonEnergyResult
00036 {
00037 public:
00038     PacCommonEnergyResult();
00039     PacCommonEnergyResult(
00040         const QVector<quint64> &spectrum,
00041         qreal emin,
00042         qreal emax,
00043         quint64 underflowevents,
00044         quint64 overflowevents
00045     );
00046 
00047     qreal eMin() const;
00048     qreal eMax() const;
00049     const QVector<qreal> & leftEdgeXValues() const;
00050     const QVector<qreal> & xValues() const;
00051     const QVector<quint64> & spectrumAsInt() const;
00052     const QVector<qreal> & spectrumAsDouble() const;
00053     quint64 eventsInSpectrum() const;
00054     quint64 underflowEvents() const;
00055     quint64 overflowEvents() const;
00056     qreal channelWidth() const;
00057 
00063     void appendToDomNode(QDomElement &node) const;
00069     void initializeFromDomNode(const QDomElement &node);
00070 
00071 private:
00072     qreal emin;
00073     qreal emax;
00074     mutable QVector<qreal> leftedgex;
00075     mutable QVector<qreal> x;
00076     QVector<quint64> intspectrum;
00077     mutable QVector<qreal> realspectrum;
00078     mutable quint64 eventsinspectrum;
00079     quint64 underflowevents;
00080     quint64 overflowevents;
00081 };
00082 
00083 #endif // PACCOMMONENERGYRESULT_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines