![]() |
Project
|
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 |
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 :
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.
|
explicit |
Constructs a cluster which holds only a charge sum (aka cluster sum)
| sampaTime | must fit within 10 bits |
| chargeSum | must fit within 20 bits |
| clusterSize | 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 25 of file SampaCluster.cxx.
| 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
| sampaTime | must 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.
| 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.
| 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.
| 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.
| uint32_t o2::mch::raw::SampaCluster::sum | ( | ) | const |
sum returns the total charge in the cluster
Definition at line 74 of file SampaCluster.cxx.
| uint20_t o2::mch::raw::SampaCluster::bunchCrossing |
Definition at line 75 of file SampaCluster.h.
| uint20_t o2::mch::raw::SampaCluster::chargeSum |
Definition at line 76 of file SampaCluster.h.
| uint10_t o2::mch::raw::SampaCluster::clusterSize |
Definition at line 77 of file SampaCluster.h.
| uint10_t o2::mch::raw::SampaCluster::sampaTime |
Definition at line 74 of file SampaCluster.h.
| std::vector<uint16_t> o2::mch::raw::SampaCluster::samples |
Definition at line 78 of file SampaCluster.h.