DDASToys for NSCLDAQ  6.2-000
DDASRootFitEvent.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  Aaron Chester
14  FRIB
15  Michigan State University
16  East Lansing, MI 48824-1321
17 */
18 
24 #ifndef DDASROOTFITEVENT_H
25 #define DDASROOTFITEVENT_H
26 
27 #include <TObject.h> // ROOT base class
28 
29 #include <vector>
30 
32 namespace ddastoys {
33 
34  class DDASRootFitHit;
35 
55  class DDASRootFitEvent : public TObject
56  {
57  public:
58  std::vector<DDASRootFitHit*> m_hits;
59 
60  // Canonical methods:
61 
62  public:
72 
79 
80  // Selectors; Some of these are provided because maybe ROOT analysis
81  // needs them?
82 
83  public:
88  std::vector<DDASRootFitHit*> GetData();
94  Double_t GetFirstTime() const;
100  Double_t GetLastTime() const;
106  Double_t GetTimeWidth() const;
107 
108  // Operations:
109 
110  public:
117  void AddHit(const DDASRootFitHit& hit);
119  void Reset();
120 
121  // ROOT needs this macro:
122 
123  ClassDef(DDASRootFitEvent, 1)
124  };
125 
127 }
128 
129 #endif
Defines the object that's put in a ROOT TTree for each event.
Definition: DDASRootFitEvent.h:56
Double_t GetTimeWidth() const
Get the time from the last hit in the event.
Definition: DDASRootFitEvent.cpp:99
void AddHit(const DDASRootFitHit &hit)
Add a hit to the event.
Definition: DDASRootFitEvent.cpp:105
DDASRootFitEvent()
Constructor.
Definition: DDASRootFitEvent.cpp:33
Double_t GetFirstTime() const
Get the time from the first hit in the event.
Definition: DDASRootFitEvent.cpp:79
DDASRootFitEvent & operator=(const DDASRootFitEvent &rhs)
Assignment operator.
Definition: DDASRootFitEvent.cpp:60
void Reset()
Delete the hits and empty the array of hits.
Definition: DDASRootFitEvent.cpp:112
~DDASRootFitEvent()
Destructor.
Definition: DDASRootFitEvent.cpp:47
Double_t GetLastTime() const
Get the time from the last hit in the event.
Definition: DDASRootFitEvent.cpp:89
std::vector< DDASRootFitHit * > m_hits
An event is a vector of hits.
Definition: DDASRootFitEvent.h:58
std::vector< DDASRootFitHit * > GetData()
Return the event vector.
Definition: DDASRootFitEvent.cpp:73
This class is a ROOT serializable DDAS hit with possible fit data.
Definition: DDASRootFitHit.h:53