CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 177 of file SiStripFEDBufferGenerator.h.

sistrip::FEDStripData::FEDStripData ( bool  dataIsAlreadyConvertedTo8Bit = true,
const size_t  samplesPerChannel = STRIPS_PER_FEDCH 
)

Definition at line 10 of file SiStripFEDBufferGenerator.cc.

References Exception, sistrip::SCOPE_MODE_MAX_SCOPE_LENGTH, and contentValuesCheck::ss.

11  : data_(FEDCH_PER_FED,ChannelData(dataIsAlreadyConvertedTo8Bit,samplesPerChannel))
12  {
13  if (samplesPerChannel > SCOPE_MODE_MAX_SCOPE_LENGTH) {
14  std::ostringstream ss;
15  ss << "Scope length " << samplesPerChannel << " is too long. "
16  << "Max scope length is " << SCOPE_MODE_MAX_SCOPE_LENGTH << ".";
17  throw cms::Exception("FEDBufferGenerator") << ss.str();
18  }
19  }
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 182 of file SiStripFEDBufferGenerator.h.

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

183  {
184  return const_cast<ChannelData&>(static_cast<const FEDStripData*>(this)->channel(internalFEDChannelNum));
185  }
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 21 of file SiStripFEDBufferGenerator.cc.

References data_, Exception, and contentValuesCheck::ss.

22  {
23  try {
24  return data_.at(internalFEDChannelNum);
25  } catch (const std::out_of_range&) {
26  std::ostringstream ss;
27  ss << "Channel index out of range. (" << uint16_t(internalFEDChannelNum) << ") "
28  << "Index should be in internal numbering scheme (0-95). ";
29  throw cms::Exception("FEDBufferGenerator") << ss.str();
30  }
31  }
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 187 of file SiStripFEDBufferGenerator.h.

References channel().

188  {
190  }
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 192 of file SiStripFEDBufferGenerator.h.

References channel().

193  {
195  }
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