NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
DDASEvent.h
1 // DDASEvent.h
2 //
3 // A class to aggregate separate ddaschannel objects.
4 //
5 // Author: Jeromy Tompkins
6 // Date : 5/6/2013
7 //
8 
9 #ifndef DDASEVENT_H
10 #define DDASEVENT_H
11 
12 #include <vector>
13 #include <TObject.h>
14 #include "ddaschannel.h"
15 
26 class DDASEvent : public TObject
27 {
28  private:
29  std::vector<ddaschannel*> m_data;
30 
31  public:
33  DDASEvent();
34 
35 
40  DDASEvent(const DDASEvent& obj);
41 
47  DDASEvent& operator=(const DDASEvent& obj);
48 
53  ~DDASEvent();
54 
55 
60  std::vector<ddaschannel*>& GetData() { return m_data;}
61 
70  void AddChannelData(ddaschannel* channel);
71 
73  UInt_t GetNEvents() const { return m_data.size(); }
74 
81  Double_t GetFirstTime() const;
82 
89  Double_t GetLastTime() const;
90 
91 
97  Double_t GetTimeWidth() const;
98 
103  void Reset();
104 
105  ClassDef(DDASEvent,1);
106 };
107 
108 #endif
Encapsulates a Built DDAS event.
Definition: DDASEvent.h:26
Double_t GetFirstTime() const
Get timestamp of first channel datum.
Definition: DDASEvent.cpp:57
Encapsulation of a generic DDAS event.
Definition: ddaschannel.h:41
Double_t GetTimeWidth() const
Get time difference between first and last channel data.
Definition: DDASEvent.cpp:77
DDASEvent()
Default constructor.
UInt_t GetNEvents() const
Get number of channel-wise data in event.
Definition: DDASEvent.h:73
Double_t GetLastTime() const
Get timestamp of last channel datum.
Definition: DDASEvent.cpp:67
DDASEvent & operator=(const DDASEvent &obj)
Assignment operator.
Definition: DDASEvent.cpp:17
std::vector< ddaschannel * > & GetData()
Access internal, extensible array of channel data.
Definition: DDASEvent.h:60
void AddChannelData(ddaschannel *channel)
Append channel data to event.
Definition: DDASEvent.cpp:52
void Reset()
Clear data vector and reset event Deletes the ddaschannel data objects and resets the size of the ext...
Definition: DDASEvent.cpp:85
~DDASEvent()
Destructor.
Definition: DDASEvent.cpp:46