CMS 3D CMS Logo

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

#include <EcalDataFrame.h>

Inheritance diagram for EcalDataFrame:
EBDataFrame EEDataFrame

Public Member Functions

 EcalDataFrame ()
 
 EcalDataFrame (edm::DataFrame const &iframe)
 
edm::DataFrame const & frame () const
 
edm::DataFrameframe ()
 
bool hasSwitchToGain1 () const
 
bool hasSwitchToGain6 () const
 
DetId id () const
 
bool isSaturated () const
 
int lastUnsaturatedSample () const
 
EcalMGPASample operator[] (int i) const
 
EcalMGPASample sample (int i) const
 
void setSample (int i, EcalMGPASample sam)
 
void setSize (int)
 
int size () const
 
virtual ~EcalDataFrame ()
 

Static Public Attributes

static constexpr int MAXSAMPLES = 10
 

Private Attributes

edm::DataFrame m_data
 

Detailed Description

Definition at line 16 of file EcalDataFrame.h.

Constructor & Destructor Documentation

◆ EcalDataFrame() [1/2]

EcalDataFrame::EcalDataFrame ( )
inline

Definition at line 18 of file EcalDataFrame.h.

18 {}

◆ EcalDataFrame() [2/2]

EcalDataFrame::EcalDataFrame ( edm::DataFrame const &  iframe)
inline

Definition at line 20 of file EcalDataFrame.h.

20 : m_data(iframe) {}
edm::DataFrame m_data
Definition: EcalDataFrame.h:54

◆ ~EcalDataFrame()

virtual EcalDataFrame::~EcalDataFrame ( )
inlinevirtual

Definition at line 22 of file EcalDataFrame.h.

22 {}

Member Function Documentation

◆ frame() [1/2]

edm::DataFrame const& EcalDataFrame::frame ( ) const
inline

◆ frame() [2/2]

edm::DataFrame& EcalDataFrame::frame ( )
inline

Definition at line 51 of file EcalDataFrame.h.

References m_data.

51 { return m_data; }
edm::DataFrame m_data
Definition: EcalDataFrame.h:54

◆ hasSwitchToGain1()

bool EcalDataFrame::hasSwitchToGain1 ( ) const

Definition at line 25 of file EcalDataFrame.cc.

References EcalMgpaBitwiseGain1, m_data, and edm::DataFrame::size().

Referenced by EcalUncalibRecHitMultiFitAlgo::makeRecHit().

25  {
26  for (unsigned int u = 0; u < m_data.size(); u++) {
27  if ((static_cast<EcalMGPASample>(m_data[u])).gainId() == EcalMgpaBitwiseGain1)
28  return true;
29  }
30  return false;
31 }
#define EcalMgpaBitwiseGain1
Definition: EcalDataFrame.h:10
constexpr size_type size() const
Definition: DataFrame.h:43
edm::DataFrame m_data
Definition: EcalDataFrame.h:54

◆ hasSwitchToGain6()

bool EcalDataFrame::hasSwitchToGain6 ( ) const

Definition at line 17 of file EcalDataFrame.cc.

References EcalMgpaBitwiseGain6, m_data, and edm::DataFrame::size().

Referenced by EcalUncalibRecHitMultiFitAlgo::makeRecHit().

17  {
18  for (unsigned int u = 0; u < m_data.size(); u++) {
19  if ((static_cast<EcalMGPASample>(m_data[u])).gainId() == EcalMgpaBitwiseGain6)
20  return true;
21  }
22  return false;
23 }
constexpr size_type size() const
Definition: DataFrame.h:43
#define EcalMgpaBitwiseGain6
Definition: EcalDataFrame.h:9
edm::DataFrame m_data
Definition: EcalDataFrame.h:54

◆ id()

DetId EcalDataFrame::id ( ) const
inline

Definition at line 24 of file EcalDataFrame.h.

References edm::DataFrame::id(), and m_data.

Referenced by EEDataFrame::id(), EBDataFrame::id(), and EcalUncalibRecHitMultiFitAlgo::makeRecHit().

24 { return m_data.id(); }
constexpr id_type id() const
Definition: DataFrame.h:41
edm::DataFrame m_data
Definition: EcalDataFrame.h:54

◆ isSaturated()

bool EcalDataFrame::isSaturated ( ) const
inline

Definition at line 38 of file EcalDataFrame.h.

References lastUnsaturatedSample().

Referenced by EcalUncalibRecHitMultiFitAlgo::makeRecHit().

38 { return (lastUnsaturatedSample() != -1); }
int lastUnsaturatedSample() const
Definition: EcalDataFrame.cc:3

◆ lastUnsaturatedSample()

int EcalDataFrame::lastUnsaturatedSample ( ) const

Definition at line 3 of file EcalDataFrame.cc.

References EcalMgpaBitwiseGain0, mps_fire::i, dqmiolumiharvest::j, m_data, and edm::DataFrame::size().

Referenced by isSaturated().

3  {
4  int cnt = 0;
5  for (size_t i = 3; i < m_data.size(); ++i) {
6  cnt = 0;
7  for (size_t j = i; j < (i + 5) && j < m_data.size(); ++j) {
8  if (((EcalMGPASample)m_data[j]).gainId() == EcalMgpaBitwiseGain0)
9  ++cnt;
10  }
11  if (cnt == 5)
12  return i - 1; // the last unsaturated sample
13  }
14  return -1; // no saturation found
15 }
constexpr size_type size() const
Definition: DataFrame.h:43
edm::DataFrame m_data
Definition: EcalDataFrame.h:54
#define EcalMgpaBitwiseGain0
Definition: EcalDataFrame.h:11

◆ operator[]()

EcalMGPASample EcalDataFrame::operator[] ( int  i) const
inline

Definition at line 28 of file EcalDataFrame.h.

References mps_fire::i, and m_data.

28 { return m_data[i]; }
edm::DataFrame m_data
Definition: EcalDataFrame.h:54

◆ sample()

EcalMGPASample EcalDataFrame::sample ( int  i) const
inline

◆ setSample()

void EcalDataFrame::setSample ( int  i,
EcalMGPASample  sam 
)
inline

◆ setSize()

void EcalDataFrame::setSize ( int  )
inline

Definition at line 41 of file EcalDataFrame.h.

41 {}

◆ size()

int EcalDataFrame::size ( void  ) const
inline

Member Data Documentation

◆ m_data

edm::DataFrame EcalDataFrame::m_data
private

◆ MAXSAMPLES

constexpr int EcalDataFrame::MAXSAMPLES = 10
static

Definition at line 48 of file EcalDataFrame.h.

Referenced by EcalCPUDigisProducer::acquire(), ecal::weights::EventOutputDataGPU::allocate(), ecal::raw::OutputDataGPU::allocate(), ecal::multifit::EventOutputDataGPU::allocate(), ecal::multifit::EventDataForScratchGPU::allocate(), EcalBarrelDigisValidation::analyze(), EcalEndcapDigisValidation::analyze(), testChannel::analyze(), EcalDigisValidation::analyze(), EcalMixingModuleValidation::analyze(), EcalUncalibRecHitTimingCCAlgo::computeTimeCC(), EcalMixingModuleValidation::dqmEndRun(), EcalSampleMask::EcalSampleMask(), EcalUncalibratedRecHit::EcalUncalibratedRecHit(), GlobalDigisProducer::fillECal(), GlobalDigisAnalyzer::fillECal(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::launchKernels(), EcalUncalibRecHitMultiFitAlgo::makeRecHit(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_prep_1d_and_initialize::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_compute_nullhypot::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_compute_makeratio::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_prep_2d::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_compute_findamplchi2_and_finish::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_compute_fixMGPAslew::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_computation_init::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_correction_and_finalize::operator()(), EcalUncalibRecHitConvertGPU2CPUFormat::produce(), EcalUncalibRecHitSoAToLegacy::produce(), EcalPedOffset::readDACs(), ecal::UncalibratedRecHit< calo::common::VecStoragePolicy< calo::common::CUDAHostAllocatorAlias > >::resize(), EcalUncalibRecHitWorkerGlobal::run(), EcalUncalibRecHitWorkerMultiFit::run(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::PresampleTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), EcalSampleMask::setEcalSampleMaskRecordEB(), EcalSampleMask::setEcalSampleMaskRecordEE(), EcalUncalibRecHitTimeWeightsAlgo< EBDataFrame >::time(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::use_sample(), EcalSampleMask::useSample(), EcalSampleMask::useSampleEB(), and EcalSampleMask::useSampleEE().