/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
DayaBay::DaqFadcChannel Class Reference

Class that wraps the DAQ data read from a single Fadc channel. More...

#include <DaqFadcChannel.h>

Collaboration diagram for DayaBay::DaqFadcChannel:
Collaboration graph
[legend]

List of all members.

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 FadcSamplessamples () const
 Returns the list containing all of the samples in this channel.
void addData (const unsigned int highDataByte, const unsigned int middleDataByte, const unsigned int lowDataByte)
 Adds the supplied information as new FeeHit to this channel.
void addData (const DybDaq::FadcData &fadcData)
 Adds the supplied FadcData to this channel.
void addSamples (const DybDaq::FadcData &fadcData)
 Adds the sample contained in the supplied FadcData to this channel.
const DayaBay::FadcChannelIdchannelId () 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

FadcSamplesm_samples
 The list containing all of the samples in this channel.
DybDaq::FadcReadoutm_fadcReadout
 The FadcReadout in which the channel data is stored.
DayaBay::FadcChannelId m_channelId
 The identity of this channel.

Detailed Description

Class that wraps the DAQ data read from a single Fadc channel.

Author:
sjpatton@lbl.gov created Thu Dec 5 17:51:48 2013

Definition at line 40 of file DaqFadcChannel.h.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

DaqFadcChannel::DaqFadcChannel ( const DybDaq::FadcData fadcData,
const DayaBay::FadcChannelId channelId 
)

Constructor for read-only instance.

Definition at line 30 of file DaqFadcChannel.cc.

                                                                      :
    m_samples(0),
    m_fadcReadout(0),
    m_channelId(channelId) {
    if (fadcData.isChannelHead()) {
        return;
    }
    addData(fadcData);
}
DaqFadcChannel::DaqFadcChannel ( const DayaBay::FadcChannelId channelId,
DybDaq::FadcReadout fadcReadout 
)

Constructor for read-write instance.

Definition at line 23 of file DaqFadcChannel.cc.

                                                         :
    m_samples(0),
    m_fadcReadout(&fadcReadout),
    m_channelId(channelId) {
}
DayaBay::DaqFadcChannel::DaqFadcChannel ( ) [inline]

Default Constructor.

Definition at line 56 of file DaqFadcChannel.h.

DaqFadcChannel::~DaqFadcChannel ( ) [virtual]

Destroys this instance of the class.

Definition at line 41 of file DaqFadcChannel.cc.

                                {
    if (0 != m_samples) {
        delete m_samples;
    }
}

Member Function Documentation

std::ostream & DayaBay::DaqFadcChannel::fillStream ( std::ostream &  s) const [inline, virtual]

Fill the ASCII output stream.

Definition at line 140 of file DaqFadcChannel.h.

{
  s << "{ " << "samples :       " << m_samples << std::endl
            << "fadcReadout :   " << m_fadcReadout << std::endl
            << "channelId :     " << m_channelId << std::endl << " }";
  return s;
}
const DaqFadcChannel::FadcSamples & DaqFadcChannel::samples ( ) const

Returns the list containing all of the samples in this channel.

Definition at line 47 of file DaqFadcChannel.cc.

                                                               {
    if (0 == m_samples) {
        FadcSamples** samples = const_cast<FadcSamples**>(&m_samples);
        *(samples) = new FadcSamples();
    }
    return *m_samples;
}
void DaqFadcChannel::addData ( const unsigned int  highDataByte,
const unsigned int  middleDataByte,
const unsigned int  lowDataByte 
)

Adds the supplied information as new FeeHit to this channel.

Definition at line 55 of file DaqFadcChannel.cc.

                                                             {
    const FadcData& fadcData = m_fadcReadout->addData(m_channelId.connector() - kFadcConnectorOffset,
                                                      highDataByte,
                                                      middleDataByte,
                                                      lowDataByte);
    addData(fadcData);
}
void DaqFadcChannel::addData ( const DybDaq::FadcData fadcData)

Adds the supplied FadcData to this channel.

Definition at line 65 of file DaqFadcChannel.cc.

                                                     {
    samples();
    m_samples->push_back(fadcData.highDataByte());
    m_samples->push_back(fadcData.middleDataByte());
    m_samples->push_back(fadcData.lowDataByte());
}
void DaqFadcChannel::addSamples ( const DybDaq::FadcData fadcData)

Adds the sample contained in the supplied FadcData to this channel.

Definition at line 72 of file DaqFadcChannel.cc.

                                                        {
    samples();
    m_samples->push_back(fadcData.sample1());
    m_samples->push_back(fadcData.sample2());
    m_samples->push_back(fadcData.sample3());
    m_samples->push_back(fadcData.sample4());
}
const DayaBay::FadcChannelId & DayaBay::DaqFadcChannel::channelId ( ) const [inline]

Retrieve const The identity of this channel.

Definition at line 149 of file DaqFadcChannel.h.

{
  return m_channelId;
}
static void* DayaBay::DaqFadcChannel::operator new ( size_t  size) [inline, static]

operator new

Definition at line 87 of file DaqFadcChannel.h.

    {
      return ( sizeof(DaqFadcChannel) == size ? 
               boost::singleton_pool<DaqFadcChannel, sizeof(DaqFadcChannel)>::malloc() :
               ::operator new(size) );
    }
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 97 of file DaqFadcChannel.h.

    {
      return ::operator new (size,pObj);
    }
static void DayaBay::DaqFadcChannel::operator delete ( void *  p) [inline, static]

operator delete

Definition at line 103 of file DaqFadcChannel.h.

    {
      boost::singleton_pool<DaqFadcChannel, sizeof(DaqFadcChannel)>::is_from(p) ?
      boost::singleton_pool<DaqFadcChannel, sizeof(DaqFadcChannel)>::free(p) :
      ::operator delete(p);
    }
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 112 of file DaqFadcChannel.h.

    {
      ::operator delete (p, pObj);
    }

Member Data Documentation

The list containing all of the samples in this channel.

Definition at line 121 of file DaqFadcChannel.h.

The FadcReadout in which the channel data is stored.

Definition at line 122 of file DaqFadcChannel.h.

The identity of this channel.

Definition at line 123 of file DaqFadcChannel.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:01:06 for DaqEvent by doxygen 1.7.4