15#include <fmt/format.h>
26 : sampaTime(
impl::assertIsInRange(
"sampaTime", sampaTime, 0, 0x3FF)),
27 bunchCrossing(
impl::assertIsInRange(
"bunchCrossing", bunchCrossing, 0, 0xFFFFF)),
28 chargeSum(
impl::assertIsInRange(
"chargeSum", chargeSum, 0, 0xFFFFF)),
36 : sampaTime(
impl::assertIsInRange(
"sampaTime", sampaTime, 0, 0x3FF)),
37 bunchCrossing(
impl::assertIsInRange(
"bunchCrossing", bunchCrossing, 0, 0xFFFFF)),
43 throw std::invalid_argument(
"cannot add data with no sample");
90 os << fmt::format(
"ts {:4d} ", sc.
sampaTime);
92 os << fmt::format(
"cs {:4d} ", sc.
nofSamples());
94 os << fmt::format(
"q {:6d}", sc.
chargeSum);
96 os << fmt::format(
"n {:4d} q [ ", sc.
samples.size());
98 os << fmt::format(
"{:4d} ",
s);
111 for (
auto sample : sc.
samples) {
112 s += fmt::format(
"-{}", sample);
unsigned short int uint16_t
o2::raw::RawFileWriter * raw
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
int assertIsInRange(std::string what, uint64_t value, uint64_t min, uint64_t max)
std::string asString(const SampaCluster &sc)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)
Piece of data for one Sampa channel.
uint32_t sum() const
sum returns the total charge in the cluster
uint16_t nofSamples() const
SampaCluster(uint10_t sampaTime, uint20_t bunchCrossing, uint20_t chargeSum, uint10_t clusterSize)
std::vector< uint16_t > samples
uint16_t nof10BitWords() const
bool isClusterSum() const
isClusterSum returns true if this cluster is not holding raw samples.