#include <DaqFadcChannel.h>
Collaboration diagram for DayaBay::DaqFadcChannel:
Public Types | |
typedef std::vector< unsigned int > | FadcSamples |
A list containing all of the samples in an FADC channel. | |
Public Member Functions | |
DaqFadcChannel (const DybDaq::FadcData &fadcData, const DayaBay::FadcChannelId &channelId) | |
Constructor for read-only instance. | |
DaqFadcChannel (const DayaBay::FadcChannelId &channelId, DybDaq::FadcReadout &fadcReadout) | |
Constructor for read-write instance. | |
DaqFadcChannel () | |
Default Constructor. | |
virtual | ~DaqFadcChannel () |
Destroys this instance of the class. | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
const FadcSamples & | samples () const |
Returns the list containing all of the samples in this channel. | |
void | addData (const DybDaq::FadcData &fadcData) |
Adds the supplied FadcData to this channel. | |
const DayaBay::FadcChannelId & | channelId () const |
Retrieve const The identity of this channel. | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
operator new | |
static void * | operator new (size_t size, void *pObj) |
placement operator new it is needed by libstdc++ 3.2.3 (e.g. | |
static void | operator delete (void *p) |
operator delete | |
static void | operator delete (void *p, void *pObj) |
placement operator delete not sure if really needed, but it does not harm | |
Private Attributes | |
FadcSamples * | m_samples |
The list containing all of the samples in this channel. | |
DybDaq::FadcReadout * | m_fadcReadout |
The FadcReadout in which the channel data is stored. | |
DayaBay::FadcChannelId | m_channelId |
The identity of this channel. |
Definition at line 40 of file DaqFadcChannel.h.
typedef std::vector<unsigned int> DayaBay::DaqFadcChannel::FadcSamples |
A list containing all of the samples in an FADC channel.
Definition at line 45 of file DaqFadcChannel.h.
DaqFadcChannel::DaqFadcChannel | ( | const DybDaq::FadcData & | fadcData, | |
const DayaBay::FadcChannelId & | channelId | |||
) |
Constructor for read-only instance.
Definition at line 25 of file DaqFadcChannel.cc.
00026 : 00027 m_samples(0), 00028 m_fadcReadout(0), 00029 m_channelId(channelId) { 00030 addData(fadcData); 00031 }
DaqFadcChannel::DaqFadcChannel | ( | const DayaBay::FadcChannelId & | channelId, | |
DybDaq::FadcReadout & | fadcReadout | |||
) |
Constructor for read-write instance.
Definition at line 18 of file DaqFadcChannel.cc.
00019 : 00020 m_samples(0), 00021 m_fadcReadout(&fadcReadout), 00022 m_channelId(channelId) { 00023 }
DayaBay::DaqFadcChannel::DaqFadcChannel | ( | ) | [inline] |
Default Constructor.
Definition at line 56 of file DaqFadcChannel.h.
00056 : m_samples(0), 00057 m_fadcReadout(0), 00058 m_channelId() {}
DaqFadcChannel::~DaqFadcChannel | ( | ) | [virtual] |
std::ostream & DayaBay::DaqFadcChannel::fillStream | ( | std::ostream & | s | ) | const [inline, virtual] |
Fill the ASCII output stream.
Definition at line 132 of file DaqFadcChannel.h.
00133 { 00134 s << "{ " << "samples : " << m_samples << std::endl 00135 << "fadcReadout : " << m_fadcReadout << std::endl 00136 << "channelId : " << m_channelId << std::endl << " }"; 00137 return s; 00138 }
const DaqFadcChannel::FadcSamples & DaqFadcChannel::samples | ( | ) | const |
Returns the list containing all of the samples in this channel.
Definition at line 39 of file DaqFadcChannel.cc.
00039 { 00040 if (0 == m_samples) { 00041 FadcSamples** samples = const_cast<FadcSamples**>(&m_samples); 00042 *(samples) = new FadcSamples(); 00043 } 00044 return *m_samples; 00045 }
void DaqFadcChannel::addData | ( | const DybDaq::FadcData & | fadcData | ) |
Adds the supplied FadcData to this channel.
Definition at line 47 of file DaqFadcChannel.cc.
00047 { 00048 samples(); 00049 m_samples->push_back(fadcData.highDataByte()); 00050 m_samples->push_back(fadcData.middleDataByte()); 00051 m_samples->push_back(fadcData.lowDataByte()); 00052 }
const DayaBay::FadcChannelId & DayaBay::DaqFadcChannel::channelId | ( | ) | const [inline] |
Retrieve const The identity of this channel.
Definition at line 141 of file DaqFadcChannel.h.
00142 { 00143 return m_channelId; 00144 }
static void* DayaBay::DaqFadcChannel::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Definition at line 79 of file DaqFadcChannel.h.
00080 { 00081 return ( sizeof(DaqFadcChannel) == size ? 00082 boost::singleton_pool<DaqFadcChannel, sizeof(DaqFadcChannel)>::malloc() : 00083 ::operator new(size) ); 00084 }
static void* DayaBay::DaqFadcChannel::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
placement operator new it is needed by libstdc++ 3.2.3 (e.g.
in std::vector) it is not needed in libstdc++ >= 3.4
Definition at line 89 of file DaqFadcChannel.h.
static void DayaBay::DaqFadcChannel::operator delete | ( | void * | p | ) | [inline, static] |
operator delete
Definition at line 95 of file DaqFadcChannel.h.
00096 { 00097 boost::singleton_pool<DaqFadcChannel, sizeof(DaqFadcChannel)>::is_from(p) ? 00098 boost::singleton_pool<DaqFadcChannel, sizeof(DaqFadcChannel)>::free(p) : 00099 ::operator delete(p); 00100 }
static void DayaBay::DaqFadcChannel::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
placement operator delete not sure if really needed, but it does not harm
Definition at line 104 of file DaqFadcChannel.h.
00105 { 00106 ::operator delete (p, pObj); 00107 }
FadcSamples* DayaBay::DaqFadcChannel::m_samples [private] |
The list containing all of the samples in this channel.
Definition at line 113 of file DaqFadcChannel.h.
The FadcReadout in which the channel data is stored.
Definition at line 114 of file DaqFadcChannel.h.