Defines the object that's put in a ROOT TTree for each event.
More...
#include <DDASRootFitEvent.h>
Defines the object that's put in a ROOT TTree for each event.
An event is just a sequence (vector) of hits. Hits are stored here as pointers to DDASRootFitHit objects which are hits that are also derived from TObject.
- Note
- The code assumes that the pointers in m_hits point to dynamically allocated data. Thus the destructor will destroy the hits as well.
-
Copy construction and assignment are implemented as deep operations as demanded by ROOT.
◆ DDASRootFitEvent() [1/2]
| ddastoys::DDASRootFitEvent::DDASRootFitEvent |
( |
| ) |
|
Constructor.
Pretty much null but ROOT requires an implementation.
◆ DDASRootFitEvent() [2/2]
Copy constructor.
- Parameters
-
| rhs | The object we're being copied from. |
◆ ~DDASRootFitEvent()
| ddastoys::DDASRootFitEvent::~DDASRootFitEvent |
( |
| ) |
|
Destructor.
Destroy the hits. Note that the event vector destroys itself.
◆ AddHit()
Add a hit to the event.
- Parameters
-
| hit | References the hit to add. |
- Note
- The hit is copied into a dynamically allocated hit to ensure all hit objects in the vector are dynamic.
◆ GetData()
Return the event vector.
- Returns
- Vector of references to hit objects.
◆ GetFirstTime()
| Double_t ddastoys::DDASRootFitEvent::GetFirstTime |
( |
| ) |
const |
Get the time from the first hit in the event.
- Returns
- Double_t The time from the first hit of data.
- Return values
-
| 0.0 | Returned if there are no hits. |
◆ GetLastTime()
| Double_t ddastoys::DDASRootFitEvent::GetLastTime |
( |
| ) |
const |
Get the time from the last hit in the event.
- Returns
- Double_t The time from the last hit of data.
- Return values
-
| 0.0 | Returned if there are no hits. |
◆ GetTimeWidth()
| Double_t ddastoys::DDASRootFitEvent::GetTimeWidth |
( |
| ) |
const |
Get the time from the last hit in the event.
- Returns
- Double_t The time from the last hit of data.
- Return values
-
| 0.0 | Returned if there are no hits. |
◆ operator=()
Assignment operator.
- Parameters
-
| rhs | The object we're assigning to *this. |
- Returns
- Referencing *this.
Assignment will:
- Kill off our vector of hits.
- For each hit on the right hand side, dynamically copy construct a new one and insert it into our vector.
The documentation for this class was generated from the following files: