Project
Loading...
Searching...
No Matches
DigitGenerator Class Reference

Inherits o2::mch::io::DigitIOBaseTask.

Public Member Functions

void init (InitContext &ic)
 
void run (ProcessingContext &pc)
 
int generateRandomDigits (float occupancy, std::vector< Digit > &digits)
 
- Public Member Functions inherited from o2::mch::io::DigitIOBaseTask
void init (o2::framework::InitContext &ic)
 
void printFull (gsl::span< const Digit > digits, gsl::span< const ROFRecord > rofs) const
 
void printSummary (gsl::span< const Digit > digits, gsl::span< const ROFRecord > rofs, const char *suffix="") const
 
bool shouldProcess () const
 
void incNofProcessedTFs ()
 
void incTFid ()
 

Additional Inherited Members

- Protected Attributes inherited from o2::mch::io::DigitIOBaseTask
size_t mMaxNofTimeFrames {std::numeric_limits<size_t>::max()}
 
size_t mNofProcessedTFs {0}
 
size_t mFirstTF {0}
 
size_t mTFid {0}
 
bool mPrintDigits = false
 
bool mPrintTFs = false
 

Detailed Description

Definition at line 85 of file digits-random-generator-workflow.cxx.

Member Function Documentation

◆ generateRandomDigits()

int DigitGenerator::generateRandomDigits ( float  occupancy,
std::vector< Digit > &  digits 
)
inline

Populate the digits vector with (Nmch * occupancy) digits where Nmch is the total number of channels in MCH (1064008)

Each member variable of the digit is uniformly distributed within its expected range, as an attempt to maximize the entropy of the generated digits, which can be handy to test the efficiency of the entropy encoder used to create the Compressed Time Frame (CTF) for instance.

Parameters
occupancyis a number between 0 and 1. @digits a vector where the generated digits will be appended. That vector is not cleared by this function, so digits can be accumulated if need be.
Returns
the number of digits added to the input digits vector.

Definition at line 153 of file digits-random-generator-workflow.cxx.

◆ init()

void DigitGenerator::init ( InitContext ic)
inline

Definition at line 88 of file digits-random-generator-workflow.cxx.

◆ run()

void DigitGenerator::run ( ProcessingContext pc)
inline

Definition at line 110 of file digits-random-generator-workflow.cxx.


The documentation for this class was generated from the following file: