CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
sistrip::FEDStripData Class Reference

#include <SiStripFEDBufferGenerator.h>

Classes

class  ChannelData
 

Public Member Functions

ChannelDatachannel (const uint8_t internalFEDChannelNum)
 
const ChannelDatachannel (const uint8_t internalFEDChannelNum) const
 
 FEDStripData (const std::vector< ChannelData > &data)
 
 FEDStripData (bool dataIsAlreadyConvertedTo8Bit=true, const size_t samplesPerChannel=STRIPS_PER_FEDCH)
 
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 178 of file SiStripFEDBufferGenerator.h.

179  : data_(data)
180  { }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::vector< ChannelData > data_
sistrip::FEDStripData::FEDStripData ( bool  dataIsAlreadyConvertedTo8Bit = true,
const size_t  samplesPerChannel = STRIPS_PER_FEDCH 
)

Definition at line 11 of file SiStripFEDBufferGenerator.cc.

References Exception, and sistrip::SCOPE_MODE_MAX_SCOPE_LENGTH.

12  : data_(FEDCH_PER_FED,ChannelData(dataIsAlreadyConvertedTo8Bit,samplesPerChannel))
13  {
14  if (samplesPerChannel > SCOPE_MODE_MAX_SCOPE_LENGTH) {
15  std::ostringstream ss;
16  ss << "Scope length " << samplesPerChannel << " is too long. "
17  << "Max scope length is " << SCOPE_MODE_MAX_SCOPE_LENGTH << ".";
18  throw cms::Exception("FEDBufferGenerator") << ss.str();
19  }
20  }
static const uint16_t FEDCH_PER_FED
std::vector< ChannelData > data_
static const uint16_t SCOPE_MODE_MAX_SCOPE_LENGTH

Member Function Documentation

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

Definition at line 183 of file SiStripFEDBufferGenerator.h.

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

184  {
185  return const_cast<ChannelData&>(static_cast<const FEDStripData*>(this)->channel(internalFEDChannelNum));
186  }
FEDStripData(const std::vector< ChannelData > &data)
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
ChannelData & channel(const uint8_t internalFEDChannelNum)
const FEDStripData::ChannelData & sistrip::FEDStripData::channel ( const uint8_t  internalFEDChannelNum) const

Definition at line 22 of file SiStripFEDBufferGenerator.cc.

References data_, and Exception.

23  {
24  try {
25  return data_.at(internalFEDChannelNum);
26  } catch (const std::out_of_range&) {
27  std::ostringstream ss;
28  ss << "Channel index out of range. (" << uint16_t(internalFEDChannelNum) << ") "
29  << "Index should be in internal numbering scheme (0-95). ";
30  throw cms::Exception("FEDBufferGenerator") << ss.str();
31  }
32  }
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
std::vector< ChannelData > data_
FEDStripData::ChannelData & sistrip::FEDStripData::operator[] ( const uint8_t  internalFEDChannelNum)
inline

Definition at line 188 of file SiStripFEDBufferGenerator.h.

References channel().

189  {
191  }
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
ChannelData & channel(const uint8_t internalFEDChannelNum)
const FEDStripData::ChannelData & sistrip::FEDStripData::operator[] ( const uint8_t  internalFEDChannelNum) const
inline

Definition at line 193 of file SiStripFEDBufferGenerator.h.

References channel().

194  {
196  }
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
ChannelData & channel(const uint8_t internalFEDChannelNum)

Member Data Documentation

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