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

In This Package:

Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
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:
Collaboration graph
[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 Thu Dec 5 17:51:49 2013

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 33 of file DaqPmtChannel.cc.

                                                                   :
    m_feeHits(0),
    m_feeReadout(0),
    m_channelId(channelId) {
    addHit(feeHit);
}
DaqPmtChannel::DaqPmtChannel ( const DayaBay::FeeChannelId channelId,
DybDaq::FeeReadout feeReadout 
)

Constructor for read-write instance.

Definition at line 26 of file DaqPmtChannel.cc.

                                                     :
    m_feeHits(0),
    m_feeReadout(&feeReadout),
    m_channelId(channelId) {
}
DayaBay::DaqPmtChannel::DaqPmtChannel ( ) [inline]

Default Constructor.

Definition at line 54 of file DaqPmtChannel.h.

DaqPmtChannel::~DaqPmtChannel ( ) [virtual]

Destroys this instance of the class.

Definition at line 41 of file DaqPmtChannel.cc.

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

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.

{
  s << "{ " << "feeHits :       " << m_feeHits << std::endl
            << "feeReadout :    " << m_feeReadout << std::endl
            << "channelId :     " << m_channelId << std::endl << " }";
  return s;
}
unsigned int DaqPmtChannel::hitCount ( ) const

Returns the number of hits seen in this channel.

Definition at line 47 of file DaqPmtChannel.cc.

                                           {
    return feeHits().size();
}
unsigned int DaqPmtChannel::peakCycle ( const unsigned int  hit) const

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

Definition at line 51 of file DaqPmtChannel.cc.

                                                                  {
    return feeHits().at(hit)->peakCycle();
}
bool DaqPmtChannel::isHighGainAdc ( const unsigned int  hit) const

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

Definition at line 55 of file DaqPmtChannel.cc.

                                                              {
    return !(feeHits().at(hit)->isHighRangeAdc());
}
unsigned int DaqPmtChannel::preAdcRaw ( const unsigned int  hit) const

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

Definition at line 59 of file DaqPmtChannel.cc.

                                                                  {
    return feeHits().at(hit)->preAdc();
}
float DaqPmtChannel::preAdcAvg ( const unsigned int  hit) const

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

Definition at line 63 of file DaqPmtChannel.cc.

                                                           {
    if(feeHits().at(hit)->feeTraits().majorVersion() == 0
       && feeHits().at(hit)->feeTraits().minorVersion() < 2){
        return float(this->preAdcRaw(hit));
    }
    return float(this->preAdcRaw(hit)) / 4.0;
}
unsigned int DaqPmtChannel::adc ( const unsigned int  hit) const

Returns the ADC value for the supplied hit.

Definition at line 71 of file DaqPmtChannel.cc.

                                                            {
    return feeHits().at(hit)->adc();
}
float DaqPmtChannel::deltaAdc ( const unsigned int  hit) const

Returns the difference between ADC and preADC value.

Definition at line 75 of file DaqPmtChannel.cc.

                                                          {
    return this->adc(hit) - this->preAdcAvg(hit);
}
unsigned int DaqPmtChannel::tdc ( const unsigned int  hit) const

Returns the TDC value for the supplied hit.

Definition at line 79 of file DaqPmtChannel.cc.

                                                            {
    return feeHits().at(hit)->tdc();
}
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 91 of file DaqPmtChannel.cc.

                                                    {
    const FeeHit& feeHit = m_feeReadout->addHit(m_channelId.connector() - kFeeConnectorOffset,
                                                peakCycle,
                                                !isHighGainAdc,
                                                pedestal,
                                                charge,
                                                hitNumber,
                                                time);
    addHit(feeHit);
}
void DaqPmtChannel::addHit ( const DybDaq::FeeHit feeHit)

Adds the supplied FeeHit to this channel.

Definition at line 107 of file DaqPmtChannel.cc.

                                               {
    // TODO: Make sure the hits are in order! (eventually)
    feeHits();
    m_feeHits->push_back(&feeHit);
}
const DayaBay::FeeChannelId & DayaBay::DaqPmtChannel::channelId ( ) const [inline]

Retrieve const The identity of this channel.

Definition at line 174 of file DaqPmtChannel.h.

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

operator new

Definition at line 106 of file DaqPmtChannel.h.

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

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

operator delete

Definition at line 122 of file DaqPmtChannel.h.

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

    {
      ::operator delete (p, pObj);
    }
const DaqPmtChannel::FeeHitPtrList & DaqPmtChannel::feeHits ( ) const [private]

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

Definition at line 83 of file DaqPmtChannel.cc.

                                                               {
    if (0 == m_feeHits) {
        FeeHitPtrList** hits = const_cast<FeeHitPtrList**>(&m_feeHits);
        *(hits) = new FeeHitPtrList();
    }
    return *m_feeHits;
}

Member Data Documentation

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

Definition at line 146 of file DaqPmtChannel.h.

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

Definition at line 147 of file DaqPmtChannel.h.

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 Fri May 16 2014 10:01:06 for DaqEvent by doxygen 1.7.4