/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 | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
PerDaqPmtCrate Class Reference

#include <PerDaqPmtCrate.h>

Inheritance diagram for PerDaqPmtCrate:
Inheritance graph
[legend]
Collaboration diagram for PerDaqPmtCrate:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< const
PerUintValue * > 
AdcPeakValues
 The list of ADC peak cycle values.
typedef std::vector< const
PerUintValue * > 
AdcValues
 The list of ADCs values.
typedef std::vector< const
PerUintValue * > 
PreAdcValues
 The list of pre-ADCs values.
typedef std::vector< const
PerUintValue * > 
GainValues
 The list of High Gain values.
typedef std::vector< const
PerUintValue * > 
TdcValues
 The list of TDCs values.
typedef std::vector
< DayaBay::DaqPmtChannel * > 
PmtChannelPtrList
typedef std::vector
< DayaBay::DaqFadcChannel * > 
FadcChannelPtrList

Public Member Functions

 PerDaqPmtCrate (const DybDaq::EventReadout *eventReadout)
 Constructor for read-only instance.
 PerDaqPmtCrate (const PerDaqPmtCrate &rhs)
 Creates an instance of this class.
virtual ~PerDaqPmtCrate ()
 Destroy this instance of the class.
const DayaBay::DaqPmtChannelchannel (const DayaBay::FeeChannelId &channelId) const
const
DaqPmtCrate::PmtChannelPtrList & 
channel (int board, int chan) const
const AdcPeakValuespeaks (int board, int channel, int highGain=1) const
 Returns a vector containing 0 all the ADC values for the specified board, channel, and gain.
const AdcValuesadcs (int board, int channel, int highGain=1) const
 Returns a vector containing all the ADC values for the specified board, channel, and gain.
const PreAdcValuespreAdcRaws (int board, int channel, int highGain=1) const
 Returns a vector containing all the raw pre-ADC values for the specified board, channel, and gain.
const GainValuesgains (int board, int channel) const
 Returns a vector containing 0 all the ADC values for the specified board, channel, and gain.
const TdcValuestdcs (int board, int channel, int highGain=1) const
 Returns a vector containing 0 all the ADC values for the specified board, channel, and gain.
virtual std::ostream & fillStream (std::ostream &s) const
virtual bool hasTriggers () const
virtual const TimeStamptriggerTime () const
virtual double triggerSpan () const
virtual Trigger::TriggerType_t triggerType () const
virtual unsigned int localTriggerNumber () const
virtual bool addLtb (const DaqLtb *ltb, const unsigned int slot)
const DayaBay::DaqLtblocalTriggerBoard () const
const PmtChannelPtrListchannelReadouts () const
const PmtChannelPtrListpmtChannelReadouts () const
bool hasChannel (const DayaBay::FeeChannelId &channelId) const
bool hasChannel (const DayaBay::FadcChannelId &channelId) const
DaqPmtChannel & channel (const DayaBay::FeeChannelId &channelId)
const DaqFadcChannel & channel (const DayaBay::FadcChannelId &channelId) const
DaqFadcChannel & channel (const DayaBay::FadcChannelId &channelId)
const FadcChannelPtrListfadcChannelReadouts () const
virtual void fixTriggerTime (const TimeStamp &time)
const DayaBay::DaqPmtCrateasPmtCrate () const
const DayaBay::DaqRpcCrateasRpcCrate () const
const DayaBay::Detectordetector () const
unsigned int eventNumber () const
const DybDaq::EventReadouteventReadout () const
unsigned int runNumber () const

Static Public Member Functions

static void * operator new (size_t size)
static void * operator new (size_t size, void *pObj)
static void operator delete (void *p)
static void operator delete (void *p, void *pObj)

Protected Member Functions

DybDaq::EventReadouteventReadout ()
void assignment (const DayaBay::DaqCrate &rhs)

Private Member Functions

 PerDaqPmtCrate ()
 Suppress default.
PerDaqPmtCrateoperator= (const PerDaqPmtCrate &rhs)
 Suppress default.

Private Attributes

std::vector< const
PerUintValue * > * 
m_returnedPeaks
 Temporary holding vector for results.
std::vector< const
PerUintValue * > * 
m_returnedAdcs
 Temporary holding vector for results.
std::vector< const
PerUintValue * > * 
m_returnedPreAdcs
 Temporary holding vector for results.
std::vector< const
PerUintValue * > * 
m_returnedGains
 Temporary holding vector for results.
std::vector< const
PerUintValue * > * 
m_returnedTdcs
 Temporary holding vector for results.

Static Private Attributes

static
DaqPmtCrate::PmtChannelPtrList * 
m_channels = new DaqPmtCrate::PmtChannelPtrList()
 The common list to return channels.

Detailed Description

Definition at line 16 of file PerDaqPmtCrate.h.


Member Typedef Documentation

typedef std::vector<const PerUintValue*> PerDaqPmtCrate::AdcPeakValues

The list of ADC peak cycle values.

Definition at line 23 of file PerDaqPmtCrate.h.

typedef std::vector<const PerUintValue*> PerDaqPmtCrate::AdcValues

The list of ADCs values.

Definition at line 28 of file PerDaqPmtCrate.h.

typedef std::vector<const PerUintValue*> PerDaqPmtCrate::PreAdcValues

The list of pre-ADCs values.

Definition at line 33 of file PerDaqPmtCrate.h.

typedef std::vector<const PerUintValue*> PerDaqPmtCrate::GainValues

The list of High Gain values.

Definition at line 38 of file PerDaqPmtCrate.h.

typedef std::vector<const PerUintValue*> PerDaqPmtCrate::TdcValues

The list of TDCs values.

Definition at line 43 of file PerDaqPmtCrate.h.


Constructor & Destructor Documentation

PerDaqPmtCrate::PerDaqPmtCrate ( const DybDaq::EventReadout eventReadout)

Constructor for read-only instance.

Definition at line 20 of file PerDaqPmtCrate.cc.

PerDaqPmtCrate::PerDaqPmtCrate ( const PerDaqPmtCrate rhs)

Creates an instance of this class.

Definition at line 29 of file PerDaqPmtCrate.cc.

PerDaqPmtCrate::~PerDaqPmtCrate ( ) [virtual]

Destroy this instance of the class.

Definition at line 38 of file PerDaqPmtCrate.cc.

                                {
  if (0 != m_returnedTdcs) {
    const std::vector<const PerUintValue*>::const_iterator finished = m_returnedTdcs->end();
    for (std::vector<const PerUintValue*>::const_iterator iterator = m_returnedTdcs->begin();
         finished != iterator;
         ++iterator) {
      delete (PerUintValue*)(*iterator);
    }
    delete m_returnedTdcs;
  }
  if (0 != m_returnedGains) {
    const std::vector<const PerUintValue*>::const_iterator finished = m_returnedGains->end();
    for (std::vector<const PerUintValue*>::const_iterator iterator = m_returnedGains->begin();
         finished != iterator;
         ++iterator) {
      delete (PerUintValue*)(*iterator);
    }
    delete m_returnedGains;
  }
  if (0 != m_returnedAdcs) {
    const std::vector<const PerUintValue*>::const_iterator finished = m_returnedAdcs->end();
    for (std::vector<const PerUintValue*>::const_iterator iterator = m_returnedAdcs->begin();
         finished != iterator;
         ++iterator) {
      delete (PerUintValue*)(*iterator);
    }
    delete m_returnedAdcs;
  }
  if (0 != m_returnedPreAdcs) {
    const std::vector<const PerUintValue*>::const_iterator finished = m_returnedPreAdcs->end();
    for (std::vector<const PerUintValue*>::const_iterator iterator = m_returnedPreAdcs->begin();
         finished != iterator;
         ++iterator) {
      delete (PerUintValue*)(*iterator);
    }
    delete m_returnedPreAdcs;
  }
  if (0 != m_returnedPeaks) {
    const std::vector<const PerUintValue*>::const_iterator finished = m_returnedPeaks->end();
    for (std::vector<const PerUintValue*>::const_iterator iterator = m_returnedPeaks->begin();
         finished != iterator;
         ++iterator) {
      delete (PerUintValue*)(*iterator);
    }
    delete m_returnedPeaks;
  }
}
PerDaqPmtCrate::PerDaqPmtCrate ( ) [private]

Suppress default.


Member Function Documentation

const DaqPmtChannel & PerDaqPmtCrate::channel ( const DayaBay::FeeChannelId channelId) const

Reimplemented from DayaBay::DaqPmtCrate.

Definition at line 86 of file PerDaqPmtCrate.cc.

                                                                                       {
  return DaqPmtCrate::channel(channelId);
}
const DaqPmtCrate::PmtChannelPtrList & PerDaqPmtCrate::channel ( int  board,
int  chan 
) const

Definition at line 90 of file PerDaqPmtCrate.cc.

                                                                                     {
  m_channels->clear();
  m_channels->push_back(const_cast<DayaBay::DaqPmtChannel*>(&(channel(FeeChannelId(board, chan, (Site::Site_t)0, (DetectorId::DetectorId_t)0)))));
  return *m_channels;
}
const PerDaqPmtCrate::AdcPeakValues & PerDaqPmtCrate::peaks ( int  board,
int  channel,
int  highGain = 1 
) const

Returns a vector containing 0 all the ADC values for the specified board, channel, and gain.

Definition at line 96 of file PerDaqPmtCrate.cc.

                                                                                                {
  if (0 != m_returnedPeaks) {
    delete m_returnedPeaks;
  }
  m_returnedPeaks = new std::vector<const PerUintValue*>();

  const DaqPmtChannel& channelToUse = channel(FeeChannelId(board, chan, (Site::Site_t)0, (DetectorId::DetectorId_t)0));
  if (0 != &channelToUse) {
    const unsigned int finished = channelToUse.hitCount();
    for(unsigned int hit = 0; finished != hit; ++hit) {
      if (0 == highGain && !channelToUse.isHighGainAdc(hit)) {
        m_returnedPeaks->push_back(new PerUintValue(channelToUse.peakCycle(hit)));
      } else if (1 == highGain && channelToUse.isHighGainAdc(hit)) {
        m_returnedPeaks->push_back(new PerUintValue(channelToUse.peakCycle(hit)));
      }
    }
  }
  return *m_returnedPeaks;
}
const PerDaqPmtCrate::AdcValues & PerDaqPmtCrate::adcs ( int  board,
int  channel,
int  highGain = 1 
) const

Returns a vector containing all the ADC values for the specified board, channel, and gain.

Definition at line 116 of file PerDaqPmtCrate.cc.

                                                                                           {
  if (0 != m_returnedAdcs) {
    delete m_returnedAdcs;
  }
  m_returnedAdcs = new std::vector<const PerUintValue*>();

  const DaqPmtChannel& channelToUse = channel(FeeChannelId(board, chan, (Site::Site_t)0, (DetectorId::DetectorId_t)0));
  if (0 != &channelToUse) {
    const unsigned int finished = channelToUse.hitCount();
    for(unsigned int hit = 0; finished != hit; ++hit) {
      if (0 == highGain && !channelToUse.isHighGainAdc(hit)) {
        m_returnedAdcs->push_back(new PerUintValue(channelToUse.adc(hit)));
      } else if (1 == highGain && channelToUse.isHighGainAdc(hit)) {
        m_returnedAdcs->push_back(new PerUintValue(channelToUse.adc(hit)));
      }
    }
  }
  return *m_returnedAdcs;
}
const PerDaqPmtCrate::PreAdcValues & PerDaqPmtCrate::preAdcRaws ( int  board,
int  channel,
int  highGain = 1 
) const

Returns a vector containing all the raw pre-ADC values for the specified board, channel, and gain.

Definition at line 136 of file PerDaqPmtCrate.cc.

                                                                                                    {
  if (0 != m_returnedPreAdcs) {
    delete m_returnedPreAdcs;
  }
  m_returnedPreAdcs = new std::vector<const PerUintValue*>();

  const DaqPmtChannel& channelToUse = channel(FeeChannelId(board, chan, (Site::Site_t)0, (DetectorId::DetectorId_t)0));
  if (0 != &channelToUse) {
    const unsigned int finished = channelToUse.hitCount();
    for(unsigned int hit = 0; finished != hit; ++hit) {
      if (0 == highGain && !channelToUse.isHighGainAdc(hit)) {
        m_returnedPreAdcs->push_back(new PerUintValue(channelToUse.preAdcRaw(hit)));
      } else if (1 == highGain && channelToUse.isHighGainAdc(hit)) {
        m_returnedPreAdcs->push_back(new PerUintValue(channelToUse.preAdcRaw(hit)));
      }
    }
  }
  return *m_returnedPreAdcs;
}
const PerDaqPmtCrate::GainValues & PerDaqPmtCrate::gains ( int  board,
int  channel 
) const

Returns a vector containing 0 all the ADC values for the specified board, channel, and gain.

Definition at line 156 of file PerDaqPmtCrate.cc.

                                                                               {
  if (0 != m_returnedGains) {
    delete m_returnedGains;
  }
  m_returnedGains = new std::vector<const PerUintValue*>();

  const DaqPmtChannel& channelToUse = channel(FeeChannelId(board, chan, (Site::Site_t)0, (DetectorId::DetectorId_t)0));
  if (0 != &channelToUse) {
    const unsigned int finished = channelToUse.hitCount();
    for(unsigned int hit = 0; finished != hit; ++hit) {
      if (!channelToUse.isHighGainAdc(hit)) {
        m_returnedGains->push_back(new PerUintValue(0));
      } else {
        m_returnedGains->push_back(new PerUintValue(1));
      }
    }
  }
  return *m_returnedGains;
}
const PerDaqPmtCrate::TdcValues & PerDaqPmtCrate::tdcs ( int  board,
int  channel,
int  highGain = 1 
) const

Returns a vector containing 0 all the ADC values for the specified board, channel, and gain.

Definition at line 176 of file PerDaqPmtCrate.cc.

                                                                                           {
  if (0 != m_returnedTdcs) {
    delete m_returnedTdcs;
  }
  m_returnedTdcs = new std::vector<const PerUintValue*>();

  const DaqPmtChannel& channelToUse = channel(FeeChannelId(board, chan, (Site::Site_t)0, (DetectorId::DetectorId_t)0));
  if (0 != &channelToUse) {
    const unsigned int finished = channelToUse.hitCount();
    for(unsigned int hit = 0; finished != hit; ++hit) {
      if (0 == highGain && !channelToUse.isHighGainAdc(hit)) {
        m_returnedTdcs->push_back(new PerUintValue(channelToUse.tdc(hit)));
      } else if (1 == highGain && channelToUse.isHighGainAdc(hit)) {
        m_returnedTdcs->push_back(new PerUintValue(channelToUse.tdc(hit)));
      }
    }
  }
  return *m_returnedTdcs;
}
PerDaqPmtCrate& PerDaqPmtCrate::operator= ( const PerDaqPmtCrate rhs) [private]

Suppress default.


Member Data Documentation

std::vector<const PerUintValue*>* PerDaqPmtCrate::m_returnedPeaks [mutable, private]

Temporary holding vector for results.

Definition at line 106 of file PerDaqPmtCrate.h.

std::vector<const PerUintValue*>* PerDaqPmtCrate::m_returnedAdcs [mutable, private]

Temporary holding vector for results.

Definition at line 111 of file PerDaqPmtCrate.h.

std::vector<const PerUintValue*>* PerDaqPmtCrate::m_returnedPreAdcs [mutable, private]

Temporary holding vector for results.

Definition at line 116 of file PerDaqPmtCrate.h.

std::vector<const PerUintValue*>* PerDaqPmtCrate::m_returnedGains [mutable, private]

Temporary holding vector for results.

Definition at line 121 of file PerDaqPmtCrate.h.

std::vector<const PerUintValue*>* PerDaqPmtCrate::m_returnedTdcs [mutable, private]

Temporary holding vector for results.

Definition at line 126 of file PerDaqPmtCrate.h.

DaqPmtCrate::PmtChannelPtrList * PerDaqPmtCrate::m_channels = new DaqPmtCrate::PmtChannelPtrList() [static, private]

The common list to return channels.

This is shared between all instances!

Definition at line 131 of file PerDaqPmtCrate.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:05:05 for PerReadoutEvent by doxygen 1.7.4