CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
sistrip::DigiToRaw Class Reference

Input: edm::DetSetVector<SiStripDigi>. Output: FEDRawDataCollection. More...

#include <SiStripDigiToRaw.h>

Public Member Functions

void createFedBuffers (edm::Event &, edm::ESHandle< SiStripFedCabling > &cabling, edm::Handle< edm::DetSetVector< SiStripDigi > > &digis, std::unique_ptr< FEDRawDataCollection > &buffers)
 
void createFedBuffers (edm::Event &, edm::ESHandle< SiStripFedCabling > &cabling, edm::Handle< edm::DetSetVector< SiStripRawDigi > > &digis, std::unique_ptr< FEDRawDataCollection > &buffers)
 
void createFedBuffers (edm::Event &, edm::ESHandle< SiStripFedCabling > &cabling, edm::Handle< FEDRawDataCollection > &rawbuffers, edm::Handle< edm::DetSetVector< SiStripDigi > > &digis, std::unique_ptr< FEDRawDataCollection > &buffers)
 
void createFedBuffers (edm::Event &, edm::ESHandle< SiStripFedCabling > &cabling, edm::Handle< FEDRawDataCollection > &rawbuffers, edm::Handle< edm::DetSetVector< SiStripRawDigi > > &digis, std::unique_ptr< FEDRawDataCollection > &buffers)
 
 DigiToRaw (FEDReadoutMode mode, uint8_t packetCode, bool use_fed_key)
 
void fedReadoutMode (FEDReadoutMode mode)
 
void printWarningSummary () const
 
 ~DigiToRaw ()
 

Private Member Functions

template<class Digi_t >
void createFedBuffers_ (edm::Event &, edm::ESHandle< SiStripFedCabling > &cabling, edm::Handle< edm::DetSetVector< Digi_t > > &digis, std::unique_ptr< FEDRawDataCollection > &buffers, bool zeroSuppressed)
 
template<class Digi_t >
void createFedBuffers_ (edm::Event &, edm::ESHandle< SiStripFedCabling > &cabling, edm::Handle< FEDRawDataCollection > &rawbuffers, edm::Handle< edm::DetSetVector< Digi_t > > &digis, std::unique_ptr< FEDRawDataCollection > &buffers, bool zeroSuppressed)
 
uint16_t STRIP (const edm::DetSet< SiStripDigi >::const_iterator &it, const edm::DetSet< SiStripDigi >::const_iterator &begin) const
 
uint16_t STRIP (const edm::DetSet< SiStripRawDigi >::const_iterator &it, const edm::DetSet< SiStripRawDigi >::const_iterator &begin) const
 

Private Attributes

FEDBufferGenerator bufferGenerator_
 
FEDReadoutMode mode_
 
uint8_t packetCode_
 
bool useFedKey_
 
WarningSummary warnings_
 

Detailed Description

Input: edm::DetSetVector<SiStripDigi>. Output: FEDRawDataCollection.

Definition at line 30 of file SiStripDigiToRaw.h.

Constructor & Destructor Documentation

◆ DigiToRaw()

sistrip::DigiToRaw::DigiToRaw ( FEDReadoutMode  mode,
uint8_t  packetCode,
bool  use_fed_key 
)

Definition at line 22 of file SiStripDigiToRaw.cc.

23  : mode_(mode),
24  packetCode_(packetCode),
25  useFedKey_(useFedKey),
27  warnings_("DigiToRaw", "[sistrip::DigiToRaw::createFedBuffers_]", edm::isDebugEnabled()) {
28  if (edm::isDebugEnabled()) {
29  LogDebug("DigiToRaw") << "[sistrip::DigiToRaw::DigiToRaw]"
30  << " Constructing object...";
31  }
33  }

References bufferGenerator_, edm::isDebugEnabled(), LogDebug, mode_, and sistrip::FEDBufferGenerator::setReadoutMode().

◆ ~DigiToRaw()

sistrip::DigiToRaw::~DigiToRaw ( )

Definition at line 37 of file SiStripDigiToRaw.cc.

37  {
38  if (edm::isDebugEnabled()) {
39  LogDebug("DigiToRaw") << "[sistrip::DigiToRaw::~DigiToRaw]"
40  << " Destructing object...";
41  }
42  }

References edm::isDebugEnabled(), and LogDebug.

Member Function Documentation

◆ createFedBuffers() [1/4]

void sistrip::DigiToRaw::createFedBuffers ( edm::Event event,
edm::ESHandle< SiStripFedCabling > &  cabling,
edm::Handle< edm::DetSetVector< SiStripDigi > > &  collection,
std::unique_ptr< FEDRawDataCollection > &  buffers 
)

Input: DetSetVector of SiStripDigis. Output: FEDRawDataCollection. Retrieves and iterates through FED buffers, extract FEDRawData from collection and (optionally) dumps raw data to stdout, locates start of FED buffer by identifying DAQ header, creates new Fed9UEvent object using current FEDRawData buffer, dumps FED buffer to stdout, retrieves data from various header fields

Definition at line 53 of file SiStripDigiToRaw.cc.

56  {
57  createFedBuffers_(event, cabling, collection, buffers, true);
58  }

References universalConfigTemplate::collection, and createFedBuffers_().

Referenced by sistrip::DigiToRawModule::produce().

◆ createFedBuffers() [2/4]

void sistrip::DigiToRaw::createFedBuffers ( edm::Event event,
edm::ESHandle< SiStripFedCabling > &  cabling,
edm::Handle< edm::DetSetVector< SiStripRawDigi > > &  digis,
std::unique_ptr< FEDRawDataCollection > &  buffers 
)

Definition at line 60 of file SiStripDigiToRaw.cc.

63  {
64  createFedBuffers_(event, cabling, collection, buffers, false);
65  }

References universalConfigTemplate::collection, and createFedBuffers_().

◆ createFedBuffers() [3/4]

void sistrip::DigiToRaw::createFedBuffers ( edm::Event event,
edm::ESHandle< SiStripFedCabling > &  cabling,
edm::Handle< FEDRawDataCollection > &  rawbuffers,
edm::Handle< edm::DetSetVector< SiStripDigi > > &  digis,
std::unique_ptr< FEDRawDataCollection > &  buffers 
)

Definition at line 68 of file SiStripDigiToRaw.cc.

72  {
73  createFedBuffers_(event, cabling, rawbuffers, collection, buffers, true);
74  }

References universalConfigTemplate::collection, and createFedBuffers_().

◆ createFedBuffers() [4/4]

void sistrip::DigiToRaw::createFedBuffers ( edm::Event event,
edm::ESHandle< SiStripFedCabling > &  cabling,
edm::Handle< FEDRawDataCollection > &  rawbuffers,
edm::Handle< edm::DetSetVector< SiStripRawDigi > > &  digis,
std::unique_ptr< FEDRawDataCollection > &  buffers 
)

Definition at line 76 of file SiStripDigiToRaw.cc.

80  {
81  createFedBuffers_(event, cabling, rawbuffers, collection, buffers, false);
82  }

References universalConfigTemplate::collection, and createFedBuffers_().

◆ createFedBuffers_() [1/2]

template<class Digi_t >
void sistrip::DigiToRaw::createFedBuffers_ ( edm::Event event,
edm::ESHandle< SiStripFedCabling > &  cabling,
edm::Handle< edm::DetSetVector< Digi_t > > &  digis,
std::unique_ptr< FEDRawDataCollection > &  buffers,
bool  zeroSuppressed 
)
private

Definition at line 85 of file SiStripDigiToRaw.cc.

89  {
91  //CAMM initialise to some dummy empty buffers??? Or OK like this ?
92  createFedBuffers_(event, cabling, rawbuffers, collection, buffers, zeroSuppressed);
93  }

References universalConfigTemplate::collection, and apvshotsanalyzer_cfi::zeroSuppressed.

Referenced by createFedBuffers().

◆ createFedBuffers_() [2/2]

template<class Digi_t >
void sistrip::DigiToRaw::createFedBuffers_ ( edm::Event event,
edm::ESHandle< SiStripFedCabling > &  cabling,
edm::Handle< FEDRawDataCollection > &  rawbuffers,
edm::Handle< edm::DetSetVector< Digi_t > > &  digis,
std::unique_ptr< FEDRawDataCollection > &  buffers,
bool  zeroSuppressed 
)
private

Definition at line 96 of file SiStripDigiToRaw.cc.

101  {
102  const bool dataIsAlready8BitTruncated =
103  zeroSuppressed &&
104  (!(
105  //for special mode premix raw, data is zero-suppressed but not converted to 8 bit
107  // the same goes for 10bit ZS modes
111  try {
112  //set the L1ID to use in the buffers
113  bufferGenerator_.setL1ID(0xFFFFFF & event.id().event());
114  auto fed_ids = cabling->fedIds();
115 
116  //copy header if valid rawbuffers handle
117  if (rawbuffers.isValid()) {
118  if (edm::isDebugEnabled()) {
119  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
120  << " Valid raw buffers, getting headers from them..."
121  << " Number of feds: " << fed_ids.size() << " between " << *(fed_ids.begin())
122  << " and " << *(fed_ids.end());
123  }
124 
125  const FEDRawDataCollection& rawDataCollection = *rawbuffers;
126 
127  for (auto ifed = fed_ids.begin(); ifed != fed_ids.end(); ++ifed) {
128  const FEDRawData& rawfedData = rawDataCollection.FEDData(*ifed);
129 
130  if (edm::isDebugEnabled()) {
131  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
132  << "Fed " << *ifed << " : size of buffer = " << rawfedData.size();
133  }
134 
135  //need to construct full object to copy full header
136  if (rawfedData.size() == 0)
137  warnings_.add("Invalid raw data for FED, skipping", (boost::format("id %1%") % *ifed).str());
138  const auto st_buffer = preconstructCheckFEDBuffer(rawfedData, true);
139  if (FEDBufferStatusCode::SUCCESS != st_buffer) {
140  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
141  << " Could not construct FEDBuffer for FED " << *ifed << std::endl;
142  continue;
143  }
144  sistrip::FEDBuffer fedbuffer{rawfedData, true};
145  const auto st_chan = fedbuffer.findChannels();
146  if (FEDBufferStatusCode::SUCCESS != st_chan) {
147  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
148  << " Could not construct FEDBuffer for FED " << *ifed << std::endl;
149  }
150  if (fedbuffer.headerType() == sistrip::HEADER_TYPE_INVALID) {
151  warnings_.add("Invalid header type for FED, skipping", (boost::format("id %1%") % *ifed).str());
152  continue;
153  }
154 
155  if (edm::isDebugEnabled()) {
156  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
157  << " Original header type: " << fedbuffer.headerType();
158  }
159 
161  //fedbuffer.headerType());
162  bufferGenerator_.daqHeader() = fedbuffer.daqHeader();
163  bufferGenerator_.daqTrailer() = fedbuffer.daqTrailer();
164 
165  bufferGenerator_.trackerSpecialHeader() = fedbuffer.trackerSpecialHeader();
167 
168  if (edm::isDebugEnabled()) {
169  std::ostringstream debugStream;
170  if (ifed == fed_ids.begin()) {
172  std::cout << std::endl;
173  }
175  edm::LogWarning("DigiToRaw")
176  << "[sistrip::DigiToRaw::createFedBuffers_]"
177  << " Tracker special header apveAddress: "
178  << static_cast<int>(bufferGenerator_.trackerSpecialHeader().apveAddress())
179  << " - event type = " << bufferGenerator_.getDAQEventType()
180  << " - buffer format = " << bufferGenerator_.getBufferFormat() << "\n"
181  << " - SpecialHeader bufferformat " << bufferGenerator_.trackerSpecialHeader().bufferFormat()
182  << " - headertype " << bufferGenerator_.trackerSpecialHeader().headerType() << " - readoutmode "
183  << bufferGenerator_.trackerSpecialHeader().readoutMode() << " - apvaddrregister " << std::hex
185  << " - feenabledregister " << std::hex
187  << " - feoverflowregister " << std::hex
189  << " - statusregister " << bufferGenerator_.trackerSpecialHeader().fedStatusRegister() << "\n"
190  << " SpecialHeader: " << debugStream.str();
191  }
192 
193  std::unique_ptr<FEDFEHeader> tempFEHeader(fedbuffer.feHeader()->clone());
194  FEDFullDebugHeader* fedFeHeader = dynamic_cast<FEDFullDebugHeader*>(tempFEHeader.get());
195  if (edm::isDebugEnabled()) {
196  std::ostringstream debugStream;
197  if (ifed == fed_ids.begin()) {
198  std::cout << "FEHeader before transfer: " << std::endl;
199  fedFeHeader->print(std::cout);
200  std::cout << std::endl;
201  }
202  fedFeHeader->print(debugStream);
203  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
204  << " length of original feHeader: " << fedFeHeader->lengthInBytes() << "\n"
205  << debugStream.str();
206  }
207  //status registers
208  (bufferGenerator_.feHeader()).setBEStatusRegister(fedFeHeader->beStatusRegister());
209  (bufferGenerator_.feHeader()).setDAQRegister2(fedFeHeader->daqRegister2());
210  (bufferGenerator_.feHeader()).setDAQRegister(fedFeHeader->daqRegister());
211  for (uint8_t iFE = 1; iFE < 6; iFE++) {
213  .set32BitReservedRegister(iFE, fedFeHeader->get32BitWordFrom(fedFeHeader->feWord(iFE) + 10));
214  }
215 
216  std::vector<bool> feEnabledVec;
217  feEnabledVec.resize(FEUNITS_PER_FED, true);
218  for (uint8_t iFE = 0; iFE < FEUNITS_PER_FED; iFE++) {
219  feEnabledVec[iFE] = fedbuffer.trackerSpecialHeader().feEnabled(iFE);
220  (bufferGenerator_.feHeader()).setFEUnitMajorityAddress(iFE, fedFeHeader->feUnitMajorityAddress(iFE));
221  for (uint8_t iFEUnitChannel = 0; iFEUnitChannel < FEDCH_PER_FEUNIT; iFEUnitChannel++) {
223  .setChannelStatus(iFE, iFEUnitChannel, fedFeHeader->getChannelStatus(iFE, iFEUnitChannel));
224  } //loop on channels
225  } //loop on fe units
226  bufferGenerator_.setFEUnitEnables(feEnabledVec);
227 
228  if (edm::isDebugEnabled()) {
229  std::ostringstream debugStream;
230  if (ifed == fed_ids.begin()) {
231  std::cout << "\nFEHeader after transfer: " << std::endl;
233  std::cout << std::endl;
234  }
235  bufferGenerator_.feHeader().print(debugStream);
236  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
237  << " length of feHeader: " << bufferGenerator_.feHeader().lengthInBytes()
238  << "\n"
239  << debugStream.str();
240  }
241  auto conns = cabling->fedConnections(*ifed);
242 
243  FEDStripData fedData(dataIsAlready8BitTruncated);
244 
245  for (auto iconn = conns.begin(); iconn != conns.end(); iconn++) {
246  // Determine FED key from cabling
247  uint32_t fed_key = ((iconn->fedId() & sistrip::invalid_) << 16) | (iconn->fedCh() & sistrip::invalid_);
248 
249  // Determine whether DetId or FED key should be used to index digi containers
250  uint32_t key = (useFedKey_ || mode_ == READOUT_MODE_SCOPE) ? fed_key : iconn->detId();
251 
252  // Check key is non-zero and valid
253  if (!key || (key == sistrip::invalid32_)) {
254  continue;
255  }
256 
257  // Determine APV pair number (needed only when using DetId)
258  uint16_t ipair = (useFedKey_ || mode_ == READOUT_MODE_SCOPE) ? 0 : iconn->apvPairNumber();
259 
260  FEDStripData::ChannelData& chanData = fedData[iconn->fedCh()];
261 
262  // Find digis for DetID in collection
263  if (!collection.isValid()) {
264  if (edm::isDebugEnabled()) {
265  edm::LogWarning("DigiToRaw") << "[DigiToRaw::createFedBuffers] "
266  << "digis collection is not valid...";
267  }
268  break;
269  }
270  typename std::vector<edm::DetSet<Digi_t> >::const_iterator digis = collection->find(key);
271  if (digis == collection->end()) {
272  continue;
273  }
274 
275  typename edm::DetSet<Digi_t>::const_iterator idigi, digis_begin(digis->data.begin());
276  for (idigi = digis_begin; idigi != digis->data.end(); idigi++) {
277  if (STRIP(idigi, digis_begin) < ipair * 256 || STRIP(idigi, digis_begin) > ipair * 256 + 255) {
278  continue;
279  }
280  const unsigned short strip = STRIP(idigi, digis_begin) % 256;
281 
282  if (strip >= STRIPS_PER_FEDCH) {
283  if (edm::isDebugEnabled()) {
284  std::stringstream ss;
285  ss << "[sistrip::DigiToRaw::createFedBuffers]"
286  << " strip >= strips_per_fedCh";
287  edm::LogWarning("DigiToRaw") << ss.str();
288  }
289  continue;
290  }
291 
292  // check if value already exists
293  if (edm::isDebugEnabled()) {
294  const uint16_t value = 0; //chanData[strip];
295  if (value && value != (*idigi).adc()) {
296  std::stringstream ss;
297  ss << "[sistrip::DigiToRaw::createFedBuffers]"
298  << " Incompatible ADC values in buffer!"
299  << " FedId/FedCh: " << *ifed << "/" << iconn->fedCh()
300  << " DetStrip: " << STRIP(idigi, digis_begin) << " FedChStrip: " << strip
301  << " AdcValue: " << (*idigi).adc() << " RawData[" << strip << "]: " << value;
302  edm::LogWarning("DigiToRaw") << ss.str();
303  }
304  }
305 
306  // Add digi to buffer
307  chanData[strip] = (*idigi).adc();
308  }
309  }
310  // if ((*idigi).strip() >= (ipair+1)*256) break;
311 
312  if (edm::isDebugEnabled()) {
313  edm::LogWarning("DigiToRaw") << "DigiToRaw::createFedBuffers] "
314  << "Almost at the end...";
315  }
316  //create the buffer
317  FEDRawData& fedrawdata = buffers->FEDData(*ifed);
318  bufferGenerator_.generateBuffer(&fedrawdata, fedData, *ifed, packetCode_);
319 
320  if (edm::isDebugEnabled()) {
321  std::ostringstream debugStream;
322  bufferGenerator_.feHeader().print(debugStream);
323  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
324  << " length of final feHeader: " << bufferGenerator_.feHeader().lengthInBytes()
325  << "\n"
326  << debugStream.str();
327  }
328  } //loop on fedids
329  if (edm::isDebugEnabled()) {
330  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
331  << "end of first loop on feds";
332  }
333 
334  } //end of workflow for copying header, below is workflow without copying header
335  else {
336  if (edm::isDebugEnabled()) {
337  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
338  << "Now getting the digis..."
339  << " Number of feds: " << fed_ids.size() << " between " << *(fed_ids.begin())
340  << " and " << *(fed_ids.end());
341  }
342 
343  for (auto ifed = fed_ids.begin(); ifed != fed_ids.end(); ++ifed) {
344  auto conns = cabling->fedConnections(*ifed);
345 
346  FEDStripData fedData(dataIsAlready8BitTruncated);
347 
348  for (auto iconn = conns.begin(); iconn != conns.end(); iconn++) {
349  // Determine FED key from cabling
350  uint32_t fed_key = ((iconn->fedId() & sistrip::invalid_) << 16) | (iconn->fedCh() & sistrip::invalid_);
351 
352  // Determine whether DetId or FED key should be used to index digi containers
353  uint32_t key = (useFedKey_ || mode_ == READOUT_MODE_SCOPE) ? fed_key : iconn->detId();
354 
355  // Check key is non-zero and valid
356  if (!key || (key == sistrip::invalid32_)) {
357  continue;
358  }
359 
360  // Determine APV pair number (needed only when using DetId)
361  uint16_t ipair = (useFedKey_ || mode_ == READOUT_MODE_SCOPE) ? 0 : iconn->apvPairNumber();
362 
363  FEDStripData::ChannelData& chanData = fedData[iconn->fedCh()];
364 
365  // Find digis for DetID in collection
366  if (!collection.isValid()) {
367  if (edm::isDebugEnabled()) {
368  edm::LogWarning("DigiToRaw") << "[DigiToRaw::createFedBuffers] "
369  << "digis collection is not valid...";
370  }
371  break;
372  }
373  typename std::vector<edm::DetSet<Digi_t> >::const_iterator digis = collection->find(key);
374  if (digis == collection->end()) {
375  continue;
376  }
377 
378  typename edm::DetSet<Digi_t>::const_iterator idigi, digis_begin(digis->data.begin());
379  for (idigi = digis_begin; idigi != digis->data.end(); idigi++) {
380  if (STRIP(idigi, digis_begin) < ipair * 256 || STRIP(idigi, digis_begin) > ipair * 256 + 255) {
381  continue;
382  }
383  const unsigned short strip = STRIP(idigi, digis_begin) % 256;
384 
385  if (strip >= STRIPS_PER_FEDCH) {
386  if (edm::isDebugEnabled()) {
387  std::stringstream ss;
388  ss << "[sistrip::DigiToRaw::createFedBuffers]"
389  << " strip >= strips_per_fedCh";
390  edm::LogWarning("DigiToRaw") << ss.str();
391  }
392  continue;
393  }
394 
395  // check if value already exists
396  if (edm::isDebugEnabled()) {
397  const uint16_t value = 0; //chanData[strip];
398  if (value && value != (*idigi).adc()) {
399  std::stringstream ss;
400  ss << "[sistrip::DigiToRaw::createFedBuffers]"
401  << " Incompatible ADC values in buffer!"
402  << " FedId/FedCh: " << *ifed << "/" << iconn->fedCh()
403  << " DetStrip: " << STRIP(idigi, digis_begin) << " FedChStrip: " << strip
404  << " AdcValue: " << (*idigi).adc() << " RawData[" << strip << "]: " << value;
405  edm::LogWarning("DigiToRaw") << ss.str();
406  }
407  }
408 
409  // Add digi to buffer
410  chanData[strip] = (*idigi).adc();
411  }
412  }
413  // if ((*idigi).strip() >= (ipair+1)*256) break;
414 
415  if (edm::isDebugEnabled()) {
416  edm::LogWarning("DigiToRaw") << "DigiToRaw::createFedBuffers] "
417  << "Almost at the end...";
418  }
419  //create the buffer
420  FEDRawData& fedrawdata = buffers->FEDData(*ifed);
421  bufferGenerator_.generateBuffer(&fedrawdata, fedData, *ifed, packetCode_);
422 
423  if (edm::isDebugEnabled()) {
424  std::ostringstream debugStream;
425  bufferGenerator_.feHeader().print(debugStream);
426  edm::LogWarning("DigiToRaw") << "[sistrip::DigiToRaw::createFedBuffers_]"
427  << " length of final feHeader: " << bufferGenerator_.feHeader().lengthInBytes()
428  << "\n"
429  << debugStream.str();
430  }
431  } //loop on feds
432  } //end if-else for copying header
433  } //try
434  catch (const std::exception& e) {
435  if (edm::isDebugEnabled()) {
436  edm::LogWarning("DigiToRaw") << "DigiToRaw::createFedBuffers] "
437  << "Exception caught : " << e.what();
438  }
439  }
440  }

References sistrip::WarningSummary::add(), sistrip::TrackerSpecialHeader::apvAddressErrorRegister(), sistrip::TrackerSpecialHeader::apveAddress(), sistrip::TrackerSpecialHeader::bufferFormat(), bufferGenerator_, universalConfigTemplate::collection, gather_cfg::cout, sistrip::FEDBufferGenerator::daqHeader(), sistrip::FEDBufferGenerator::daqTrailer(), edm::DetSet< T >::data, MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, sistrip::FEDCH_PER_FEUNIT, SiStripFedCabling::fedConnections(), FEDRawDataCollection::FEDData(), SiStripFedCabling::fedIds(), sistrip::TrackerSpecialHeader::fedStatusRegister(), sistrip::TrackerSpecialHeader::feEnableRegister(), sistrip::FEDBufferGenerator::feHeader(), sistrip::TrackerSpecialHeader::feOverflowRegister(), sistrip::FEUNITS_PER_FED, dqm-mbProfile::format, sistrip::FEDBufferGenerator::generateBuffer(), sistrip::FEDBufferGenerator::getBufferFormat(), sistrip::FEDBufferGenerator::getDAQEventType(), sistrip::HEADER_TYPE_FULL_DEBUG, sistrip::HEADER_TYPE_INVALID, sistrip::TrackerSpecialHeader::headerType(), sistrip::invalid32_, sistrip::invalid_, edm::isDebugEnabled(), edm::HandleBase::isValid(), crabWrapper::key, sistrip::FEDFEHeader::lengthInBytes(), mode_, sistrip::PACKET_CODE_ZERO_SUPPRESSED10, packetCode_, sistrip::preconstructCheckFEDBuffer(), sistrip::TrackerSpecialHeader::print(), sistrip::FEDFEHeader::print(), sistrip::READOUT_MODE_PREMIX_RAW, sistrip::READOUT_MODE_SCOPE, sistrip::READOUT_MODE_ZERO_SUPPRESSED, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10_CMOVERRIDE, sistrip::TrackerSpecialHeader::readoutMode(), sistrip::FEDBufferGenerator::setFEUnitEnables(), sistrip::FEDBufferGenerator::setHeaderType(), sistrip::FEDBufferGenerator::setL1ID(), sistrip::FEDBufferGenerator::setReadoutMode(), FEDRawData::size(), contentValuesCheck::ss, str, digitizers_cfi::strip, STRIP(), sistrip::STRIPS_PER_FEDCH, sistrip::SUCCESS, sistrip::FEDBufferGenerator::trackerSpecialHeader(), useFedKey_, relativeConstraints::value, warnings_, and apvshotsanalyzer_cfi::zeroSuppressed.

◆ fedReadoutMode()

void sistrip::DigiToRaw::fedReadoutMode ( FEDReadoutMode  mode)
inline

Definition at line 57 of file SiStripDigiToRaw.h.

57 { mode_ = mode; }

References ALCARECOPromptCalibProdSiPixelAli0T_cff::mode.

◆ printWarningSummary()

void sistrip::DigiToRaw::printWarningSummary ( ) const
inline

Definition at line 59 of file SiStripDigiToRaw.h.

Referenced by sistrip::DigiToRawModule::endStream().

◆ STRIP() [1/2]

uint16_t sistrip::DigiToRaw::STRIP ( const edm::DetSet< SiStripDigi >::const_iterator &  it,
const edm::DetSet< SiStripDigi >::const_iterator &  begin 
) const
inlineprivate

Definition at line 442 of file SiStripDigiToRaw.cc.

443  {
444  return it->strip();
445  }

Referenced by createFedBuffers_().

◆ STRIP() [2/2]

uint16_t sistrip::DigiToRaw::STRIP ( const edm::DetSet< SiStripRawDigi >::const_iterator &  it,
const edm::DetSet< SiStripRawDigi >::const_iterator &  begin 
) const
inlineprivate

Definition at line 446 of file SiStripDigiToRaw.cc.

447  {
448  return it - begin;
449  }

References begin.

Member Data Documentation

◆ bufferGenerator_

FEDBufferGenerator sistrip::DigiToRaw::bufferGenerator_
private

Definition at line 85 of file SiStripDigiToRaw.h.

Referenced by createFedBuffers_(), and DigiToRaw().

◆ mode_

FEDReadoutMode sistrip::DigiToRaw::mode_
private

Definition at line 82 of file SiStripDigiToRaw.h.

Referenced by createFedBuffers_(), and DigiToRaw().

◆ packetCode_

uint8_t sistrip::DigiToRaw::packetCode_
private

Definition at line 83 of file SiStripDigiToRaw.h.

Referenced by createFedBuffers_().

◆ useFedKey_

bool sistrip::DigiToRaw::useFedKey_
private

Definition at line 84 of file SiStripDigiToRaw.h.

Referenced by createFedBuffers_().

◆ warnings_

WarningSummary sistrip::DigiToRaw::warnings_
private

Definition at line 87 of file SiStripDigiToRaw.h.

Referenced by createFedBuffers_().

sistrip::FEDBufferGenerator::daqHeader
FEDDAQHeader & daqHeader()
Definition: SiStripFEDBufferGenerator.h:348
apvshotsanalyzer_cfi.zeroSuppressed
zeroSuppressed
Definition: apvshotsanalyzer_cfi.py:8
sistrip::READOUT_MODE_PREMIX_RAW
Definition: SiStripFEDBufferComponents.h:61
sistrip::invalid32_
static const uint32_t invalid32_
Definition: Constants.h:15
FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
sistrip::READOUT_MODE_SCOPE
Definition: SiStripFEDBufferComponents.h:47
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
sistrip::DigiToRaw::mode_
FEDReadoutMode mode_
Definition: SiStripDigiToRaw.h:82
gather_cfg.cout
cout
Definition: gather_cfg.py:144
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
sistrip::FEDBufferGenerator::trackerSpecialHeader
TrackerSpecialHeader & trackerSpecialHeader()
Definition: SiStripFEDBufferGenerator.h:352
sistrip::WarningSummary::add
void add(const std::string &message, const std::string &details="")
Definition: WarningSummary.cc:6
sistrip::DigiToRaw::createFedBuffers_
void createFedBuffers_(edm::Event &, edm::ESHandle< SiStripFedCabling > &cabling, edm::Handle< edm::DetSetVector< Digi_t > > &digis, std::unique_ptr< FEDRawDataCollection > &buffers, bool zeroSuppressed)
Definition: SiStripDigiToRaw.cc:85
sistrip::WarningSummary::printSummary
void printSummary() const
Definition: WarningSummary.cc:25
edm::Handle
Definition: AssociativeIterator.h:50
sistrip::FEDBufferGenerator::setReadoutMode
FEDBufferGenerator & setReadoutMode(const FEDReadoutMode newReadoutMode)
Definition: SiStripFEDBufferGenerator.h:328
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10_CMOVERRIDE
Definition: SiStripFEDBufferComponents.h:50
sistrip::HEADER_TYPE_INVALID
Definition: SiStripFEDBufferComponents.h:38
FEDRawData
Definition: FEDRawData.h:19
sistrip::TrackerSpecialHeader::apvAddressErrorRegister
uint8_t apvAddressErrorRegister() const
Definition: SiStripFEDBufferComponents.h:887
sistrip::FEDFEHeader::print
virtual void print(std::ostream &os) const =0
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
sistrip::FEDBufferGenerator::getDAQEventType
FEDDAQEventType getDAQEventType() const
Definition: SiStripFEDBufferGenerator.h:316
sistrip::DigiToRaw::useFedKey_
bool useFedKey_
Definition: SiStripDigiToRaw.h:84
sistrip::FEDBufferGenerator::daqTrailer
FEDDAQTrailer & daqTrailer()
Definition: SiStripFEDBufferGenerator.h:350
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
str
#define str(s)
Definition: TestProcessor.cc:48
sistrip::DigiToRaw::packetCode_
uint8_t packetCode_
Definition: SiStripDigiToRaw.h:83
sistrip::PACKET_CODE_ZERO_SUPPRESSED10
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED10
Definition: SiStripFEDBufferComponents.h:89
sistrip::TrackerSpecialHeader::fedStatusRegister
FEDStatusRegister fedStatusRegister() const
Definition: SiStripFEDBufferComponents.h:911
sistrip::TrackerSpecialHeader::feOverflowRegister
uint8_t feOverflowRegister() const
Definition: SiStripFEDBufferComponents.h:899
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
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::DigiToRaw::STRIP
uint16_t STRIP(const edm::DetSet< SiStripDigi >::const_iterator &it, const edm::DetSet< SiStripDigi >::const_iterator &begin) const
Definition: SiStripDigiToRaw.cc:442
edm::LogWarning
Definition: MessageLogger.h:141
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10
Definition: SiStripFEDBufferComponents.h:49
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
sistrip::HEADER_TYPE_FULL_DEBUG
Definition: SiStripFEDBufferComponents.h:39
sistrip::DigiToRaw::warnings_
WarningSummary warnings_
Definition: SiStripDigiToRaw.h:87
sistrip::STRIPS_PER_FEDCH
static const uint16_t STRIPS_PER_FEDCH
Definition: ConstantsForHardwareSystems.h:44
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
sistrip::FEDBufferStatusCode::SUCCESS
value
Definition: value.py:1
sistrip::TrackerSpecialHeader::bufferFormat
FEDBufferFormat bufferFormat() const
Definition: SiStripFEDBufferComponents.cc:763
sistrip::FEDBufferGenerator::setHeaderType
FEDBufferGenerator & setHeaderType(const FEDHeaderType newHeaderType)
Definition: SiStripFEDBufferGenerator.h:333
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
sistrip::FEDFEHeader::lengthInBytes
virtual size_t lengthInBytes() const =0
sistrip::FEDBuffer
Definition: SiStripFEDBuffer.h:24
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
sistrip::preconstructCheckFEDBuffer
FEDBufferStatusCode preconstructCheckFEDBuffer(const FEDRawData &fedBuffer, bool allowBadBuffer=false)
Definition: SiStripFEDBuffer.h:131
sistrip::TrackerSpecialHeader::feEnableRegister
uint8_t feEnableRegister() const
Definition: SiStripFEDBufferComponents.h:893
sistrip::FEDBufferGenerator::setL1ID
FEDBufferGenerator & setL1ID(const uint32_t newL1ID)
Definition: SiStripFEDBufferGenerator.h:318
sistrip::FEDBufferGenerator::feHeader
FEDFEHeader & feHeader()
Definition: SiStripFEDBufferGenerator.h:354
sistrip::FEDBufferGenerator::generateBuffer
void generateBuffer(FEDRawData *rawDataObject, const FEDStripData &data, uint16_t sourceID, uint8_t packetCode) const
Definition: SiStripFEDBufferGenerator.cc:526
relativeConstraints.value
value
Definition: relativeConstraints.py:53
sistrip::FEDBufferGenerator::getBufferFormat
FEDBufferFormat getBufferFormat() const
Definition: SiStripFEDBufferGenerator.h:312
edm::DetSet::data
collection_type data
Definition: DetSet.h:80
sistrip::TrackerSpecialHeader::headerType
FEDHeaderType headerType() const
Definition: SiStripFEDBufferComponents.h:840
sistrip::TrackerSpecialHeader::readoutMode
FEDReadoutMode readoutMode() const
Definition: SiStripFEDBufferComponents.h:854
SiStripFedCabling::fedIds
FedsConstIterRange fedIds() const
Definition: SiStripFedCabling.h:154
edm::isDebugEnabled
bool isDebugEnabled()
Definition: MessageLogger.cc:71
sistrip::FEDCH_PER_FEUNIT
static const uint16_t FEDCH_PER_FEUNIT
Definition: ConstantsForHardwareSystems.h:28
sistrip::TrackerSpecialHeader::print
void print(std::ostream &os) const
Definition: SiStripFEDBufferComponents.h:915
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
SiStripFedCabling::fedConnections
ConnsConstIterRange fedConnections(uint16_t fed_id) const
Definition: SiStripFedCabling.cc:160
crabWrapper.key
key
Definition: crabWrapper.py:19
begin
#define begin
Definition: vmac.h:32
sistrip::DigiToRaw::bufferGenerator_
FEDBufferGenerator bufferGenerator_
Definition: SiStripDigiToRaw.h:85
sistrip::TrackerSpecialHeader::apveAddress
uint8_t apveAddress() const
Definition: SiStripFEDBufferComponents.h:885
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
sistrip::READOUT_MODE_ZERO_SUPPRESSED
Definition: SiStripFEDBufferComponents.h:56
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSet.h:31