Raw data creator for EMCAL raw data based on EMCAL digits.
More...
#include <RawWriter.h>
|
| void | createPayload (o2::emcal::ChannelData channel, o2::emcal::ChannelType_t chanType, int ddlID, std::vector< char > &payload, bool &saturatedBunch) |
| |
| std::vector< AltroBunch > | findBunches (const std::vector< o2::emcal::Digit * > &channelDigits, ChannelType_t channelType) |
| | Parse digits vector in channel and create ALTRO bunches.
|
| |
| ChannelHeader | createChannelHeader (int hardwareAddress, int payloadSize, bool isBadChannel) |
| | Create channel header.
|
| |
| std::vector< char > | createRCUTrailer (int payloadsize, double timesample, uint64_t triggertime, int feeID) |
| | Creating RCU trailer.
|
| |
| std::vector< int > | encodeBunchData (const std::vector< int > &data) |
| | Encoding words of the ALTRO bunch into 32-bit words.
|
| |
| int | getBranchIndexFromHwAddress (int hwaddress) |
| | Extracting branch index from the hardware address.
|
| |
| int | getFecIndexFromHwAddress (int hwaddress) |
| | Extracting FEC index in branch from the hardware address.
|
| |
| int | getChannelIndexFromHwAddress (int hwaddress) |
| | Extracting Channel index in FEC from the hardware address.
|
| |
Raw data creator for EMCAL raw data based on EMCAL digits.
- Author
- Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
-
Hadi Hassan, Oak Ridge National Laboratory
- Since
- Jan 24, 2020
Definition at line 72 of file RawWriter.h.
◆ FileFor_t
Definition of the granularity of the raw files.
| Enumerator |
|---|
| kFullDet | Full detector (EMCAL + DCAL)
|
| kSubDet | Subdetector (EMCAL/DCAL separate)
|
| kCRORC | C-RORC card.
|
| kLink | Per link.
|
Definition at line 77 of file RawWriter.h.
◆ RawWriter() [1/2]
| o2::emcal::RawWriter::RawWriter |
( |
| ) |
|
|
default |
◆ RawWriter() [2/2]
| o2::emcal::RawWriter::RawWriter |
( |
const char * |
outputdir | ) |
|
|
inline |
Constructor, defining output location.
- Parameters
-
| outputdir | Output directiory |
Initializing the output directory. The output files can be found in the output directory with the granularity defined via setFileFor
Definition at line 93 of file RawWriter.h.
◆ ~RawWriter()
| o2::emcal::RawWriter::~RawWriter |
( |
| ) |
|
|
default |
◆ carryOverMethod()
| int RawWriter::carryOverMethod |
( |
const header::RDHAny * |
rdh, |
|
|
const gsl::span< char > |
data, |
|
|
const char * |
ptr, |
|
|
int |
maxSize, |
|
|
int |
splitID, |
|
|
std::vector< char > & |
trailer, |
|
|
std::vector< char > & |
header |
|
) |
| const |
◆ createChannelHeader()
| ChannelHeader RawWriter::createChannelHeader |
( |
int |
hardwareAddress, |
|
|
int |
payloadSize, |
|
|
bool |
isBadChannel |
|
) |
| |
|
protected |
Create channel header.
- Parameters
-
| hardwareAddress | Hardware address |
| payloadSize | Size of the payload of the channel in 10-bit ALTRO words |
| isBadChannel | If true the channel is a bad channel at hardware level |
Definition at line 336 of file RawWriter.cxx.
◆ createPayload()
bad channel status eventually to be added later
Definition at line 191 of file RawWriter.cxx.
◆ createRCUTrailer()
| std::vector< char > RawWriter::createRCUTrailer |
( |
int |
payloadsize, |
|
|
double |
timesample, |
|
|
uint64_t |
triggertime, |
|
|
int |
feeID |
|
) |
| |
|
protected |
Creating RCU trailer.
- Parameters
-
| payloadsize | Size of the payload as 32bit word |
| timesampe | Length of the time sample (for L1 phase calculation) |
| triggertime | Time of the trigger (for L1 phase calculation) |
| feeID | Link ID |
Creating RCU trailer. Also setting the values of the ALTRO Config registers based on the settings in the raw writer. The RCU trailer is then encoded and converted to 8-bit words.
Definition at line 346 of file RawWriter.cxx.
◆ digitsToRaw()
Converting digits from a full timeframe to raw pages.
- Parameters
-
| digits | Vector of digits belonging to the same timeframe |
| triggers | trigger records with ranges in digits container of data for the various events in the timeframe |
Processing all events from within a timeframe. See processTrigger for more information about the digit to raw converion of a single event.
Definition at line 77 of file RawWriter.cxx.
◆ encodeBunchData()
| std::vector< int > RawWriter::encodeBunchData |
( |
const std::vector< int > & |
data | ) |
|
|
protected |
Encoding words of the ALTRO bunch into 32-bit words.
- Parameters
-
| data | ALTRO bunch information |
- Returns
- Encoded ALTRO words
Converting ALTRO bunch into ALTRO words. For the ALTRO bunch the following structure is expected:
- bunch size including bunch header size (2)
- start time
- ADC samples The input data is converted to 10 but ALTRO words and put on the stream.
Definition at line 301 of file RawWriter.cxx.
◆ findBunches()
Parse digits vector in channel and create ALTRO bunches.
- Parameters
-
| channelDigits | Vector with digits in the channel for the current event |
Channels are parsed in a time-reversed order. Bunches are selected for ranges of digits where the ADC value is consecutively above the pedestal. Only bunches having a min. amount of ADC samples are selected.
Definition at line 248 of file RawWriter.cxx.
◆ getBranchIndexFromHwAddress()
| int o2::emcal::RawWriter::getBranchIndexFromHwAddress |
( |
int |
hwaddress | ) |
|
|
inlineprotected |
Extracting branch index from the hardware address.
- Parameters
-
| hwaddress | Hardware address of the channel |
Definition at line 196 of file RawWriter.h.
◆ getChannelIndexFromHwAddress()
| int o2::emcal::RawWriter::getChannelIndexFromHwAddress |
( |
int |
hwaddress | ) |
|
|
inlineprotected |
Extracting Channel index in FEC from the hardware address.
- Parameters
-
| hwaddress | Hardware address of the channel |
Definition at line 204 of file RawWriter.h.
◆ getFecIndexFromHwAddress()
| int o2::emcal::RawWriter::getFecIndexFromHwAddress |
( |
int |
hwaddress | ) |
|
|
inlineprotected |
Extracting FEC index in branch from the hardware address.
- Parameters
-
| hwaddress | Hardware address of the channel |
Definition at line 200 of file RawWriter.h.
◆ getWriter()
Get access to underlying RawFileWriter.
- Returns
- RawFileWriter
Definition at line 100 of file RawWriter.h.
◆ init()
◆ processTrigger()
Processing digits to raw conversion for the digits from the current event.
- Parameters
-
| trg | Trigger record providing collision information and data range for the current event |
Digits are first sorted according to SRUs and within their channels and time samples. For each SRU and channel within the SRU calo bunches are created. In case at least one valid calo bunch is found channels are created, and they data words are organized in a raw stream, which is closed by the RCU trailer of the given stream. The content of the stream is then passed to the RawFileWriter for page splitting and output streaming.
Definition at line 85 of file RawWriter.cxx.
◆ setDigits()
◆ setFileFor()
Set the granularity of the output file.
- Parameters
-
| filefor | Output granularity |
Output files can be created for
- Whole EMCAL
- Subdetector (EMCAL or DCAL)
- Link
Definition at line 112 of file RawWriter.h.
◆ setGeometry()
Set the geometry parameters.
- Parameters
-
Definition at line 128 of file RawWriter.h.
◆ setMinADCSamplesBunch()
| void o2::emcal::RawWriter::setMinADCSamplesBunch |
( |
int |
nsamples | ) |
|
|
inline |
Set min. ADC samples expected in a calo bunch.
- Parameters
-
| nsamples | Minimum number of ADC samples |
Definition at line 120 of file RawWriter.h.
◆ setNumberOfADCSamples()
| void o2::emcal::RawWriter::setNumberOfADCSamples |
( |
int |
nsamples | ) |
|
|
inline |
Set the number of ADC samples in the readout window.
- Parameters
-
| nsapmles | Number of time samples |
Definition at line 116 of file RawWriter.h.
◆ setOutputLocation()
| void o2::emcal::RawWriter::setOutputLocation |
( |
const char * |
outputdir | ) |
|
|
inline |
◆ setPedestal()
| void o2::emcal::RawWriter::setPedestal |
( |
int |
pedestal | ) |
|
|
inline |
Set pedestal threshold used to accept ADC values when creating the bunches.
- Parameters
-
Definition at line 124 of file RawWriter.h.
The documentation for this class was generated from the following files:
- /home/runner/work/AliceO2/AliceO2/Detectors/EMCAL/simulation/include/EMCALSimulation/RawWriter.h
- /home/runner/work/AliceO2/AliceO2/Detectors/EMCAL/simulation/src/RawWriter.cxx