test
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 180 of file SiStripFEDBufferGenerator.h.

181  : data_(data)
182  { }
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 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 185 of file SiStripFEDBufferGenerator.h.

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

186  {
187  return const_cast<ChannelData&>(static_cast<const FEDStripData*>(this)->channel(internalFEDChannelNum));
188  }
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 190 of file SiStripFEDBufferGenerator.h.

References channel().

191  {
193  }
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 195 of file SiStripFEDBufferGenerator.h.

References channel().

196  {
198  }
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