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 (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

◆ FEDStripData() [1/2]

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

Definition at line 198 of file SiStripFEDBufferGenerator.h.

198 : data_(data) {}

◆ FEDStripData() [2/2]

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

Definition at line 11 of file SiStripFEDBufferGenerator.cc.

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  }

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

Member Function Documentation

◆ channel() [1/2]

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

Definition at line 201 of file SiStripFEDBufferGenerator.h.

201  {
202  return const_cast<FEDStripData::ChannelData&>(std::as_const(*this).channel(internalFEDChannelNum));
203  }

References sistrip::internalFEDChannelNum().

Referenced by operator[]().

◆ channel() [2/2]

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

Definition at line 21 of file SiStripFEDBufferGenerator.cc.

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  }

References data_, Exception, sistrip::internalFEDChannelNum(), and contentValuesCheck::ss.

◆ operator[]() [1/2]

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

Definition at line 205 of file SiStripFEDBufferGenerator.h.

205  {
207  }

References channel(), and sistrip::internalFEDChannelNum().

◆ operator[]() [2/2]

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

Definition at line 209 of file SiStripFEDBufferGenerator.h.

209  {
211  }

References channel(), and sistrip::internalFEDChannelNum().

Member Data Documentation

◆ data_

std::vector<ChannelData> sistrip::FEDStripData::data_
private
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
sistrip::internalFEDChannelNum
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
Definition: SiStripFEDBufferComponents.h:785
sistrip::FEDStripData::channel
ChannelData & channel(const uint8_t internalFEDChannelNum)
Definition: SiStripFEDBufferGenerator.h:201
Exception
Definition: hltDiff.cc:245
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
sistrip::FEDCH_PER_FED
static const uint16_t FEDCH_PER_FED
Definition: ConstantsForHardwareSystems.h:30
sistrip::FEDStripData::data_
std::vector< ChannelData > data_
Definition: SiStripFEDBufferGenerator.h:59
sistrip::SCOPE_MODE_MAX_SCOPE_LENGTH
static const uint16_t SCOPE_MODE_MAX_SCOPE_LENGTH
Definition: SiStripFEDBufferComponents.h:24