CMS 3D CMS Logo

HcalLaserDigi.cc
Go to the documentation of this file.
2 
4  for (int i = 0; i < 32; ++i)
5  qadcraw_[i] = 0;
6  attenuator1_ = 0;
7  attenuator2_ = 0;
8  selector_ = 0;
9 }
10 
11 void HcalLaserDigi::setQADC(const std::vector<uint16_t>& values) {
12  for (size_t i = 0; i < values.size() && i < 32; ++i)
13  qadcraw_[i] = values[i];
14 }
15 
16 void HcalLaserDigi::addTDCHit(int channel, int hittime) {
17  uint32_t packed = (hittime & 0xFFFFFF) | ((channel & 0xFF) << 24);
18  tdcraw_.push_back(packed);
19 }
20 
21 int HcalLaserDigi::hitChannel(size_t ihit) const {
22  if (ihit < tdcraw_.size())
23  return tdcraw_[ihit] >> 24;
24  else
25  return -1;
26 }
27 
28 int HcalLaserDigi::hitRaw(size_t ihit) const {
29  if (ihit < tdcraw_.size())
30  return tdcraw_[ihit] & 0xFFFFFF;
31  else
32  return -1;
33 }
34 
35 double HcalLaserDigi::hitNS(size_t ihit) const { return hitRaw(ihit) * 0.8; }
36 
37 void HcalLaserDigi::setLaserControl(int att1, int att2, int select) {
38  attenuator1_ = att1;
39  attenuator2_ = att2;
40  selector_ = select;
41 }
mps_fire.i
i
Definition: mps_fire.py:355
HcalLaserDigi::hitChannel
int hitChannel(size_t ihit) const
Definition: HcalLaserDigi.cc:21
HcalLaserDigi::attenuator1_
int32_t attenuator1_
Definition: HcalLaserDigi.h:25
singleTopDQM_cfi.select
select
Definition: singleTopDQM_cfi.py:50
HcalLaserDigi::HcalLaserDigi
HcalLaserDigi()
Definition: HcalLaserDigi.cc:3
HcalLaserDigi::addTDCHit
void addTDCHit(int channel, int hittime)
Definition: HcalLaserDigi.cc:16
HcalLaserDigi::qadcraw_
uint16_t qadcraw_[32]
Definition: HcalLaserDigi.h:23
HcalLaserDigi.h
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
HcalLaserDigi::attenuator2_
int32_t attenuator2_
Definition: HcalLaserDigi.h:25
HcalLaserDigi::setQADC
void setQADC(const std::vector< uint16_t > &values)
Definition: HcalLaserDigi.cc:11
HcalLaserDigi::hitRaw
int hitRaw(size_t ihit) const
Definition: HcalLaserDigi.cc:28
HcalLaserDigi::setLaserControl
void setLaserControl(int att1, int att2, int select)
Definition: HcalLaserDigi.cc:37
HcalLaserDigi::tdcraw_
std::vector< uint32_t > tdcraw_
Definition: HcalLaserDigi.h:24
HcalLaserDigi::hitNS
double hitNS(size_t ihit) const
Definition: HcalLaserDigi.cc:35
HcalLaserDigi::selector_
int32_t selector_
Definition: HcalLaserDigi.h:26