Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

TSubEvent Class Reference

#include <TSubEvent.h>

List of all members.


Detailed Description

Subevent class.

This class is the subevent base-class. It contains ADC and TDC data which is common to both gamma-ray and heavy-ion events, and is really just a container class.

Author:
JEP, J. Chuma.
Version:
1.2.
Date:
December 2004.

Definition at line 16 of file TSubEvent.h.

Public Member Functions

 TSubEvent ()
 TSubEvent (const vector< TDataItem< UShort_t > > &, const vector< TDataItem< UShort_t > > &)
virtual ~TSubEvent ()
void Print (const Char_t *="") const
void Set (const vector< TDataItem< UShort_t > > &, const vector< TDataItem< UShort_t > > &)
const vector< TDataItem< UShort_t > > & GetAdcs () const
const vector< TDataItem< UShort_t > > & GetTdcs () const
vector< TDataItem< UShort_t > > GetAdcValues (UShort_t) const
vector< TDataItem< UShort_t > > GetTdcValues (UShort_t) const
UShort_t GetAdcValue (UShort_t) const
UShort_t GetTdcValue (UShort_t) const

Private Member Functions

vector< TDataItem< UShort_t > > GetChannelValues (const vector< TDataItem< UShort_t > > &, UShort_t) const
UShort_t GetChannelValue (const vector< TDataItem< UShort_t > > &, UShort_t) const

Private Attributes

vector< TDataItem< UShort_t > > fAdcs
vector< TDataItem< UShort_t > > fTdcs


Constructor & Destructor Documentation

TSubEvent  ) 
 

Default constructor, initializing the ADC and TDC vectors.

Definition at line 23 of file TSubEvent.cxx.

TSubEvent const vector< TDataItem< UShort_t > > &  adcs,
const vector< TDataItem< UShort_t > > &  tdcs
 

Overloaded constructor. This is used for fast construction of a TSubEvent base-class if the necessary data is already unpacked into vectors.

Parameters:
[in] adcs A vector containing ADC data-items.
[in] tdcs A vector containing TDC data-items.

Definition at line 29 of file TSubEvent.cxx.

References fAdcs, and fTdcs.

~TSubEvent  )  [virtual]
 

Default destructor.

Definition at line 42 of file TSubEvent.cxx.


Member Function Documentation

void Print const Char_t *  option = ""  )  const
 

Print the sizes of the ADC and TDC arrays and any other data in the class.

Parameters:
[in] option If option is 'a' (all) then the data in the ADC and TDC arrays is also printed out.

Definition at line 48 of file TSubEvent.cxx.

References fAdcs, and fTdcs.

void Set const vector< TDataItem< UShort_t > > &  adcs,
const vector< TDataItem< UShort_t > > &  tdcs
[inline]
 

Set the subevent ADCs and TDCs. This just copies the data in adcs and tdcs to fAdcs and fTdcs.

Parameters:
[in] adcs The ADC data.
[in] tdcs The TDC data.

Definition at line 54 of file TSubEvent.h.

References fAdcs, and fTdcs.

const vector< TDataItem< UShort_t > > & GetAdcs  )  const [inline]
 

Get the vector of ADCs from the subevent.

Returns:
A vector containing pointers to TDataItem<UShort_t>'s.

Definition at line 66 of file TSubEvent.h.

const vector< TDataItem< UShort_t > > & GetTdcs  )  const [inline]
 

Get the vector of TDCs from the subevent.

Returns:
A vector containing pointers to TDataItem<UShort_t>'s.

Definition at line 74 of file TSubEvent.h.

vector< TDataItem< UShort_t > > GetAdcValues UShort_t  channel  )  const [inline]
 

Get all the values from a channel which fired.

Parameters:
[in] channel The ADC hardware channel to find.
Returns:
A vector containing pointers TDataItem's which are from channel channel.

Definition at line 83 of file TSubEvent.h.

References fAdcs, and GetChannelValues().

Here is the call graph for this function:

vector< TDataItem< UShort_t > > GetTdcValues UShort_t  channel  )  const [inline]
 

Get all the values from a channel which fired.

Parameters:
[in] channel The TDC hardware channel to find.
Returns:
A vector containing pointers TDataItem's which are from channel channel.

Definition at line 94 of file TSubEvent.h.

References fTdcs, and GetChannelValues().

Here is the call graph for this function:

UShort_t GetAdcValue UShort_t  channel  )  const [inline]
 

Find the value from a channel which fired.

Parameters:
[in] channel The ADC hardware channel to find.
Returns:
The value of the channel which fired.

Definition at line 104 of file TSubEvent.h.

References fAdcs, and GetChannelValue().

Here is the call graph for this function:

UShort_t GetTdcValue UShort_t  channel  )  const [inline]
 

Find the value from a channel which fired.

Parameters:
[in] channel The TDC hardware channel to find.
Returns:
The value of the channel which fired.

Definition at line 113 of file TSubEvent.h.

References fTdcs, and GetChannelValue().

Here is the call graph for this function:

vector< TDataItem< UShort_t > > GetChannelValues const vector< TDataItem< UShort_t > > &  module,
UShort_t  channel
const [private]
 

Get the all values from one channel in a vector. This uses reverse iterators, as often hardware readout of each channel is in a largest to smallest fashion (LIFO-like).

Parameters:
[in] module The hardware vector to be searched.
[in] channel The channel to be searched for in the vector.
Returns:
A vector containing hits with only channel channel.
Note:
This is quite complex use of STL if you don't understand it then just leave as is.

Definition at line 67 of file TSubEvent.cxx.

UShort_t GetChannelValue const vector< TDataItem< UShort_t > > &  module,
UShort_t  channel
const [private]
 

Get a value from a vector. This uses reverse iterators, as often hardware readout of each channel is in a largest to smallest fashion (LIFO-like).

Parameters:
[in] module The hardware vector to be searched.
[in] channel The channel to be searched for in the vector.
Returns:
The value of the hit with channel channel.
Note:
This is quite complex use of STL if you don't understand it then just leave as is.

Definition at line 89 of file TSubEvent.cxx.


Member Data Documentation

vector<TDataItem<UShort_t> > fAdcs [private]
 

A vector containing the unpacked ADC data-items. A vector containing unpacked ADCs is added to this subevent with AddAdcs() and retrieved using GetAdcs().

Definition at line 37 of file TSubEvent.h.

vector<TDataItem<UShort_t> > fTdcs [private]
 

A vector containing the unpacked TDC data-items. A vector containing unpacked TDCs is added to this subevent with AddTdcs() and retrieved using GetTdcs().

Definition at line 42 of file TSubEvent.h.


The documentation for this class was generated from the following files:
Generated on Mon Jan 8 11:54:36 2007 for DragonRoot by  doxygen 1.3.9.1