NSCL DDAS
1.0
Support for XIA DDAS at the NSCL
|
Encapsulates a Built DDAS event. More...
#include <DDASEvent.h>
Public Member Functions | |
DDASEvent () | |
Default constructor. | |
DDASEvent (const DDASEvent &obj) | |
Copy constructor. More... | |
DDASEvent & | operator= (const DDASEvent &obj) |
Assignment operator. More... | |
~DDASEvent () | |
Destructor. More... | |
std::vector< ddaschannel * > & | GetData () |
Access internal, extensible array of channel data. More... | |
void | AddChannelData (ddaschannel *channel) |
Append channel data to event. More... | |
UInt_t | GetNEvents () const |
Get number of channel-wise data in event. | |
Double_t | GetFirstTime () const |
Get timestamp of first channel datum. More... | |
Double_t | GetLastTime () const |
Get timestamp of last channel datum. More... | |
Double_t | GetTimeWidth () const |
Get time difference between first and last channel data. More... | |
void | Reset () |
Clear data vector and reset event Deletes the ddaschannel data objects and resets the size of the extensible data array to zero. | |
ClassDef (DDASEvent, 1) | |
Encapsulates a Built DDAS event.
Any data that was written to disk downstream of the NSCLDAQ event builder will have a "built" structure. What that means is that the body of the physics event item will contain data from more than one DDAS event. The DDASEvent class represents this type of data. It provides access to the events that make it up through the ddaschannel objects it owns and then also provides some useful methods for getting data from the event as a whole.
DDASEvent::DDASEvent | ( | const DDASEvent & | obj | ) |
Copy constructor.
Implements a deep copy
DDASEvent::~DDASEvent | ( | ) |
Destructor.
Deletes the ddaschannel data objects!
void DDASEvent::AddChannelData | ( | ddaschannel * | channel | ) |
Append channel data to event.
Appends the pointer to the internal, extensible data array. There is no check that the object pointed to by the argument exists, so that it is the user's responsibility to implement.
channel | pointer to a ddaschannel object |
|
inline |
Access internal, extensible array of channel data.
Double_t DDASEvent::GetFirstTime | ( | ) | const |
Get timestamp of first channel datum.
If data exists return timestamp of first element in the array. This should be the earliest unit of data stored by this object. If no data exists, returns 0.
Double_t DDASEvent::GetLastTime | ( | ) | const |
Get timestamp of last channel datum.
If data exists return timestamp of last element in the array. This should be the most recent unit of data stored by this object. If no data exists, returns 0.
Double_t DDASEvent::GetTimeWidth | ( | ) | const |
Get time difference between first and last channel data.
If data exists return timestamp of first and last units of data stored by this object. If no data exists, return 0;
Assignment operator.
Performs a deep copy of the data belonging to obj. There is no attempt to make this exception-safe.