-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCFitButton.h
More file actions
91 lines (72 loc) · 2.59 KB
/
CFitButton.h
File metadata and controls
91 lines (72 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
This software is Copyright by the Board of Trustees of Michigan
State University (c) Copyright 2005.
You may use this software under the terms of the GNU public license
(GPL). The terms of this license are described at:
http://www.gnu.org/licenses/gpl.txt
Author:
Ron Fox
NSCL
Michigan State University
East Lansing, MI 48824-1321
*/
#ifndef __CFITBUTTON_H
#define __CFITBUTTON_H
#ifndef __XAMINEEVENTHANDLER_H
#include <XamineEventHandler.h> // For base class.
#endif
#ifndef __STL_STRING
#include <string>
#ifndef __STL_STRING
#define __STL_STRING
#endif
#endif
class CButtonEvent;
/*!
This class defines a subclass of CXamineEventHandler::CButtonHandler.
The constructor creates a set of buttons in the Xamine client
button box, which is assumed to already have been made.
- Fit Gammas - requests a 1-d point prompter and creates a fit
named <spectrumname>-gammas
- Fit Neutrons - requests a 1-d point prompter and creates a fit
named <specturmname>-neutrons
- FOM - Performs the figure of merit computation on the currently
selected spectrum (no prompter).
- FOM All - Performs the figure of merit computation on all spectra
for which it is possible and pops it up in a new toplevel so that
the user can inspect or write to file.
- Project - allows you to create a projection of the current 2-d spectrum.
Note that this class makes use of several helper Tcl scripts that
are assumed to already be defined:
- ShowFOM spectrumname
Shows the figure of merit computation for the currently selected spectrum.
- ShowFOMAll
shows the figure of merit computation for all spectra that are elligible for
this.
- Project2D manages the gui for 2-d projections.
*/
class CFitButton : public CXamineEventHandler::CButtonHandler
{
// Member data.
private:
int m_FitButtonId; // Ids assigned to buttons.
int m_GammaFitButtonId;
int m_NeutronFitButtonId;
int m_FOMButtonId;
int m_FOMAllButtonId;
int m_projectButtonId;
// constructors and canonicals.. note that copy-like ops are forbidden.
public:
CFitButton(CXamineEventHandler* pHandler);
virtual ~CFitButton();
private:
CFitButton(const CFitButton& rhs);
CFitButton& operator=(const CFitButton& rhs);
int operator==(const CFitButton& rhs) const;
int operator!=(const CFitButton& rhs) const;
// The following is called when the button is successfully used:
virtual Bool_t operator()(CButtonEvent& event);
STD(string) spectrumName(CButtonEvent& event);
void invokeScript(STD(string) script);
};
#endif