| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DayaBay::DaqPmtChannel Class Reference

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

#include <DaqPmtChannel.h>

Collaboration diagram for DayaBay::DaqPmtChannel:

[legend]
List of all members.

Public Member Functions

 DaqPmtChannel (const DybDaq::FeeHit &feeHit, const DayaBay::FeeChannelId &channelId)
 Constructor for read-only instance.
 DaqPmtChannel (const DayaBay::FeeChannelId &channelId, DybDaq::FeeReadout &feeReadout)
 Constructor for read-write instance.
 DaqPmtChannel ()
 Default Constructor.
virtual ~DaqPmtChannel ()
 Destroys this instance of the class.
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream.
unsigned int hitCount () const
 Returns the number of hits seen in this channel.
unsigned int peakCycle (const unsigned int hit) const
 Returns the cycle of the ADC peak for the supplied hit.
bool isHighGainAdc (const unsigned int hit) const
 Returns true if the High Gain ADC was readout for the supplied hit.
unsigned int preAdcRaw (const unsigned int hit) const
 Returns the raw pre-ADC field for the supplied hit.
float preAdcAvg (const unsigned int hit) const
 Returns the average pre-ADC for subtraction from the adc.
unsigned int adc (const unsigned int hit) const
 Returns the ADC value for the supplied hit.
float deltaAdc (const unsigned int hit) const
 Returns the difference between ADC and preADC value.
unsigned int tdc (const unsigned int hit) const
 Returns the TDC value for the supplied hit.
void addHit (const unsigned int hitNumber, const unsigned int peakCycle, const bool isHighGainAdc, const unsigned int pedestal, const unsigned int charge, const unsigned int time)
 Adds the supplied information as new FeeHit to this channel.
void addHit (const DybDaq::FeeHit &feeHit)
 Adds the supplied FeeHit to this channel.
const DayaBay::FeeChannelIdchannelId () 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 Types

typedef std::vector< const
DybDaq::FeeHit * > 
FeeHitPtrList
 A list containing pointers to the FEE hits.

Private Member Functions

const FeeHitPtrListfeeHits () const
 Returns the list containing pointers to the FEE hits in this channel.

Private Attributes

FeeHitPtrListm_feeHits
 The list containing pointers to the FEE hits in this channel.
DybDaq::FeeReadoutm_feeReadout
 The FeeReadout to which hits added to this object should be added.
DayaBay::FeeChannelId m_channelId
 The identity of this channel.

Detailed Description

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

Author:
sjpatton@lbl.gov created Mon Apr 11 03:44:54 2011

Definition at line 41 of file DaqPmtChannel.h.


Member Typedef Documentation

typedef std::vector<const DybDaq::FeeHit*> DayaBay::DaqPmtChannel::FeeHitPtrList [private]

A list containing pointers to the FEE hits.

Definition at line 141 of file DaqPmtChannel.h.


Constructor & Destructor Documentation

DaqPmtChannel::DaqPmtChannel ( const DybDaq::FeeHit feeHit,
const DayaBay::FeeChannelId channelId 
)

Constructor for read-only instance.

Definition at line 28 of file DaqPmtChannel.cc.

00029                                                                    :
00030     m_feeHits(0),
00031     m_feeReadout(0),
00032     m_channelId(channelId) {
00033     addHit(feeHit);
00034 }

DaqPmtChannel::DaqPmtChannel ( const DayaBay::FeeChannelId channelId,
DybDaq::FeeReadout feeReadout 
)

Constructor for read-write instance.

Definition at line 21 of file DaqPmtChannel.cc.

00022                                                      :
00023     m_feeHits(0),
00024     m_feeReadout(&feeReadout),
00025     m_channelId(channelId) {
00026 }

DayaBay::DaqPmtChannel::DaqPmtChannel (  )  [inline]

Default Constructor.

Definition at line 54 of file DaqPmtChannel.h.

00054                     : m_feeHits(0),
00055                       m_feeReadout(0),
00056                       m_channelId() {}

DaqPmtChannel::~DaqPmtChannel (  )  [virtual]

Destroys this instance of the class.

Definition at line 36 of file DaqPmtChannel.cc.

00036                               {
00037     if (0 != m_feeHits) {
00038         delete m_feeHits;
00039     }
00040 }


Member Function Documentation

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

Fill the ASCII output stream.

Definition at line 165 of file DaqPmtChannel.h.

00166 {
00167   s << "{ " << "feeHits :       " << m_feeHits << std::endl
00168             << "feeReadout :    " << m_feeReadout << std::endl
00169             << "channelId :     " << m_channelId << std::endl << " }";
00170   return s;
00171 }

unsigned int DaqPmtChannel::hitCount (  )  const

Returns the number of hits seen in this channel.

Definition at line 42 of file DaqPmtChannel.cc.

00042                                            {
00043     return feeHits().size();
00044 }

unsigned int DaqPmtChannel::peakCycle ( const unsigned int  hit  )  const

Returns the cycle of the ADC peak for the supplied hit.

Definition at line 46 of file DaqPmtChannel.cc.

00046                                                                   {
00047     return feeHits().at(hit)->peakCycle();
00048 }

bool DaqPmtChannel::isHighGainAdc ( const unsigned int  hit  )  const

Returns true if the High Gain ADC was readout for the supplied hit.

Definition at line 50 of file DaqPmtChannel.cc.

00050                                                               {
00051     return !(feeHits().at(hit)->isHighRangeAdc());
00052 }

unsigned int DaqPmtChannel::preAdcRaw ( const unsigned int  hit  )  const

Returns the raw pre-ADC field for the supplied hit.

Definition at line 54 of file DaqPmtChannel.cc.

00054                                                                   {
00055     return feeHits().at(hit)->preAdc();
00056 }

float DaqPmtChannel::preAdcAvg ( const unsigned int  hit  )  const

Returns the average pre-ADC for subtraction from the adc.

Definition at line 58 of file DaqPmtChannel.cc.

00058                                                            {
00059     if(feeHits().at(hit)->feeTraits().majorVersion() == 0
00060        && feeHits().at(hit)->feeTraits().minorVersion() < 2){
00061         return float(this->preAdcRaw(hit));
00062     }
00063     return float(this->preAdcRaw(hit)) / 4.0;
00064 }

unsigned int DaqPmtChannel::adc ( const unsigned int  hit  )  const

Returns the ADC value for the supplied hit.

Definition at line 66 of file DaqPmtChannel.cc.

00066                                                             {
00067     return feeHits().at(hit)->adc();
00068 }

float DaqPmtChannel::deltaAdc ( const unsigned int  hit  )  const

Returns the difference between ADC and preADC value.

Definition at line 70 of file DaqPmtChannel.cc.

00070                                                           {
00071     return this->adc(hit) - this->preAdcAvg(hit);
00072 }

unsigned int DaqPmtChannel::tdc ( const unsigned int  hit  )  const

Returns the TDC value for the supplied hit.

Definition at line 74 of file DaqPmtChannel.cc.

00074                                                             {
00075     return feeHits().at(hit)->tdc();
00076 }

void DaqPmtChannel::addHit ( const unsigned int  hitNumber,
const unsigned int  peakCycle,
const bool  isHighGainAdc,
const unsigned int  pedestal,
const unsigned int  charge,
const unsigned int  time 
)

Adds the supplied information as new FeeHit to this channel.

Definition at line 86 of file DaqPmtChannel.cc.

00091                                                     {
00092     const FeeHit& feeHit = m_feeReadout->addHit(m_channelId.connector() - 1,
00093                                                 peakCycle,
00094                                                 !isHighGainAdc,
00095                                                 pedestal,
00096                                                 charge,
00097                                                 hitNumber,
00098                                                 time);
00099     addHit(feeHit);
00100 }

void DaqPmtChannel::addHit ( const DybDaq::FeeHit feeHit  ) 

Adds the supplied FeeHit to this channel.

Definition at line 102 of file DaqPmtChannel.cc.

00102                                                {
00103     // TODO: Make sure the hits are in order! (eventually)
00104     feeHits();
00105     m_feeHits->push_back(&feeHit);
00106 }

const DayaBay::FeeChannelId & DayaBay::DaqPmtChannel::channelId (  )  const [inline]

Retrieve const The identity of this channel.

Definition at line 174 of file DaqPmtChannel.h.

00175 {
00176   return m_channelId;
00177 }

static void* DayaBay::DaqPmtChannel::operator new ( size_t  size  )  [inline, static]

operator new

Definition at line 106 of file DaqPmtChannel.h.

00107     {
00108       return ( sizeof(DaqPmtChannel) == size ? 
00109                boost::singleton_pool<DaqPmtChannel, sizeof(DaqPmtChannel)>::malloc() :
00110                ::operator new(size) );
00111     }

static void* DayaBay::DaqPmtChannel::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 116 of file DaqPmtChannel.h.

00117     {
00118       return ::operator new (size,pObj);
00119     }

static void DayaBay::DaqPmtChannel::operator delete ( void *  p  )  [inline, static]

operator delete

Definition at line 122 of file DaqPmtChannel.h.

00123     {
00124       boost::singleton_pool<DaqPmtChannel, sizeof(DaqPmtChannel)>::is_from(p) ?
00125       boost::singleton_pool<DaqPmtChannel, sizeof(DaqPmtChannel)>::free(p) :
00126       ::operator delete(p);
00127     }

static void DayaBay::DaqPmtChannel::operator delete ( void *  p,
void *  pObj 
) [inline, static]

placement operator delete not sure if really needed, but it does not harm

Definition at line 131 of file DaqPmtChannel.h.

00132     {
00133       ::operator delete (p, pObj);
00134     }

const DaqPmtChannel::FeeHitPtrList & DaqPmtChannel::feeHits (  )  const [private]

Returns the list containing pointers to the FEE hits in this channel.

Definition at line 78 of file DaqPmtChannel.cc.

00078                                                                {
00079     if (0 == m_feeHits) {
00080         FeeHitPtrList** hits = const_cast<FeeHitPtrList**>(&m_feeHits);
00081         *(hits) = new FeeHitPtrList();
00082     }
00083     return *m_feeHits;
00084 }


Member Data Documentation

FeeHitPtrList* DayaBay::DaqPmtChannel::m_feeHits [private]

The list containing pointers to the FEE hits in this channel.

Definition at line 146 of file DaqPmtChannel.h.

DybDaq::FeeReadout* DayaBay::DaqPmtChannel::m_feeReadout [private]

The FeeReadout to which hits added to this object should be added.

Definition at line 147 of file DaqPmtChannel.h.

DayaBay::FeeChannelId DayaBay::DaqPmtChannel::m_channelId [private]

The identity of this channel.

Definition at line 148 of file DaqPmtChannel.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 Mon Apr 11 20:24:29 2011 for DaqEvent by doxygen 1.4.7