NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | List of all members
DDASEvent Class Reference

Encapsulates a Built DDAS event. More...

#include <DDASEvent.h>

Inheritance diagram for DDASEvent:

Public Member Functions

 DDASEvent ()
 Default constructor.
 
 DDASEvent (const DDASEvent &obj)
 Copy constructor. More...
 
DDASEventoperator= (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)
 

Detailed Description

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.

Constructor & Destructor Documentation

DDASEvent::DDASEvent ( const DDASEvent obj)

Copy constructor.

Implements a deep copy

DDASEvent::~DDASEvent ( )

Destructor.

Deletes the ddaschannel data objects!

Member Function Documentation

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.

Parameters
channelpointer to a ddaschannel object
std::vector<ddaschannel*>& DDASEvent::GetData ( )
inline

Access internal, extensible array of channel data.

Returns
reference to the 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;

DDASEvent & DDASEvent::operator= ( const DDASEvent obj)

Assignment operator.

Performs a deep copy of the data belonging to obj. There is no attempt to make this exception-safe.


The documentation for this class was generated from the following files: