NSCL DDAS 12.2-009
Support for XIA DDAS at FRIB
DDASRootEvent.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 Jeromy Tompkins
13 FRIB
14 Michigan State University
15 East Lansing, MI 48824-1321
16*/
17
23#ifndef DDASROOTEVENT_H
24#define DDASROOTEVENT_H
25
26#include <TObject.h>
27#include <vector>
28
29class DDASRootHit;
30
58class DDASRootEvent : public TObject {
59private:
60 std::vector<DDASRootHit *> m_data;
61
62public:
67
72 DDASRootEvent(const DDASRootEvent &obj);
83 std::vector<DDASRootHit *> &GetData() { return m_data; }
88 UInt_t GetNHits() const { return m_data.size(); }
93 void AddChannelData(DDASRootHit *channel);
98 Double_t GetFirstTime() const;
103 Double_t GetLastTime() const;
105 Double_t GetTimeWidth() const;
107 void Reset();
108
109 // Tell ROOT we're implementing the class:
110
112};
113
116#endif
Encapsulates a built DDAS event with added capabilities for writing to ROOT files.
Definition: DDASRootEvent.h:58
DDASRootEvent & operator=(const DDASRootEvent &obj)
Assignment operator.
Definition: DDASRootEvent.cpp:52
Double_t GetLastTime() const
Get timestamp of last channel datum.
Definition: DDASRootEvent.cpp:104
std::vector< DDASRootHit * > & GetData()
Access internal, extensible array of channel data.
Definition: DDASRootEvent.h:83
void AddChannelData(DDASRootHit *channel)
Append channel data to event.
Definition: DDASRootEvent.cpp:79
~DDASRootEvent()
Destructor.
Definition: DDASRootEvent.cpp:71
Double_t GetTimeWidth() const
Get time difference between first and last channel data.
Definition: DDASRootEvent.cpp:118
Double_t GetFirstTime() const
Get timestamp of first channel datum.
Definition: DDASRootEvent.cpp:89
void Reset()
Clear data vector and reset the event.
Definition: DDASRootEvent.cpp:127
DDASRootEvent()
Default constructor.
Definition: DDASRootEvent.cpp:28
UInt_t GetNHits() const
Return the number of hits in this event.
Definition: DDASRootEvent.h:88
ClassDef(DDASRootEvent, 1)
Encapsulation of a generic DDAS hit with added capabilities for writing to ROOT files.
Definition: DDASRootHit.h:74