CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalLaserDigi Class Reference

#include <HcalLaserDigi.h>

List of all members.

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_, i, qadcraw_, and selector_.

                             {
  for (int i=0; i<32; ++i) qadcraw_[i]=0;
  attenuator1_=0;
  attenuator2_=0;
  selector_=0;
}

Member Function Documentation

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

Definition at line 15 of file HcalLaserDigi.cc.

References tdcraw_.

Referenced by HcalLaserUnpacker::unpack().

                                                      {
  uint32_t packed=(hittime&0xFFFFFF)|((channel&0xFF)<<24);
  tdcraw_.push_back(packed);
}
int HcalLaserDigi::attenuator1 ( ) const [inline]

Definition at line 18 of file HcalLaserDigi.h.

References attenuator1_.

{ return attenuator1_; }
int HcalLaserDigi::attenuator2 ( ) const [inline]

Definition at line 19 of file HcalLaserDigi.h.

References attenuator2_.

{ return attenuator2_; }
int HcalLaserDigi::hitChannel ( size_t  ihit) const

Definition at line 20 of file HcalLaserDigi.cc.

References tdcraw_.

                                               {
  if (ihit<tdcraw_.size()) return tdcraw_[ihit]>>24;
  else return -1;
}
double HcalLaserDigi::hitNS ( size_t  ihit) const

Definition at line 30 of file HcalLaserDigi.cc.

References hitRaw().

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

Definition at line 25 of file HcalLaserDigi.cc.

References tdcraw_.

Referenced by hitNS().

                                           {
  if (ihit<tdcraw_.size()) return tdcraw_[ihit]&0xFFFFFF;
  else return -1;
}
uint16_t HcalLaserDigi::qadc ( int  i) const [inline]

Definition at line 11 of file HcalLaserDigi.h.

References qadcraw_.

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

Definition at line 20 of file HcalLaserDigi.h.

References selector_.

{ return selector_; }
void HcalLaserDigi::setLaserControl ( int  att1,
int  att2,
int  select 
)

Definition at line 34 of file HcalLaserDigi.cc.

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

void HcalLaserDigi::setQADC ( const std::vector< uint16_t > &  values)

Definition at line 10 of file HcalLaserDigi.cc.

References i, and qadcraw_.

Referenced by HcalLaserUnpacker::unpack().

                                                             {
  for (size_t  i=0; i<values.size() && i<32; ++i)
    qadcraw_[i]=values[i];
}
size_t HcalLaserDigi::tdcHits ( ) const [inline]

Definition at line 13 of file HcalLaserDigi.h.

References tdcraw_.

{ return tdcraw_.size(); }

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().