CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

sistrip::FEDStripData Class Reference

#include <SiStripFEDBufferGenerator.h>

List of all members.

Classes

class  ChannelData

Public Member Functions

ChannelDatachannel (const uint8_t internalFEDChannelNum)
const ChannelDatachannel (const uint8_t internalFEDChannelNum) const
 FEDStripData (bool dataIsAlreadyConvertedTo8Bit=true, const size_t samplesPerChannel=STRIPS_PER_FEDCH)
 FEDStripData (const std::vector< ChannelData > &data)
ChannelDataoperator[] (const uint8_t internalFEDChannelNum)
const ChannelDataoperator[] (const uint8_t internalFEDChannelNum) const

Private Attributes

std::vector< ChannelDatadata_

Detailed Description

Definition at line 18 of file SiStripFEDBufferGenerator.h.


Constructor & Destructor Documentation

sistrip::FEDStripData::FEDStripData ( const std::vector< ChannelData > &  data) [inline]

Definition at line 177 of file SiStripFEDBufferGenerator.h.

    : data_(data)
    { }
sistrip::FEDStripData::FEDStripData ( bool  dataIsAlreadyConvertedTo8Bit = true,
const size_t  samplesPerChannel = STRIPS_PER_FEDCH 
)

Definition at line 10 of file SiStripFEDBufferGenerator.cc.

References Exception, and sistrip::SCOPE_MODE_MAX_SCOPE_LENGTH.

    : data_(FEDCH_PER_FED,ChannelData(dataIsAlreadyConvertedTo8Bit,samplesPerChannel))
  {
    if (samplesPerChannel > SCOPE_MODE_MAX_SCOPE_LENGTH) {
      std::ostringstream ss;
      ss << "Scope length " << samplesPerChannel << " is too long. "
         << "Max scope length is " << SCOPE_MODE_MAX_SCOPE_LENGTH << ".";
      throw cms::Exception("FEDBufferGenerator") << ss.str();
    }
  }

Member Function Documentation

FEDStripData::ChannelData & sistrip::FEDStripData::channel ( const uint8_t  internalFEDChannelNum) [inline]

Definition at line 182 of file SiStripFEDBufferGenerator.h.

Referenced by sistrip::FEDBufferPayloadCreator::createPayload(), and operator[]().

    {
      return const_cast<ChannelData&>(static_cast<const FEDStripData*>(this)->channel(internalFEDChannelNum));
    }
const FEDStripData::ChannelData & sistrip::FEDStripData::channel ( const uint8_t  internalFEDChannelNum) const

Definition at line 21 of file SiStripFEDBufferGenerator.cc.

References data_, and Exception.

  {
    try {
      return data_.at(internalFEDChannelNum);
    } catch (const std::out_of_range&) {
      std::ostringstream ss;
      ss << "Channel index out of range. (" << uint16_t(internalFEDChannelNum) << ") "
         << "Index should be in internal numbering scheme (0-95). ";
      throw cms::Exception("FEDBufferGenerator") << ss.str();
    }
  }
FEDStripData::ChannelData & sistrip::FEDStripData::operator[] ( const uint8_t  internalFEDChannelNum) [inline]

Definition at line 187 of file SiStripFEDBufferGenerator.h.

References channel().

const FEDStripData::ChannelData & sistrip::FEDStripData::operator[] ( const uint8_t  internalFEDChannelNum) const [inline]

Definition at line 192 of file SiStripFEDBufferGenerator.h.

References channel().


Member Data Documentation

std::vector<ChannelData> sistrip::FEDStripData::data_ [private]