CMS 3D CMS Logo

SiStripFEDBufferGenerator.h
Go to the documentation of this file.
1 #ifndef EventFilter_SiStripRawToDigi_SiStripFEDBufferGenerator_H
2 #define EventFilter_SiStripRawToDigi_SiStripFEDBufferGenerator_H
3 
6 #include <vector>
7 #include <list>
8 #include <utility>
9 #include <memory>
10 #include <cstdint>
11 
12 namespace sistrip {
13 
14  //
15  // Class definitions
16  //
17 
18  class FEDStripData {
19  public:
20  //class used to represent channel data
21  class ChannelData {
22  public:
23  ChannelData(bool dataIsAlreadyConvertedTo8Bit,
24  const size_t numberOfSamples,
25  const std::pair<uint16_t, uint16_t> medians = std::make_pair<uint16_t>(0, 0));
26  //number of samples
27  size_t size() const;
28  //get common mode medians for first and second APV
29  std::pair<uint16_t, uint16_t> getMedians() const;
30  //set common mode medians for first and second APV
31  void setMedians(const std::pair<uint16_t, uint16_t> values);
32  //get the 10bit value to be used for raw modes
33  uint16_t getSample(const uint16_t sampleNumber) const;
34  //get the 8 bit value to be used for ZS modes, converting it as the FED does if specified in constructor
35  uint8_t get8BitSample(const uint16_t sampleNumber, uint16_t nBotBitsToDrop) const;
36  uint16_t get10BitSample(const uint16_t sampleNumber) const;
37  void setSample(const uint16_t sampleNumber, const uint16_t adcValue);
38  //setting value directly is equivalent to get and set Sample but without length check
39  uint16_t& operator[](const size_t sampleNumber);
40  const uint16_t& operator[](const size_t sampleNumber) const;
41 
42  private:
43  std::pair<uint16_t, uint16_t> medians_;
44  std::vector<uint16_t> data_;
46  };
47 
48  FEDStripData(const std::vector<ChannelData>& data);
49  //specify whether the data is already in the 8bit ZS format (only affects what is returned by ChannelData::get8BitSample() if the value if >253)
50  //if the data is for scope mode then specify the scope length
51  FEDStripData(bool dataIsAlreadyConvertedTo8Bit = true, const size_t samplesPerChannel = STRIPS_PER_FEDCH);
52  //access to elements
54  const ChannelData& operator[](const uint8_t internalFEDChannelNum) const;
56  const ChannelData& channel(const uint8_t internalFEDChannelNum) const;
57 
58  private:
59  std::vector<ChannelData> data_;
60  };
61 
63  public:
64  FEDBufferPayload(const std::vector<std::vector<uint8_t> >& channelBuffers);
65  //size of payload in bytes
66  size_t lengthInBytes() const;
67  //returns NULL if payload size is 0, otherwise return a pointer to the payload buffer
68  const uint8_t* data() const;
69  //size of FE unit payload
70  uint16_t getFELength(const uint8_t internalFEUnitNum) const;
71 
72  private:
73  void appendToBuffer(size_t* pIndexInBuffer, const uint8_t value);
74  void appendToBuffer(size_t* pIndexInBuffer,
75  std::vector<uint8_t>::const_iterator start,
76  std::vector<uint8_t>::const_iterator finish);
77  std::vector<uint8_t> data_;
78  std::vector<uint16_t> feLengths_;
79  };
80 
82  public:
83  //specify which FE units and channels should have data generated for them
84  //If an FE unit is disabled then the channel is as well. The whole FE payload will be missing.
85  //If a channel is disabled then it is considered to have all zeros in the data but will be present in the data
86  FEDBufferPayloadCreator(const std::vector<bool>& enabledFEUnits, const std::vector<bool>& enabledChannels);
87  //create the payload for a particular mode
88  FEDBufferPayload createPayload(FEDReadoutMode mode, uint8_t packetCode, const FEDStripData& data) const;
89  FEDBufferPayload operator()(FEDReadoutMode mode, uint8_t packetCode, const FEDStripData& data) const;
90 
91  private:
92  //fill vector with channel data
93  void fillChannelBuffer(std::vector<uint8_t>* channelBuffer,
95  uint8_t packetCode,
97  const bool channelEnabled) const;
98  //fill the vector with channel data for raw mode
99  void fillRawChannelBuffer(std::vector<uint8_t>* channelBuffer,
100  const uint8_t packetCode,
102  const bool channelEnabled,
103  const bool reorderData) const;
104  //fill the vector with channel data for zero suppressed modes
105  void fillZeroSuppressedChannelBuffer(std::vector<uint8_t>* channelBuffer,
106  const uint8_t packetCode,
108  const bool channelEnabled) const;
109  void fillZeroSuppressedLiteChannelBuffer(std::vector<uint8_t>* channelBuffer,
111  const bool channelEnabled,
112  const FEDReadoutMode mode) const;
113  void fillPreMixRawChannelBuffer(std::vector<uint8_t>* channelBuffer,
115  const bool channelEnabled) const;
116  //add the ZS cluster data for the channel to the end of the vector
117  void fillClusterData(std::vector<uint8_t>* channelBuffer,
118  uint8_t packetCode,
120  const FEDReadoutMode mode) const;
121  void fillClusterDataPreMixMode(std::vector<uint8_t>* channelBuffer, const FEDStripData::ChannelData& data) const;
122  std::vector<bool> feUnitsEnabled_;
123  std::vector<bool> channelsEnabled_;
124  };
125 
127  public:
128  //constructor in which you can specify the defaults for some parameters
129  FEDBufferGenerator(const uint32_t l1ID = 0,
130  const uint16_t bxID = 0,
131  const std::vector<bool>& feUnitsEnabled = std::vector<bool>(FEUNITS_PER_FED, true),
132  const std::vector<bool>& channelsEnabled = std::vector<bool>(FEDCH_PER_FED, true),
133  const FEDReadoutMode readoutMode = READOUT_MODE_ZERO_SUPPRESSED,
134  const FEDHeaderType headerType = HEADER_TYPE_FULL_DEBUG,
135  const FEDBufferFormat bufferFormat = BUFFER_FORMAT_OLD_SLINK,
136  const FEDDAQEventType evtType = DAQ_EVENT_TYPE_PHYSICS);
137  //methods to get and set the defaults
138  uint32_t getL1ID() const;
139  uint16_t getBXID() const;
144  FEDBufferGenerator& setL1ID(const uint32_t newL1ID);
145  FEDBufferGenerator& setBXID(const uint16_t newBXID);
146  FEDBufferGenerator& setReadoutMode(const FEDReadoutMode newReadoutMode);
147  FEDBufferGenerator& setHeaderType(const FEDHeaderType newHeaderType);
148  FEDBufferGenerator& setBufferFormat(const FEDBufferFormat newBufferFormat);
149  FEDBufferGenerator& setDAQEventType(const FEDDAQEventType newDAQEventType);
150  //disabled FE units produce no data at all
151  //disabled channels have headers but data is all zeros (raw modes) or have no clusters (ZS)
152  bool getFEUnitEnabled(const uint8_t internalFEUnitNumber) const;
153  bool getChannelEnabled(const uint8_t internalFEDChannelNumber) const;
154  FEDBufferGenerator& setFEUnitEnable(const uint8_t internalFEUnitNumber, const bool enabled);
155  FEDBufferGenerator& setChannelEnable(const uint8_t internalFEDChannelNumber, const bool enabled);
156  FEDBufferGenerator& setFEUnitEnables(const std::vector<bool>& feUnitsEnabled);
157  FEDBufferGenerator& setChannelEnables(const std::vector<bool>& channelsEnabled);
158  //make finer changes to defaults for parts of buffer
159  //setting source ID in DAQ header and length and CRC in DAQ trailer has no effect since they are set when buffer is built
164  //method to generate buffer
165  //unspecified parameters use defaults set by constructor or setters
166  //FEDRawData object will be resized to fit buffer and filled
167  void generateBuffer(FEDRawData* rawDataObject,
168  const FEDStripData& data,
169  uint16_t sourceID,
170  uint8_t packetCode) const;
171 
172  private:
173  //method to fill buffer at pointer from pre generated components (only the length and CRC will be changed)
174  //at least bufferSizeInBytes(feHeader,payload) must have already been allocated
175  static void fillBuffer(uint8_t* pointerToStartOfBuffer,
176  const FEDDAQHeader& daqHeader,
177  const FEDDAQTrailer& daqTrailer,
178  const TrackerSpecialHeader& tkSpecialHeader,
179  const FEDFEHeader& feHeader,
180  const FEDBufferPayload& payload);
181  //returns required size of buffer from given components
182  static size_t bufferSizeInBytes(const FEDFEHeader& feHeader, const FEDBufferPayload& payload);
183  //used to store default values
187  std::unique_ptr<FEDFEHeader> defaultFEHeader_;
188  std::vector<bool> feUnitsEnabled_;
189  std::vector<bool> channelsEnabled_;
190  };
191 
192  //
193  // Inline function definitions
194  //
195 
196  //FEDStripData
197 
198  inline FEDStripData::FEDStripData(const std::vector<ChannelData>& data) : data_(data) {}
199 
200  //re-use const method
202  return const_cast<FEDStripData::ChannelData&>(std::as_const(*this).channel(internalFEDChannelNum));
203  }
204 
207  }
208 
211  }
212 
213  inline FEDStripData::ChannelData::ChannelData(bool dataIsAlreadyConvertedTo8Bit,
214  const size_t numberOfSamples,
215  const std::pair<uint16_t, uint16_t> medians)
216  : medians_(medians), data_(numberOfSamples, 0), dataIs8Bit_(dataIsAlreadyConvertedTo8Bit) {}
217 
218  inline size_t FEDStripData::ChannelData::size() const { return data_.size(); }
219 
220  inline const uint16_t& FEDStripData::ChannelData::operator[](const size_t sampleNumber) const {
221  return data_[sampleNumber];
222  }
223 
224  //re-use const method
225  inline uint16_t& FEDStripData::ChannelData::operator[](const size_t sampleNumber) {
226  return const_cast<uint16_t&>(std::as_const(*this)[sampleNumber]);
227  }
228 
229  inline uint16_t FEDStripData::ChannelData::getSample(const uint16_t sampleNumber) const {
230  //try {
231  // return data_.at(sampleNumber);
232  //} catch (const std::out_of_range&) {
233  // std::ostringstream ss;
234  // ss << "Sample index out of range. "
235  // << "Requesting sample " << sampleNumber
236  // << " when channel has only " << data_.size() << " samples.";
237  // throw cms::Exception("FEDBufferGenerator") << ss.str();
238  //}
239  return data_[sampleNumber];
240  }
241 
242  inline uint8_t FEDStripData::ChannelData::get8BitSample(const uint16_t sampleNumber, uint16_t nBotBitsToDrop) const {
243  uint16_t sample = getSample(sampleNumber) >> nBotBitsToDrop;
244  if (dataIs8Bit_) {
245  return (0xFF & sample);
246  } else {
247  if (sample < 0xFE)
248  return sample;
249  else if (sample == 0x3FF)
250  return 0xFF;
251  else
252  return 0xFE;
253  }
254  }
255 
256  inline uint16_t FEDStripData::ChannelData::get10BitSample(const uint16_t sampleNumber) const {
257  if (dataIs8Bit_) {
258  return (0xFF & getSample(sampleNumber));
259  } else {
260  const uint16_t sample = getSample(sampleNumber);
261  if (sample < 0x3FF)
262  return sample;
263  else
264  return 0x3FF;
265  }
266  }
267 
268  inline std::pair<uint16_t, uint16_t> FEDStripData::ChannelData::getMedians() const { return medians_; }
269 
270  inline void FEDStripData::ChannelData::setMedians(const std::pair<uint16_t, uint16_t> values) { medians_ = values; }
271 
272  //FEDBufferPayload
273 
274  inline size_t FEDBufferPayload::lengthInBytes() const { return data_.size(); }
275 
276  inline void FEDBufferPayload::appendToBuffer(size_t* pIndexInBuffer, const uint8_t value) {
277  data_[((*pIndexInBuffer)++) ^ 7] = value;
278  }
279 
280  inline void FEDBufferPayload::appendToBuffer(size_t* pIndexInBuffer,
281  std::vector<uint8_t>::const_iterator start,
282  std::vector<uint8_t>::const_iterator finish) {
283  for (std::vector<uint8_t>::const_iterator iVal = start; iVal != finish; iVal++) {
284  appendToBuffer(pIndexInBuffer, *iVal);
285  }
286  }
287 
288  //FEDBufferPayloadCreator
289 
290  inline FEDBufferPayloadCreator::FEDBufferPayloadCreator(const std::vector<bool>& feUnitsEnabled,
291  const std::vector<bool>& channelsEnabled)
292  : feUnitsEnabled_(feUnitsEnabled), channelsEnabled_(channelsEnabled) {}
293 
295  uint8_t packetCode,
296  const FEDStripData& data) const {
297  return createPayload(mode, packetCode, data);
298  }
299 
300  //FEDBufferGenerator
301 
302  inline uint32_t FEDBufferGenerator::getL1ID() const { return defaultDAQHeader_.l1ID(); }
303 
304  inline uint16_t FEDBufferGenerator::getBXID() const { return defaultDAQHeader_.bxID(); }
305 
308  }
309 
311 
314  }
315 
317 
318  inline FEDBufferGenerator& FEDBufferGenerator::setL1ID(const uint32_t newL1ID) {
319  defaultDAQHeader_.setL1ID(newL1ID);
320  return *this;
321  }
322 
323  inline FEDBufferGenerator& FEDBufferGenerator::setBXID(const uint16_t newBXID) {
324  defaultDAQHeader_.setBXID(newBXID);
325  return *this;
326  }
327 
330  return *this;
331  }
332 
335  return *this;
336  }
337 
340  return *this;
341  }
342 
344  defaultDAQHeader_.setEventType(newDAQEventType);
345  return *this;
346  }
347 
349 
351 
353 
355 
357  //FE header + payload + tracker special header + daq header + daq trailer
358  return feHeader.lengthInBytes() + payload.lengthInBytes() + 8 + 8 + 8;
359  }
360 
361 } // namespace sistrip
362 
363 #endif //ndef EventFilter_SiStripRawToDigi_FEDBufferGenerator_H
sistrip::FEDStripData::ChannelData::get8BitSample
uint8_t get8BitSample(const uint16_t sampleNumber, uint16_t nBotBitsToDrop) const
Definition: SiStripFEDBufferGenerator.h:242
sistrip::FEDBufferPayloadCreator::fillRawChannelBuffer
void fillRawChannelBuffer(std::vector< uint8_t > *channelBuffer, const uint8_t packetCode, const FEDStripData::ChannelData &data, const bool channelEnabled, const bool reorderData) const
Definition: SiStripFEDBufferGenerator.cc:167
sistrip::FEDBufferGenerator::daqHeader
FEDDAQHeader & daqHeader()
Definition: SiStripFEDBufferGenerator.h:348
sistrip::FEDBufferGenerator::fillBuffer
static void fillBuffer(uint8_t *pointerToStartOfBuffer, const FEDDAQHeader &daqHeader, const FEDDAQTrailer &daqTrailer, const TrackerSpecialHeader &tkSpecialHeader, const FEDFEHeader &feHeader, const FEDBufferPayload &payload)
Definition: SiStripFEDBufferGenerator.cc:563
sistrip::FEDBufferPayloadCreator::fillClusterDataPreMixMode
void fillClusterDataPreMixMode(std::vector< uint8_t > *channelBuffer, const FEDStripData::ChannelData &data) const
Definition: SiStripFEDBufferGenerator.cc:404
sistrip::TrackerSpecialHeader::setBufferFormat
TrackerSpecialHeader & setBufferFormat(const FEDBufferFormat newBufferFormat)
Definition: SiStripFEDBufferComponents.cc:793
sistrip::FEDBufferGenerator::getHeaderType
FEDHeaderType getHeaderType() const
Definition: SiStripFEDBufferGenerator.h:310
sistrip::FEDBufferGenerator::getChannelEnabled
bool getChannelEnabled(const uint8_t internalFEDChannelNumber) const
Definition: SiStripFEDBufferGenerator.cc:469
start
Definition: start.py:1
sistrip::FEDBufferPayload::data_
std::vector< uint8_t > data_
Definition: SiStripFEDBufferGenerator.h:77
sistrip::FEDStripData::ChannelData::medians_
std::pair< uint16_t, uint16_t > medians_
Definition: SiStripFEDBufferGenerator.h:43
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
sistrip::FEDStripData::ChannelData
Definition: SiStripFEDBufferGenerator.h:21
sistrip::FEDBufferGenerator::defaultDAQHeader_
FEDDAQHeader defaultDAQHeader_
Definition: SiStripFEDBufferGenerator.h:184
sistrip::FEDBufferPayload::appendToBuffer
void appendToBuffer(size_t *pIndexInBuffer, const uint8_t value)
Definition: SiStripFEDBufferGenerator.h:276
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
sistrip::FEDStripData::ChannelData::setMedians
void setMedians(const std::pair< uint16_t, uint16_t > values)
Definition: SiStripFEDBufferGenerator.h:270
sistrip::FEDBufferGenerator::channelsEnabled_
std::vector< bool > channelsEnabled_
Definition: SiStripFEDBufferGenerator.h:189
sistrip::FEDBufferGenerator::trackerSpecialHeader
TrackerSpecialHeader & trackerSpecialHeader()
Definition: SiStripFEDBufferGenerator.h:352
sistrip::FEDBufferPayloadCreator::createPayload
FEDBufferPayload createPayload(FEDReadoutMode mode, uint8_t packetCode, const FEDStripData &data) const
Definition: SiStripFEDBufferGenerator.cc:102
sistrip::FEDBufferPayloadCreator::operator()
FEDBufferPayload operator()(FEDReadoutMode mode, uint8_t packetCode, const FEDStripData &data) const
Definition: SiStripFEDBufferGenerator.h:294
sistrip::FEDStripData
Definition: SiStripFEDBufferGenerator.h:18
sistrip::FEDBufferPayload::feLengths_
std::vector< uint16_t > feLengths_
Definition: SiStripFEDBufferGenerator.h:78
sistrip::FEDStripData::ChannelData::data_
std::vector< uint16_t > data_
Definition: SiStripFEDBufferGenerator.h:44
sistrip::FEDStripData::ChannelData::get10BitSample
uint16_t get10BitSample(const uint16_t sampleNumber) const
Definition: SiStripFEDBufferGenerator.h:256
FEDRawData.h
sistrip::FEDBufferGenerator::setReadoutMode
FEDBufferGenerator & setReadoutMode(const FEDReadoutMode newReadoutMode)
Definition: SiStripFEDBufferGenerator.h:328
sistrip::FEDDAQHeader::l1ID
uint32_t l1ID() const
Definition: SiStripFEDBufferComponents.h:1347
FEDRawData
Definition: FEDRawData.h:19
sistrip::FEDReadoutMode
FEDReadoutMode
Definition: SiStripFEDBufferComponents.h:45
sistrip::FEDBufferGenerator::bufferSizeInBytes
static size_t bufferSizeInBytes(const FEDFEHeader &feHeader, const FEDBufferPayload &payload)
Definition: SiStripFEDBufferGenerator.h:356
sistrip::FEDBufferGenerator::getL1ID
uint32_t getL1ID() const
Definition: SiStripFEDBufferGenerator.h:302
sistrip::internalFEDChannelNum
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
Definition: SiStripFEDBufferComponents.h:785
sistrip::FEDStripData::ChannelData::getSample
uint16_t getSample(const uint16_t sampleNumber) const
Definition: SiStripFEDBufferGenerator.h:229
sistrip::FEDBufferPayloadCreator::fillClusterData
void fillClusterData(std::vector< uint8_t > *channelBuffer, uint8_t packetCode, const FEDStripData::ChannelData &data, const FEDReadoutMode mode) const
Definition: SiStripFEDBufferGenerator.cc:321
sistrip::FEDBufferGenerator::getDAQEventType
FEDDAQEventType getDAQEventType() const
Definition: SiStripFEDBufferGenerator.h:316
sistrip::FEDStripData::FEDStripData
FEDStripData(const std::vector< ChannelData > &data)
Definition: SiStripFEDBufferGenerator.h:198
sistrip::FEDBufferGenerator::defaultFEHeader_
std::unique_ptr< FEDFEHeader > defaultFEHeader_
Definition: SiStripFEDBufferGenerator.h:187
sistrip::FEDBufferGenerator::daqTrailer
FEDDAQTrailer & daqTrailer()
Definition: SiStripFEDBufferGenerator.h:350
sistrip::FEDBufferPayloadCreator::fillZeroSuppressedChannelBuffer
void fillZeroSuppressedChannelBuffer(std::vector< uint8_t > *channelBuffer, const uint8_t packetCode, const FEDStripData::ChannelData &data, const bool channelEnabled) const
Definition: SiStripFEDBufferGenerator.cc:226
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
sistrip::FEDDAQEventType
FEDDAQEventType
Definition: SiStripFEDBufferComponents.h:95
sistrip::FEDBufferGenerator::setChannelEnable
FEDBufferGenerator & setChannelEnable(const uint8_t internalFEDChannelNumber, const bool enabled)
Definition: SiStripFEDBufferGenerator.cc:492
sistrip::FEDBufferGenerator::setBufferFormat
FEDBufferGenerator & setBufferFormat(const FEDBufferFormat newBufferFormat)
Definition: SiStripFEDBufferGenerator.h:338
sistrip::DAQ_EVENT_TYPE_PHYSICS
Definition: SiStripFEDBufferComponents.h:96
sistrip::FEDBufferGenerator::getReadoutMode
FEDReadoutMode getReadoutMode() const
Definition: SiStripFEDBufferGenerator.h:306
jets_cff.payload
payload
Definition: jets_cff.py:32
sistrip::FEDStripData::ChannelData::size
size_t size() const
Definition: SiStripFEDBufferGenerator.h:218
sistrip::FEDBufferPayloadCreator::feUnitsEnabled_
std::vector< bool > feUnitsEnabled_
Definition: SiStripFEDBufferGenerator.h:122
sistrip::FEDBufferPayloadCreator::channelsEnabled_
std::vector< bool > channelsEnabled_
Definition: SiStripFEDBufferGenerator.h:123
sistrip::FEDStripData::ChannelData::getMedians
std::pair< uint16_t, uint16_t > getMedians() const
Definition: SiStripFEDBufferGenerator.h:268
sistrip::TrackerSpecialHeader
Definition: SiStripFEDBufferComponents.h:315
sistrip::FEDBufferPayload
Definition: SiStripFEDBufferGenerator.h:62
sistrip::FEDBufferGenerator
Definition: SiStripFEDBufferGenerator.h:126
sistrip::FEDBufferGenerator::setFEUnitEnables
FEDBufferGenerator & setFEUnitEnables(const std::vector< bool > &feUnitsEnabled)
Definition: SiStripFEDBufferGenerator.cc:504
sistrip::FEUNITS_PER_FED
static const uint16_t FEUNITS_PER_FED
Definition: ConstantsForHardwareSystems.h:29
sistrip::FEDStripData::ChannelData::operator[]
uint16_t & operator[](const size_t sampleNumber)
Definition: SiStripFEDBufferGenerator.h:225
sistrip::FEDStripData::ChannelData::ChannelData
ChannelData(bool dataIsAlreadyConvertedTo8Bit, const size_t numberOfSamples, const std::pair< uint16_t, uint16_t > medians=std::make_pair< uint16_t >(0, 0))
Definition: SiStripFEDBufferGenerator.h:213
sistrip::FEDBufferGenerator::setDAQEventType
FEDBufferGenerator & setDAQEventType(const FEDDAQEventType newDAQEventType)
Definition: SiStripFEDBufferGenerator.h:343
sistrip::FEDHeaderType
FEDHeaderType
Definition: SiStripFEDBufferComponents.h:37
sistrip::FEDBufferPayloadCreator::FEDBufferPayloadCreator
FEDBufferPayloadCreator(const std::vector< bool > &enabledFEUnits, const std::vector< bool > &enabledChannels)
Definition: SiStripFEDBufferGenerator.h:290
sistrip::HEADER_TYPE_FULL_DEBUG
Definition: SiStripFEDBufferComponents.h:39
sistrip::TrackerSpecialHeader::setReadoutMode
TrackerSpecialHeader & setReadoutMode(const FEDReadoutMode readoutMode)
Definition: SiStripFEDBufferComponents.cc:836
sistrip::FEDBufferPayload::lengthInBytes
size_t lengthInBytes() const
Definition: SiStripFEDBufferGenerator.h:274
SiStripFEDBufferComponents.h
sistrip::STRIPS_PER_FEDCH
static const uint16_t STRIPS_PER_FEDCH
Definition: ConstantsForHardwareSystems.h:44
sistrip::FEDBufferPayload::data
const uint8_t * data() const
Definition: SiStripFEDBufferGenerator.cc:82
sistrip::FEDBufferGenerator::defaultDAQTrailer_
FEDDAQTrailer defaultDAQTrailer_
Definition: SiStripFEDBufferGenerator.h:185
value
Definition: value.py:1
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
sistrip::FEDStripData::channel
ChannelData & channel(const uint8_t internalFEDChannelNum)
Definition: SiStripFEDBufferGenerator.h:201
sistrip::TrackerSpecialHeader::bufferFormat
FEDBufferFormat bufferFormat() const
Definition: SiStripFEDBufferComponents.cc:763
sistrip::FEDBufferGenerator::setHeaderType
FEDBufferGenerator & setHeaderType(const FEDHeaderType newHeaderType)
Definition: SiStripFEDBufferGenerator.h:333
sistrip::FEDFEHeader::lengthInBytes
virtual size_t lengthInBytes() const =0
sistrip::FEDBufferGenerator::setFEUnitEnable
FEDBufferGenerator & setFEUnitEnable(const uint8_t internalFEUnitNumber, const bool enabled)
Definition: SiStripFEDBufferGenerator.cc:480
sistrip::FEDBufferGenerator::getBXID
uint16_t getBXID() const
Definition: SiStripFEDBufferGenerator.h:304
sistrip::FEDStripData::operator[]
ChannelData & operator[](const uint8_t internalFEDChannelNum)
Definition: SiStripFEDBufferGenerator.h:205
sistrip::FEDBufferPayloadCreator::fillZeroSuppressedLiteChannelBuffer
void fillZeroSuppressedLiteChannelBuffer(std::vector< uint8_t > *channelBuffer, const FEDStripData::ChannelData &data, const bool channelEnabled, const FEDReadoutMode mode) const
Definition: SiStripFEDBufferGenerator.cc:262
sistrip::FEDBufferGenerator::defaultTrackerSpecialHeader_
TrackerSpecialHeader defaultTrackerSpecialHeader_
Definition: SiStripFEDBufferGenerator.h:186
sistrip::FEDDAQHeader::setL1ID
FEDDAQHeader & setL1ID(const uint32_t l1ID)
Definition: SiStripFEDBufferComponents.cc:930
sistrip::FEDStripData::ChannelData::dataIs8Bit_
bool dataIs8Bit_
Definition: SiStripFEDBufferGenerator.h:45
sistrip::FEDBufferFormat
FEDBufferFormat
Definition: SiStripFEDBufferComponents.h:26
sistrip::BUFFER_FORMAT_OLD_SLINK
Definition: SiStripFEDBufferComponents.h:29
sistrip::FEDBufferPayload::getFELength
uint16_t getFELength(const uint8_t internalFEUnitNum) const
Definition: SiStripFEDBufferGenerator.cc:91
sistrip::FEDBufferPayload::FEDBufferPayload
FEDBufferPayload(const std::vector< std::vector< uint8_t > > &channelBuffers)
Definition: SiStripFEDBufferGenerator.cc:50
sistrip::FEDDAQHeader::setEventType
FEDDAQHeader & setEventType(const FEDDAQEventType evtType)
Definition: SiStripFEDBufferComponents.cc:925
sistrip::FEDBufferGenerator::setL1ID
FEDBufferGenerator & setL1ID(const uint32_t newL1ID)
Definition: SiStripFEDBufferGenerator.h:318
sistrip::FEDBufferPayloadCreator::fillPreMixRawChannelBuffer
void fillPreMixRawChannelBuffer(std::vector< uint8_t > *channelBuffer, const FEDStripData::ChannelData &data, const bool channelEnabled) const
Definition: SiStripFEDBufferGenerator.cc:286
sistrip::FEDBufferGenerator::feUnitsEnabled_
std::vector< bool > feUnitsEnabled_
Definition: SiStripFEDBufferGenerator.h:188
sistrip::FEDBufferGenerator::feHeader
FEDFEHeader & feHeader()
Definition: SiStripFEDBufferGenerator.h:354
sistrip::FEDBufferGenerator::FEDBufferGenerator
FEDBufferGenerator(const uint32_t l1ID=0, const uint16_t bxID=0, const std::vector< bool > &feUnitsEnabled=std::vector< bool >(FEUNITS_PER_FED, true), const std::vector< bool > &channelsEnabled=std::vector< bool >(FEDCH_PER_FED, true), const FEDReadoutMode readoutMode=READOUT_MODE_ZERO_SUPPRESSED, const FEDHeaderType headerType=HEADER_TYPE_FULL_DEBUG, const FEDBufferFormat bufferFormat=BUFFER_FORMAT_OLD_SLINK, const FEDDAQEventType evtType=DAQ_EVENT_TYPE_PHYSICS)
Definition: SiStripFEDBufferGenerator.cc:438
sistrip::FEDDAQHeader::eventType
FEDDAQEventType eventType() const
Definition: SiStripFEDBufferComponents.cc:910
sistrip::FEDBufferGenerator::generateBuffer
void generateBuffer(FEDRawData *rawDataObject, const FEDStripData &data, uint16_t sourceID, uint8_t packetCode) const
Definition: SiStripFEDBufferGenerator.cc:526
sistrip::FEDBufferGenerator::setBXID
FEDBufferGenerator & setBXID(const uint16_t newBXID)
Definition: SiStripFEDBufferGenerator.h:323
sistrip::FEDBufferGenerator::getBufferFormat
FEDBufferFormat getBufferFormat() const
Definition: SiStripFEDBufferGenerator.h:312
sistrip::FEDDAQTrailer
Definition: SiStripFEDBufferComponents.h:230
sistrip::TrackerSpecialHeader::headerType
FEDHeaderType headerType() const
Definition: SiStripFEDBufferComponents.h:840
sistrip::FEDBufferGenerator::setChannelEnables
FEDBufferGenerator & setChannelEnables(const std::vector< bool > &channelsEnabled)
Definition: SiStripFEDBufferGenerator.cc:515
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
sistrip::TrackerSpecialHeader::readoutMode
FEDReadoutMode readoutMode() const
Definition: SiStripFEDBufferComponents.h:854
sistrip::FEDBufferPayloadCreator
Definition: SiStripFEDBufferGenerator.h:81
sistrip::FEDCH_PER_FED
static const uint16_t FEDCH_PER_FED
Definition: ConstantsForHardwareSystems.h:30
sistrip::FEDFEHeader
Definition: SiStripFEDBufferComponents.h:466
sistrip::FEDBufferGenerator::getFEUnitEnabled
bool getFEUnitEnabled(const uint8_t internalFEUnitNumber) const
Definition: SiStripFEDBufferGenerator.cc:459
sistrip
sistrip classes
Definition: EnsembleCalibrationLA.cc:10
sistrip::FEDBufferPayloadCreator::fillChannelBuffer
void fillChannelBuffer(std::vector< uint8_t > *channelBuffer, FEDReadoutMode mode, uint8_t packetCode, const FEDStripData::ChannelData &data, const bool channelEnabled) const
Definition: SiStripFEDBufferGenerator.cc:114
sistrip::FEDDAQHeader::setBXID
FEDDAQHeader & setBXID(const uint16_t bxID)
Definition: SiStripFEDBufferComponents.cc:937
sistrip::FEDDAQHeader
Definition: SiStripFEDBufferComponents.h:198
sistrip::FEDStripData::ChannelData::setSample
void setSample(const uint16_t sampleNumber, const uint16_t adcValue)
Definition: SiStripFEDBufferGenerator.cc:32
sistrip::FEDStripData::data_
std::vector< ChannelData > data_
Definition: SiStripFEDBufferGenerator.h:59
numberOfSamples
Definition: TotemSampicFrame.h:53
sistrip::FEDDAQHeader::bxID
uint16_t bxID() const
Definition: SiStripFEDBufferComponents.h:1349
sistrip::TrackerSpecialHeader::setHeaderType
TrackerSpecialHeader & setHeaderType(const FEDHeaderType headerType)
Definition: SiStripFEDBufferComponents.cc:821
sistrip::READOUT_MODE_ZERO_SUPPRESSED
Definition: SiStripFEDBufferComponents.h:56
pixel_dqm_sourceclient-live_cfg.enabled
enabled
Definition: pixel_dqm_sourceclient-live_cfg.py:139