CMS 3D CMS Logo

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

198 : data_(data) {}
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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, sistrip::SCOPE_MODE_MAX_SCOPE_LENGTH, and contentValuesCheck::ss.

12  : data_(FEDCH_PER_FED, ChannelData(dataIsAlreadyConvertedTo8Bit, samplesPerChannel)) {
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 201 of file SiStripFEDBufferGenerator.h.

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

201  {
202  return const_cast<FEDStripData::ChannelData&>(std::as_const(*this).channel(internalFEDChannelNum));
203  }
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
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.

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

References channel().

205  {
207  }
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 209 of file SiStripFEDBufferGenerator.h.

References channel().

209  {
211  }
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