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) qadcraw_[i]=0;
5  attenuator1_=0;
6  attenuator2_=0;
7  selector_=0;
8 }
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 15 of file HcalLaserDigi.cc.

References tdcraw_.

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

15  {
16  uint32_t packed=(hittime&0xFFFFFF)|((channel&0xFF)<<24);
17  tdcraw_.push_back(packed);
18 }
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 20 of file HcalLaserDigi.cc.

References tdcraw_.

Referenced by tdcHits().

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

Definition at line 30 of file HcalLaserDigi.cc.

References hitRaw().

Referenced by tdcHits().

30  {
31  return hitRaw(ihit)*0.8;
32 }
int hitRaw(size_t ihit) const
int HcalLaserDigi::hitRaw ( size_t  ihit) const

Definition at line 25 of file HcalLaserDigi.cc.

References tdcraw_.

Referenced by hitNS(), and tdcHits().

25  {
26  if (ihit<tdcraw_.size()) return tdcraw_[ihit]&0xFFFFFF;
27  else return -1;
28 }
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 
)
void HcalLaserDigi::setQADC ( const std::vector< uint16_t > &  values)

Definition at line 10 of file HcalLaserDigi.cc.

References mps_fire::i, and qadcraw_.

Referenced by HcalLaserUnpacker::unpack().

10  {
11  for (size_t i=0; i<values.size() && i<32; ++i)
12  qadcraw_[i]=values[i];
13 }
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(), TauGenJetsDecayModeSelectorAllHadrons_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().