CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalLaserDigi Class Reference

#include <HcalLaserDigi.h>

Public Member Functions

void addTDCHit (int channel, int hittime)
 
int attenuator1 () const
 
int attenuator2 () const
 
 HcalLaserDigi ()
 
int hitChannel (size_t ihit) const
 
double hitNS (size_t ihit) const
 
int hitRaw (size_t ihit) const
 
uint16_t qadc (int i) const
 
int selector () const
 
void setLaserControl (int att1, int att2, int select)
 
void setQADC (const std::vector< uint16_t > &values)
 
size_t tdcHits () const
 

Private Attributes

int32_t attenuator1_
 
int32_t attenuator2_
 
uint16_t qadcraw_ [32]
 
int32_t selector_
 
std::vector< uint32_t > tdcraw_
 

Detailed Description

Definition at line 7 of file HcalLaserDigi.h.

Constructor & Destructor Documentation

HcalLaserDigi::HcalLaserDigi ( )

Definition at line 3 of file HcalLaserDigi.cc.

References attenuator1_, attenuator2_, mps_fire::i, qadcraw_, and selector_.

3  {
4  for (int i = 0; i < 32; ++i)
5  qadcraw_[i] = 0;
6  attenuator1_ = 0;
7  attenuator2_ = 0;
8  selector_ = 0;
9 }
int32_t attenuator2_
Definition: HcalLaserDigi.h:25
uint16_t qadcraw_[32]
Definition: HcalLaserDigi.h:23
int32_t selector_
Definition: HcalLaserDigi.h:26
int32_t attenuator1_
Definition: HcalLaserDigi.h:25

Member Function Documentation

void HcalLaserDigi::addTDCHit ( int  channel,
int  hittime 
)

Definition at line 16 of file HcalLaserDigi.cc.

References tdcraw_.

Referenced by qadc(), and HcalLaserUnpacker::unpack().

16  {
17  uint32_t packed = (hittime & 0xFFFFFF) | ((channel & 0xFF) << 24);
18  tdcraw_.push_back(packed);
19 }
std::vector< uint32_t > tdcraw_
Definition: HcalLaserDigi.h:24
int HcalLaserDigi::attenuator1 ( ) const
inline

Definition at line 18 of file HcalLaserDigi.h.

References attenuator1_.

18 { return attenuator1_; }
int32_t attenuator1_
Definition: HcalLaserDigi.h:25
int HcalLaserDigi::attenuator2 ( ) const
inline

Definition at line 19 of file HcalLaserDigi.h.

References attenuator2_.

19 { return attenuator2_; }
int32_t attenuator2_
Definition: HcalLaserDigi.h:25
int HcalLaserDigi::hitChannel ( size_t  ihit) const

Definition at line 21 of file HcalLaserDigi.cc.

References tdcraw_.

Referenced by tdcHits().

21  {
22  if (ihit < tdcraw_.size())
23  return tdcraw_[ihit] >> 24;
24  else
25  return -1;
26 }
std::vector< uint32_t > tdcraw_
Definition: HcalLaserDigi.h:24
double HcalLaserDigi::hitNS ( size_t  ihit) const

Definition at line 35 of file HcalLaserDigi.cc.

References hitRaw().

Referenced by tdcHits().

35 { return hitRaw(ihit) * 0.8; }
int hitRaw(size_t ihit) const
int HcalLaserDigi::hitRaw ( size_t  ihit) const

Definition at line 28 of file HcalLaserDigi.cc.

References tdcraw_.

Referenced by hitNS(), and tdcHits().

28  {
29  if (ihit < tdcraw_.size())
30  return tdcraw_[ihit] & 0xFFFFFF;
31  else
32  return -1;
33 }
std::vector< uint32_t > tdcraw_
Definition: HcalLaserDigi.h:24
uint16_t HcalLaserDigi::qadc ( int  i) const
inline

Definition at line 11 of file HcalLaserDigi.h.

References addTDCHit(), and qadcraw_.

11 { return ((i >= 0 && i < 32) ? (qadcraw_[i]) : (0)); }
uint16_t qadcraw_[32]
Definition: HcalLaserDigi.h:23
int HcalLaserDigi::selector ( void  ) const
inline

Definition at line 20 of file HcalLaserDigi.h.

References selector_.

20 { return selector_; }
int32_t selector_
Definition: HcalLaserDigi.h:26
void HcalLaserDigi::setLaserControl ( int  att1,
int  att2,
int  select 
)

Definition at line 37 of file HcalLaserDigi.cc.

References attenuator1_, attenuator2_, singleTopDQM_cfi::select, and selector_.

Referenced by tdcHits().

37  {
38  attenuator1_ = att1;
39  attenuator2_ = att2;
40  selector_ = select;
41 }
int32_t attenuator2_
Definition: HcalLaserDigi.h:25
select
when omitted electron plots will be filled w/o cut on electronId electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), when omitted electron plots will be filled w/o additional pre- selection of the electron candidates
int32_t selector_
Definition: HcalLaserDigi.h:26
int32_t attenuator1_
Definition: HcalLaserDigi.h:25
void HcalLaserDigi::setQADC ( const std::vector< uint16_t > &  values)

Definition at line 11 of file HcalLaserDigi.cc.

References mps_fire::i, and qadcraw_.

Referenced by HcalLaserUnpacker::unpack().

11  {
12  for (size_t i = 0; i < values.size() && i < 32; ++i)
13  qadcraw_[i] = values[i];
14 }
uint16_t qadcraw_[32]
Definition: HcalLaserDigi.h:23
size_t HcalLaserDigi::tdcHits ( ) const
inline

Definition at line 13 of file HcalLaserDigi.h.

References hitChannel(), hitNS(), hitRaw(), singleTopDQM_cfi::select, setLaserControl(), and tdcraw_.

13 { return tdcraw_.size(); }
std::vector< uint32_t > tdcraw_
Definition: HcalLaserDigi.h:24

Member Data Documentation

int32_t HcalLaserDigi::attenuator1_
private

Definition at line 25 of file HcalLaserDigi.h.

Referenced by attenuator1(), HcalLaserDigi(), and setLaserControl().

int32_t HcalLaserDigi::attenuator2_
private

Definition at line 25 of file HcalLaserDigi.h.

Referenced by attenuator2(), HcalLaserDigi(), and setLaserControl().

uint16_t HcalLaserDigi::qadcraw_[32]
private

Definition at line 23 of file HcalLaserDigi.h.

Referenced by HcalLaserDigi(), qadc(), and setQADC().

int32_t HcalLaserDigi::selector_
private

Definition at line 26 of file HcalLaserDigi.h.

Referenced by HcalLaserDigi(), selector(), and setLaserControl().

std::vector<uint32_t> HcalLaserDigi::tdcraw_
private

Definition at line 24 of file HcalLaserDigi.h.

Referenced by addTDCHit(), hitChannel(), hitRaw(), and tdcHits().