NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
DDASFitHit.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  Ron Fox
12  Jeromy Tompkins
13  NSCL
14  Michigan State University
15  East Lansing, MI 48824-1321
16 */
17 #ifndef DDASFITHIT_H
18 #define DDASFITHIT_H
19 
25 #include "DDASHit.h" // Base class
26 #include "functions.h" // Defines HitExtension.
27 #include "lmfit.h"
28 #include <stdexcept>
29 
30 namespace DAQ {
31  namespace DDAS {
32 
33 
42 {
43 private:
44  bool m_haveExtension;
45  ::DDAS::HitExtension m_Extension;
46 public:
47  DDASFitHit() {Reset();}
48  virtual ~DDASFitHit() {}
49 
50  void Reset() {
51  m_haveExtension = false;
52  DAQ::DDAS::DDASHit::Reset(); // Reset base class membrers.
53  }
54 
55 
56  void setExtension(const ::DDAS::HitExtension& extension) {
57  m_Extension = extension;
58  m_haveExtension = true;
59  }
60  bool hasExtension() const { return m_haveExtension; }
61  const ::DDAS::HitExtension& getExtension() const {
62  if (m_haveExtension) {
63  return m_Extension;
64  } else {
65  throw std::logic_error("Asked for extension for event with none");
66  }
67  }
68 
69 
70 
71 };
72 
74 
75  } // DDAS
76 } // DAQ
77 
78 
79 
80 
81 
82 #endif
Definition: DDASFitHit.h:41
Encapsulation of a generic DDAS event.
Definition: DDASHit.h:51
: Define the fitting functions and data structures for L-M fits.
Definition: lmfit.h:62
: Implement functions used to fit DDAS pulses.
void Reset()
Resets the state of all member data to that of initialization.
Definition: DDASHit.cpp:46
Definition: functions.h:26
Definition: SystemBooter.cpp:16