CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
EcalMGPASample Class Reference

#include <EcalMGPASample.h>

Public Member Functions

int adc () const
 get the ADC sample (12 bits) More...
 
 EcalMGPASample ()
 
 EcalMGPASample (uint16_t data)
 
 EcalMGPASample (int adc, int gainId)
 
int gainId () const
 get the gainId (2 bits) More...
 
 operator uint16_t () const
 
uint16_t operator() () const
 for streaming More...
 
uint16_t raw () const
 get the raw word More...
 

Private Attributes

uint16_t theSample
 

Detailed Description

Simple container packer/unpacker for a single sample from the MGPA electronics

Definition at line 25 of file EcalMGPASample.h.

Constructor & Destructor Documentation

EcalMGPASample::EcalMGPASample ( )
inline

Definition at line 27 of file EcalMGPASample.h.

References theSample.

27 { theSample = 0; }
uint16_t theSample
EcalMGPASample::EcalMGPASample ( uint16_t  data)
inline

Definition at line 28 of file EcalMGPASample.h.

References data, and theSample.

28 { theSample = data; }
uint16_t theSample
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
EcalMGPASample::EcalMGPASample ( int  adc,
int  gainId 
)

Definition at line 4 of file EcalMGPASample.cc.

References theSample.

4 { theSample = (adc & 0xFFF) | ((gainId & 0x3) << 12); }
uint16_t theSample
int gainId() const
get the gainId (2 bits)
int adc() const
get the ADC sample (12 bits)

Member Function Documentation

int EcalMGPASample::adc ( ) const
inline

get the ADC sample (12 bits)

Definition at line 34 of file EcalMGPASample.h.

References ecalPh1::kAdcMask, and theSample.

Referenced by EcalSelectiveReadoutSuppressor::accept(), JetToDigiDump::analyze(), EcalTBValidation::analyze(), EcalTPInputAnalyzer::analyze(), EcalSimpleTBAnalyzer::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalSimple2007H4TBAnalyzer::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalBarrelDigisValidation::analyze(), testChannel::analyze(), EcalEndcapDigisValidation::analyze(), EcalPulseShapeGrapher::analyze(), EcalDigisValidation::analyze(), EcalMixingModuleValidation::analyze(), EcnaAnalyzer::analyze(), EcalUncalibRecHitTimingCCAlgo::computeTimeCC(), EcalSelectiveReadoutValidation::dccZsFIR(), GlobalDigisProducer::fillECal(), GlobalDigisAnalyzer::fillECal(), EcalUncalibRecHitMultiFitAlgo::makeRecHit(), operator<<(), ecaldqm::GpuTask::runOnCpuDigis(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::GpuTask::runOnGpuDigis(), EcalMipGraphs::selectDigi(), EcalDisplaysByEvent::selectDigi(), EcalEBFenixLinearizer::setInput(), EcalFenixLinearizer::setInput(), EBDataFrame::spikeEstimator(), and EcalUncalibRecHitTimeWeightsAlgo< EBDataFrame >::time().

34 { return theSample & ecalPh1::kAdcMask; }
uint16_t theSample
static constexpr unsigned int kAdcMask
Definition: EcalConstants.h:34
int EcalMGPASample::gainId ( ) const
inline
EcalMGPASample::operator uint16_t ( ) const
inline

Definition at line 39 of file EcalMGPASample.h.

References theSample.

39 { return theSample; }
uint16_t theSample
uint16_t EcalMGPASample::operator() ( ) const
inline

for streaming

Definition at line 38 of file EcalMGPASample.h.

References theSample.

38 { return theSample; }
uint16_t theSample
uint16_t EcalMGPASample::raw ( ) const
inline

get the raw word

Definition at line 32 of file EcalMGPASample.h.

References theSample.

Referenced by EcalSimRawData::getEbDigi(), EcalDigiSelector::produce(), EcalFenixLinearizer::setInput(), and EcalEBFenixLinearizer::setInput().

32 { return theSample; }
uint16_t theSample

Member Data Documentation

uint16_t EcalMGPASample::theSample
private

Definition at line 42 of file EcalMGPASample.h.

Referenced by adc(), EcalMGPASample(), gainId(), operator uint16_t(), operator()(), and raw().