HGCal Test Beam  03a93d6239a951948e06fb3ef8dae4cbdebfad30
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SKIROC2DataFrame.cc
Go to the documentation of this file.
1 #include "HGCal/DataFormats/interface/SKIROC2DataFrame.h"
2 
4 {
5 
6 }
7 void SKIROC2DataFrame::setSample(edm::DataFrame::size_type isample, int adcLow, int adcHigh, int tdc)
8 {
9  unsigned int pos = HEADER_WORDS + WORDS_PER_SAMPLE * isample;
10  m_data[ pos + Sample::ADCLOW_SHIFT ] = uint16_t(adcLow);
11  m_data[ pos + Sample::ADCHIGH_SHIFT ] = uint16_t(adcHigh);
12  m_data[ pos + Sample::TDC_SHIFT ] = uint16_t(tdc);
13 }
14 
15 std::ostream& operator<<(std::ostream& s, const SKIROC2DataFrame& ski)
16 {
17  s << ski.detid() << std::endl;
18  for (int i = 0; i < ski.samples(); i++)
19  s << " " << ski[i].adcLow()
20  << " " << ski[i].adcHigh()
21  << " " << ski[i].tdc()
22  << " " << ski.samples() << std::endl;
23  return s;
24 }
void copyContent(const SKIROC2DataFrame &src)
HGCalTBDetId detid() const
Get the detector id.
void setSample(edm::DataFrame::size_type isample, int adcLow, int adcHigh, int tdc)
set the sample contents
std::ostream & operator<<(std::ostream &, const HGCalTBDetId &id)
Definition: HGCalTBDetId.cc:37
static const int HEADER_WORDS
static const int WORDS_PER_SAMPLE
int samples() const
total number of samples in the digi