CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Namespaces | Classes | Functions
hcal Namespace Reference

Namespaces

 constants
 
 raw
 
 reconstruction
 

Classes

class  AMC13Header
 
struct  DigiCollection
 
struct  DigiCollection< Flavor5, StoragePolicy >
 
struct  DigiCollectionBase
 
struct  Flavor1
 
struct  Flavor3
 
struct  Flavor5
 
struct  RecHitCollection
 

Functions

template<typename Flavor >
constexpr uint8_t adc_for_sample (uint16_t const *const dfstart, uint32_t const sample)
 
template<>
constexpr uint8_t adc_for_sample< Flavor5 > (uint16_t const *const dfstart, uint32_t const sample)
 
template<typename Flavor >
constexpr uint8_t capid_for_sample (uint16_t const *const dfstart, uint32_t const sample)
 
template<>
constexpr uint8_t capid_for_sample< Flavor3 > (uint16_t const *const dfstart, uint32_t const sample)
 
template<typename Flavor >
constexpr uint32_t compute_nsamples (uint32_t const nwords)
 
template<typename Flavor >
constexpr uint32_t compute_stride (uint32_t const nsamples)
 
template<typename Flavor >
constexpr uint8_t soibit_for_sample (uint16_t const *const dfstart, uint32_t const sample)
 
template<typename Flavor >
constexpr uint8_t tdc_for_sample (uint16_t const *const dfstart, uint32_t const sample)
 

Function Documentation

template<typename Flavor >
constexpr uint8_t hcal::adc_for_sample ( uint16_t const *const  dfstart,
uint32_t const  sample 
)

Definition at line 59 of file DigiCollection.h.

References gpuClustering::adc.

59  {
60  return Flavor::adc(dfstart + Flavor::HEADER_WORDS + sample * Flavor::WORDS_PER_SAMPLE);
61  }
uint16_t *__restrict__ uint16_t const *__restrict__ adc
template<>
constexpr uint8_t hcal::adc_for_sample< Flavor5 > ( uint16_t const *const  dfstart,
uint32_t const  sample 
)

Definition at line 69 of file DigiCollection.h.

References hcal::Flavor5::adc(), hcal::Flavor5::HEADER_WORDS, and compare_using_db::sample.

69  {
70  // avoid using WORDS_PER_SAMPLE and simply shift
71  return Flavor5::adc(dfstart + Flavor5::HEADER_WORDS + (sample >> 1), sample % 2);
72  }
uint16_t *__restrict__ uint16_t const *__restrict__ adc
template<typename Flavor >
constexpr uint8_t hcal::capid_for_sample ( uint16_t const *const  dfstart,
uint32_t const  sample 
)

Definition at line 43 of file DigiCollection.h.

43  {
44  auto const capid_first = (*dfstart >> 8) & 0x3;
45  return (capid_first + sample) & 0x3; // same as % 4
46  }
template<>
constexpr uint8_t hcal::capid_for_sample< Flavor3 > ( uint16_t const *const  dfstart,
uint32_t const  sample 
)

Definition at line 49 of file DigiCollection.h.

References hcal::Flavor3::capid(), hcal::Flavor3::HEADER_WORDS, compare_using_db::sample, and hcal::Flavor3::WORDS_PER_SAMPLE.

49  {
50  return Flavor3::capid(dfstart + Flavor3::HEADER_WORDS + sample * Flavor3::WORDS_PER_SAMPLE);
51  }
template<typename Flavor >
constexpr uint32_t hcal::compute_nsamples ( uint32_t const  nwords)

Definition at line 80 of file DigiCollection.h.

80  {
81  if constexpr (Flavor::SAMPLES_PER_WORD >= 1)
82  return (nwords - Flavor::HEADER_WORDS) * Flavor::SAMPLES_PER_WORD;
83  else
84  return (nwords - Flavor::HEADER_WORDS) / Flavor::WORDS_PER_SAMPLE;
85  }
template<typename Flavor >
constexpr uint32_t hcal::compute_stride ( uint32_t const  nsamples)

Definition at line 75 of file DigiCollection.h.

75  {
76  return static_cast<uint32_t>(nsamples * Flavor::WORDS_PER_SAMPLE) + Flavor::HEADER_WORDS;
77  }
template<typename Flavor >
constexpr uint8_t hcal::soibit_for_sample ( uint16_t const *const  dfstart,
uint32_t const  sample 
)

Definition at line 54 of file DigiCollection.h.

54  {
55  return Flavor::soibit(dfstart + Flavor::HEADER_WORDS + sample * Flavor::WORDS_PER_SAMPLE);
56  }
template<typename Flavor >
constexpr uint8_t hcal::tdc_for_sample ( uint16_t const *const  dfstart,
uint32_t const  sample 
)

Definition at line 64 of file DigiCollection.h.

64  {
65  return Flavor::tdc(dfstart + Flavor::HEADER_WORDS + sample * Flavor::WORDS_PER_SAMPLE);
66  }