DDASToys for NSCLDAQ  6.2-000
FitEditorTemplate.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 
22 #ifndef FITEDITORTEMPLATE_H
23 #define FITEDITORTEMPLATE_H
24 
25 #include <CBuiltRingItemEditor.h>
26 
27 #include <vector>
28 
29 namespace ddasfmt {
30  class DDASHit;
31 }
32 
34 namespace ddastoys {
35 
36  class Configuration;
37 
53  class FitEditorTemplate : public CBuiltRingItemEditor::BodyEditor
54  {
55  public:
67  FitEditorTemplate(FitEditorTemplate&& rhs) noexcept;
68 
81 
83  virtual ~FitEditorTemplate();
84 
85  // Mandatory interface from CBuiltRingItemEditor::BodyEditor
86  public:
96  virtual std::vector<CBuiltRingItemEditor::BodySegment> operator()(
97  pRingItemHeader pHdr, pBodyHeader pBHdr, size_t bodySize,
98  void* pBody
99  );
104  virtual void free(iovec& e);
105 
106  // Additional functionality for this class
107  private:
117  int pulseCount(ddasfmt::DDASHit& hit);
118 
119  // Private member data
120  private:
121  Configuration* m_pConfig;
122  std::vector<double> m_template;
123  unsigned m_align;
124  };
125 
128 }
129 
130 #endif
Manage fit configuration information.
Definition: Configuration.h:68
Fit trace data with the template fitting functions.
Definition: FitEditorTemplate.h:54
virtual void free(iovec &e)
Free the dynamic fit extension descriptor(s).
Definition: FitEditorTemplate.cpp:221
FitEditorTemplate()
Constructor.
Definition: FitEditorTemplate.cpp:42
virtual std::vector< CBuiltRingItemEditor::BodySegment > operator()(pRingItemHeader pHdr, pBodyHeader pBHdr, size_t bodySize, void *pBody)
Perform the fit and create a fit extension for a single fragment.
Definition: FitEditorTemplate.cpp:134
FitEditorTemplate & operator=(const FitEditorTemplate &rhs)
Copy assignment operator.
Definition: FitEditorTemplate.cpp:89
virtual ~FitEditorTemplate()
Destructor.
Definition: FitEditorTemplate.cpp:115