Project
Loading...
Searching...
No Matches
o2::mch::raw::SampaCluster Struct Reference

Piece of data for one Sampa channel. More...

#include <SampaCluster.h>

Public Member Functions

 SampaCluster (uint10_t sampaTime, uint20_t bunchCrossing, uint20_t chargeSum, uint10_t clusterSize)
 
 SampaCluster (uint10_t sampaTime, uint20_t bunchCrossing, const std::vector< uint10_t > &samples)
 
uint16_t nofSamples () const
 
bool isClusterSum () const
 isClusterSum returns true if this cluster is not holding raw samples.
 
uint16_t nof10BitWords () const
 
uint32_t sum () const
 sum returns the total charge in the cluster
 

Public Attributes

uint10_t sampaTime
 
uint20_t bunchCrossing
 
uint20_t chargeSum
 
uint10_t clusterSize
 
std::vector< uint16_t > samples
 

Detailed Description

Piece of data for one Sampa channel.

A SampaCluster holds a parf of the data of one Sampa time window for one Sampa channel. This data can be in one of two forms :

  • raw ADC samples (10 bits each)
  • clusterSum values (20 bits each)

with an associated (local) timetamp and a cluster size.

A full time window may contains several SampaClusters.

Definition at line 40 of file SampaCluster.h.

Constructor & Destructor Documentation

◆ SampaCluster() [1/2]

o2::mch::raw::SampaCluster::SampaCluster ( uint10_t  sampaTime,
uint20_t  bunchCrossing,
uint20_t  chargeSum,
uint10_t  clusterSize 
)
explicit

Constructs a cluster which holds only a charge sum (aka cluster sum)

Parameters
sampaTimemust fit within 10 bits
chargeSummust fit within 20 bits
clusterSizemust fit within 10 bits

if some parameter does not fit within its expected range a std::invalid_argument exception is thrown.

Definition at line 25 of file SampaCluster.cxx.

◆ SampaCluster() [2/2]

o2::mch::raw::SampaCluster::SampaCluster ( uint10_t  sampaTime,
uint20_t  bunchCrossing,
const std::vector< uint10_t > &  samples 
)

Constructs a cluster which holds a vector of raw samples

Parameters
sampaTimemust fit within 10 bits
samples: each sample must fit within 10 bits

if some parameter does not fit within its expected range a std::invalid_argument exception is thrown.

Definition at line 35 of file SampaCluster.cxx.

Member Function Documentation

◆ isClusterSum()

bool o2::mch::raw::SampaCluster::isClusterSum ( ) const

isClusterSum returns true if this cluster is not holding raw samples.

Definition at line 58 of file SampaCluster.cxx.

◆ nof10BitWords()

uint16_t o2::mch::raw::SampaCluster::nof10BitWords ( ) const

nof10BitWords returns the number of 10 bits words needed to store this cluster

Definition at line 63 of file SampaCluster.cxx.

◆ nofSamples()

uint16_t o2::mch::raw::SampaCluster::nofSamples ( ) const

nofSamples gives the number of samples of this cluster. Can be > 1 even in chargesum mode (it then indicates the number of original samples that were integrated together)

Definition at line 50 of file SampaCluster.cxx.

◆ sum()

uint32_t o2::mch::raw::SampaCluster::sum ( ) const

sum returns the total charge in the cluster

Definition at line 74 of file SampaCluster.cxx.

Member Data Documentation

◆ bunchCrossing

uint20_t o2::mch::raw::SampaCluster::bunchCrossing

Definition at line 75 of file SampaCluster.h.

◆ chargeSum

uint20_t o2::mch::raw::SampaCluster::chargeSum

Definition at line 76 of file SampaCluster.h.

◆ clusterSize

uint10_t o2::mch::raw::SampaCluster::clusterSize

Definition at line 77 of file SampaCluster.h.

◆ sampaTime

uint10_t o2::mch::raw::SampaCluster::sampaTime

Definition at line 74 of file SampaCluster.h.

◆ samples

std::vector<uint16_t> o2::mch::raw::SampaCluster::samples

Definition at line 78 of file SampaCluster.h.


The documentation for this struct was generated from the following files: