DDASToys for NSCLDAQ  6.2-000
QHitData.h
Go to the documentation of this file.
1 /*
2  This software is Copyright by the Board of Trustees of Michigan
3  State University (c) Copyright 2017.
4 
5  You may use this software under the terms of the GNU public license
6  (GPL). The terms of this license are described at:
7 
8  http://www.gnu.org/licenses/gpl.txt
9 
10  Authors:
11  Aaron Chester
12  FRIB
13  Michigan State University
14  East Lansing, MI 48824-1321
15 */
16 
23 #ifndef QHITDATA_H
24 #define QHITDATA_H
25 
26 #include <QWidget>
27 
28 #include <string>
29 
30 class QLabel;
31 class QComboBox;
32 class QPushButton;
33 class QGroupBox;
34 class QString;
35 
36 namespace ddastoys {
37  struct HitExtension;
38  class DDASFitHit;
39 }
40 
41 class FitManager;
42 
53 class QHitData : public QWidget
54 {
55  Q_OBJECT
56 
57 public:
64  QHitData(FitManager* pFitMgr, QWidget* parent=nullptr);
66  ~QHitData();
67 
73  void update(const ddastoys::DDASFitHit& hit);
80  void setFitMethod(QString method);
81 
82 private:
88  QGroupBox* createHitBox();
94  QGroupBox* createClassifierBox();
100  QGroupBox* createFitBox();
105  void createConnections();
112  void updateHitData(const ddastoys::DDASFitHit& hit);
113 
114 private slots:
116  void configureFit();
121  void printFitResults();
122 
123 private:
124  FitManager* m_pFitManager;
125  ddastoys::HitExtension* m_pExtension;
126 
127  // Data for currently selected hit.
128 
129  QLabel* m_pId;
130  QLabel* m_pRawData;
131  QLabel* m_pFit1Prob;
132  QLabel* m_pFit2Prob;
133  QComboBox* m_pFitMethod;
134  QPushButton* m_pPrintFit;
135 };
136 
137 #endif
Provides an interface for calculating trace fits using HitExtension fit parameters.
Definition: FitManager.h:65
Widget for managing hit information when interating with the GUI.
Definition: QHitData.h:54
void setFitMethod(QString method)
Set the fit method.
Definition: QHitData.cpp:110
QHitData(FitManager *pFitMgr, QWidget *parent=nullptr)
Constructor.
Definition: QHitData.cpp:45
void update(const ddastoys::DDASFitHit &hit)
Update hit data and enable printing of fit information to stdout if the hit has an extension.
Definition: QHitData.cpp:83
~QHitData()
Destructor.
Definition: QHitData.cpp:78
Encapsulates data for DDAS hits that may have fitted traces.
Definition: DDASFitHit.h:46
The data structure appended to each fit hit.
Definition: fit_extensions.h:82